๐ŸŽฏ

vscode-extension-guide

๐ŸŽฏSkill

from aktsmm/agent-skills

VibeIndex|
What it does

Guides developers through creating, developing, and publishing VS Code extensions with comprehensive setup, packaging, and troubleshooting steps.

๐Ÿ“ฆ

Part of

aktsmm/agent-skills(13 items)

vscode-extension-guide

Installation

npxRun with npx
npx @vscode/vsce package # Creates .vsix
๐Ÿ“– Extracted from docs: aktsmm/agent-skills
2Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

"Guide for creating VS Code extensions from scratch to Marketplace publication. Use when: (1) Creating a new VS Code extension, (2) Adding commands, keybindings, or settings to an extension, (3) Publishing to VS Code Marketplace, (4) Troubleshooting extension activation or packaging issues, (5) Building TreeView or Webview UI, (6) Setting up extension tests."

Overview

# 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

```bash

# 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

```bash

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

| Symptom | Fix |

| --------------------- | -------------------------------------- |

| Extension not loading | Add activationEvents to package.json |

| Command not found | Match command ID in package.json/code |

| Shortcut not working | Remove when clause, check conflicts |

| Topic | Reference |

| ------------------- | -------------------------------------------------------------------- |

| AI Customization | [references/ai-customization.md](references/ai-customization.md) |

| Code Review Prompts | [references/code-review-prompts.md](references/code-review-prompts.md) |

| Code Samples | [references/code-samples.md](references/code-samples.md) |

| TreeView | [references/treeview.md](references/treeview.md) |

| Webview | [references/webview.md](references/webview.md) |

| Testing | [references/testing.md](references/testing.md) |

| Publishing | [references/publishing.md](references/publishing.md) |

| Troubleshooting | [references/troubleshooting.md](references/troubleshooting.md) |

Best Practices

ๅ‘ฝๅใฎไธ€่ฒซๆ€ง

ๅ…ฌ้–‹ๅ‰ใซใƒ‘ใƒƒใ‚ฑใƒผใ‚ธๅใƒป่จญๅฎšใ‚ญใƒผใƒปใ‚ณใƒžใƒณใƒ‰ๅใ‚’็ตฑไธ€๏ผš

| ้ …็›ฎ | ไพ‹ |

|------|-----|

| ใƒ‘ใƒƒใ‚ฑใƒผใ‚ธๅ | copilot-scheduler |

| ่จญๅฎšใ‚ญใƒผ | copilotScheduler.enabled |

| ใ‚ณใƒžใƒณใƒ‰ID | copilotScheduler.createTask |

| ใƒ“ใƒฅใƒผID | copilotSchedulerTasks |

้€š็Ÿฅใฎไธ€ๅ…ƒ็ฎก็†

```typescript

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

function getNotificationMode(): NotificationMode {

const config = vscode.workspace.getConfiguration("myExtension");

return config.get("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);

}

```

่จญๅฎšใง notificationMode ใ‚’้ธในใ‚‹ใ‚ˆใ†ใซใ™ใ‚‹ใ“ใจใงใ€ใƒฆใƒผใ‚ถใƒผใŒ้€š็Ÿฅ้Ÿณใ‚’ๅˆถๅพกๅฏ่ƒฝใ€‚