vscode-contributions
Add or change a LocalPilot setting, command, menu entry, keybinding or view, and keep package.json, src/config.ts, src/extension.ts, the docs and the tests in sync. USE WHEN adding a `localpilot.*` se
SKILL.md.claude/skills/vscode-contributions/SKILL.md
GitHubAdding settings, commands and menus
A contribution touches several files that nothing checks against each other at compile time. Change them all in one go.
Settings
package.json→contributes.configuration.properties. Put the key next to related keys, because order is the order in the Settings UI. Give it atypeanddefault, aminimum/maximumfor numbers, andenumplusenumDescriptionsfor choices. UsemarkdownDescriptionand say what the user gets. Link related settings as`#localpilot.other.key#`. If data leaves the machine, say so plainly (seelocalpilot.storage.redis.enabled).src/config.ts. Add the field toLocalPilotConfigwith a one-line doc comment, then read it ingetConfig()with the same default and clamping (Math.max/Math.min/Math.floor). Group related keys in an object, as withqueue,autoMode,supervisorandmemoryLimits.- Read it where it's used with
getConfig().x, not cached at activation, so changes apply without a reload. If something must react to a change, useonDidChangeConfigurationwithe.affectsConfiguration('localpilot.x')(seeextension.ts). - If the settings panel should show it, add it to
src/ui/settingsPanel.tsandmedia/settings.js(checkscripts/settings-preview.html). - Docs: add a row to
docs/docs/configuration.md, and to the feature's page indocs/docs/if it's user-visible.
Commands
package.json→contributes.commands:{ command: "localpilot.x", title: "Do X…", category: "LocalPilot", icon: "$(codicon)" }. Titles use Title Case, with "…" when the command asks for more input.- Register it in
src/extension.tswith the local helpercmd('localpilot.x', (arg?: unknown) => …). Tree-view menus pass the clicked node and the palette passes nothing, so normalise the argument (seesessionIdArg,queueTaskArg). - Hide item-only commands from the palette: add
{ "command": "localpilot.x", "when": "false" }tomenus.commandPalette. - Placement:
menus["view/title"]with"when": "view =~ /^localpilot\\.agentsView/". Groupnavigation@Nputs it in the toolbar; any other group puts it in the…menu.menus["view/item/context"]matches the tree item'scontextValue(set insrc/ui/agentsView.ts). UseviewItem == xor a regexviewItem =~ /^queue-(failed|blocked)$/. Groupinline@Nshows as a hover icon.- The status bar menu is the
localpilot.statusMenuquick pick inextension.ts.
- If other extensions or the CLI need it, add it to
LocalPilotApiat the end ofextension.tsand to the API table indocs/docs/development.md.
Editing package.json safely
Edit it with a small Node script (parse, change, JSON.stringify(p, null, indent)), keeping the file's existing indentation, or use exact Edit replacements. Then confirm that git diff --stat package.json shows only the lines you meant to change.
Check
npx tsc --noEmit && npx eslint src && node -e "require('./package.json')"
src/test/extension.test.ts and src/test/telemetry.test.ts assert parts of the manifest (commands, menus, defaults). Run them (see the run-extension-tests skill) after renaming or removing anything. Add a CHANGELOG.md entry under ## Unreleased (see the release-changelog skill).