multiAI Summary Pending
vscode-feature-command
Register a new command in a VS Code extension by updating package.json contributes.commands and src/extension.ts activate function. Use when the user wants to add a functional command (e.g., text formatting, code generation, UI action) to a VS Code extension.
223 stars
Installation
Claude Code / Cursor / Codex
$curl -o ~/.claude/skills/vscode-feature-command/SKILL.md --create-dirs "https://raw.githubusercontent.com/partme-ai/full-stack-skills/main/skills/vscode-skills/vscode-feature-command/SKILL.md"
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/vscode-feature-command/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How vscode-feature-command Compares
| Feature / Agent | vscode-feature-command | Standard Approach |
|---|---|---|
| Platform Support | multi | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Register a new command in a VS Code extension by updating package.json contributes.commands and src/extension.ts activate function. Use when the user wants to add a functional command (e.g., text formatting, code generation, UI action) to a VS Code extension.
Which AI agents support this skill?
This skill is compatible with multi.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
## When to use this skill
Use this skill when the user wants to add a new functional command (e.g., "Hello World", "Format Text") to the extension.
## How to use this skill
Adding a command requires updates to two files: `package.json` and `src/extension.ts`.
### Step 1: Update `package.json`
Add the command definition to the `contributes.commands` array.
```json
// package.json
{
"contributes": {
"commands": [
{
"command": "extension.myCommand", // Unique ID
"title": "My Extension: Do Something" // Display Name
}
]
}
}
```
### Step 2: Update `src/extension.ts`
Register the command in the `activate` function.
```typescript
// src/extension.ts
import * as vscode from 'vscode';
export function activate(context: vscode.ExtensionContext) {
// ... existing code ...
let disposable = vscode.commands.registerCommand('extension.myCommand', () => {
// Implementation logic here
vscode.window.showInformationMessage('Command executed!');
});
context.subscriptions.push(disposable);
}
```
## Best Practices
* **Command ID Naming**: Use `extensionName.actionName` format to avoid conflicts.
* **Async Handling**: If the command logic is asynchronous, use `async () => { await ... }`.
* **Error Handling**: Wrap logic in try-catch blocks if it involves external operations.