agentsclimarketplace

Vscode extension guide en

Skill lewiswigmore/agent-skills/skills/vscode-extension-guide-en

English guide for VS Code extension development — from scaffolding to Marketplace publication. Covers webview patterns, CSP security, TreeView, testing, packaging, AI customization, and troubleshooting. Adapted from aktsmm/agent-skills with corrections for VS Code 1.74+ APIs.From its SKILL.md

Install
npx -y skills add lewiswigmore/agent-skills --skill vscode-extension-guide-en

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as CC BY-NC-SA 4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.5 KB, 882 tokens by cl100k_base, as published. Nobody here has run it

VS Code Extension Guide

Create, develop, and publish VS Code extensions.

When to Use

  • VS Code extension, extension development, vscode plugin
  • Creating a new VS Code extension from scratch
  • Adding commands, keybindings, or settings to an extension
  • Publishing to VS Code Marketplace

Quick Start

# Scaffold new extension (recommended)
npm install -g yo generator-code
yo code

# Or minimal manual setup
mkdir my-extension && cd my-extension
npm init -y && npm install -D typescript @types/vscode

Project Structure

my-extension/
├── package.json          # Extension manifest (CRITICAL)
├── src/extension.ts      # Entry point
├── out/                  # Compiled JS (gitignore)
├── images/icon.png       # 128x128 PNG for Marketplace
└── .vscodeignore         # Exclude files from VSIX

Building & Packaging

npm run compile      # Build once
npm run watch        # Watch mode (F5 to launch debug)
npx @vscode/vsce package   # Creates .vsix

Done Criteria

  • Extension activates without errors
  • All commands registered and working
  • Package size < 5MB (use .vscodeignore)
  • README.md includes Marketplace/GitHub links

Quick Troubleshooting

SymptomFix
Extension not loadingCheck activationEvents (auto-detected since VS Code 1.74 for contributed commands/views)
Command not foundMatch command ID in package.json/code
Shortcut not workingRemove when clause, check conflicts
TopicReference
AI Customizationreferences/ai-customization.md
Code Review Promptsreferences/code-review-prompts.md
Code Samplesreferences/code-samples.md
TreeViewreferences/treeview.md
Webviewreferences/webview.md
Testingreferences/testing.md
Publishingreferences/publishing.md
Troubleshootingreferences/troubleshooting.md

Best Practices

Naming Consistency

Unify package name, setting keys, command IDs, and view IDs before publishing:

ItemExample
Package namecopilot-scheduler
Setting keycopilotScheduler.enabled
Command IDcopilotScheduler.createTask
View IDcopilotSchedulerTasks

Centralised Notification Handling

type NotificationMode = "sound" | "silentToast" | "silentStatus";

function getNotificationMode(): NotificationMode {
  const config = vscode.workspace.getConfiguration("myExtension");
  return config.get<NotificationMode>("notificationMode", "sound");
}

function notifyInfo(message: string, timeoutMs = 4000): void {
  const mode = getNotificationMode();
  switch (mode) {
    case "silentStatus":
      vscode.window.setStatusBarMessage(message, timeoutMs);
      break;
    case "silentToast":
      void vscode.window.withProgress(
        { location: vscode.ProgressLocation.Notification, title: message },
        async () => {},
      );
      break;
    default:
      void vscode.window.showInformationMessage(message);
  }
}

function notifyError(message: string, timeoutMs = 6000): void {
  const mode = getNotificationMode();
  if (mode === "silentStatus") {
    vscode.window.setStatusBarMessage(`⚠ ${message}`, timeoutMs);
    console.error(message);
    return;
  }
  void vscode.window.showErrorMessage(message);
}

Expose a notificationMode setting so users can control how notifications are delivered.

What ships with it: 8 files

53.5 KB alongside SKILL.md

Keep looking

Skills are one crate of 326,871. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.