agentleFS
agentsdanceagentsdance/agentskills/skills/vscode-extension-builder/SKILL.md

vscode-extension-builder

Skill3 starsChanged 11 months agoApache-2.0View on GitHub

Build VS Code extensions. Use when the user needs to create editor extensions, add custom commands, or extend VS Code functionality.

  • Installs packages

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create Visual Studio Code extensions.

    line 8

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

VS Code Extension Builder

Create Visual Studio Code extensions.

Project Setup

# Install generator
npm install -g yo generator-code

# Generate extension
yo code

# Choose options:
# - Type: New Extension (TypeScript)
# - Name: my-extension
# - Description: My VS Code extension

Basic Extension Structure

my-extension/
├── package.json        # Extension manifest
├── src/
│   └── extension.ts    # Main entry point
├── .vscode/
│   └── launch.json     # Debug configuration
└── tsconfig.json

package.json (Manifest)

{
  "name": "my-extension",
  "displayName": "My Extension",
  "version": "1.0.0",
  "engines": { "vscode": "^1.85.0" },
  "categories": ["Other"],
  "activationEvents": [],
  "main": "./out/extension.js",
  "contributes": {
    "commands": [
      {
        "command": "myExtension.helloWorld",
        "title": "Hello World"
      }
    ],
    "keybindings": [
      {
        "command": "myExtension.helloWorld",
        "key": "ctrl+shift+h",
        "mac": "cmd+shift+h"
      }
    ],
    "configuration": {
      "title": "My Extension",
      "properties": {
        "myExtension.greeting": {
          "type": "string",
          "default": "Hello",
          "description": "Greeting message"
        }
      }
    }
  }
}

Extension Code

import * as vscode from 'vscode';

export function activate(context: vscode.ExtensionContext) {
  console.log('Extension activated');

  // Register command
  let disposable = vscode.commands.registerCommand(
    'myExtension.helloWorld',
    () => {
      const config = vscode.workspace.getConfiguration('myExtension');
      const greeting = config.get<string>('greeting', 'Hello');
      vscode.window.showInformationMessage(`${greeting} World!`);
    }
  );

  context.subscriptions.push(disposable);

  // Register text document change listener
  vscode.workspace.onDidChangeTextDocument((event) => {
    console.log('Document changed:', event.document.fileName);
  });

  // Status bar item
  const statusBar = vscode.window.createStatusBarItem(
    vscode.StatusBarAlignment.Right,
    100
  );
  statusBar.text = '$(heart) My Extension';
  statusBar.command = 'myExtension.helloWorld';
  statusBar.show();
  context.subscriptions.push(statusBar);
}

export function deactivate() {}

Common APIs

// Show quick pick
const choice = await vscode.window.showQuickPick(['Option 1', 'Option 2']);

// Show input box
const input = await vscode.window.showInputBox({ prompt: 'Enter value' });

// Get active editor
const editor = vscode.window.activeTextEditor;
if (editor) {
  const text = editor.document.getText();
  const selection = editor.selection;
}

// Insert text
await editor.edit((builder) => {
  builder.insert(new vscode.Position(0, 0), 'New text');
});

// Create diagnostic (error/warning)
const diagnostics = vscode.languages.createDiagnosticCollection('myExt');

Publishing

# Install vsce
npm install -g @vscode/vsce

# Package
vsce package

# Publish
vsce publish

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.