Tools for developing and packaging the TokenDisplay VS Code extension.
Install
mkdir -p .claude/skills/vscode-extension-dev && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15827" && unzip -o skill.zip -d .claude/skills/vscode-extension-dev && rm skill.zipInstalls to .claude/skills/vscode-extension-dev
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Guide for developing, building, packaging, and installing the VS Code extension for the TokenDisplay project. Use this when asked to modify the extension UI (ConfigPanel.ts), add commands, change config logic, rebuild after edits, or reinstall the .vsix into VS Code.Key capabilities
- →Manage ConfigPanel webviews
- →Read and write configuration files like include/config.h, server/.env, and platformio.ini
- →Control relay processes by spawning and stopping server/relay.py
- →Detect serial ports using PlatformIO
- →Build and package the VS Code extension into a .vsix file
- →Install the .vsix extension into VS Code
How it works
The skill guides through modifying source files, building the extension using npm scripts, packaging it into a .vsix file, and installing it into VS Code.
Inputs & outputs
When to use vscode-extension-dev
- →Modify ConfigPanel UI
- →Add new extension commands
- →Update configuration management logic
- →Rebuild extension for testing
About this skill
Extension Architecture
| File | Role |
|---|---|
src/extension.ts | Entry point — registers commands, activates ConfigPanel |
src/ConfigPanel.ts | Webview panel with all tabs (Home, Device, API Keys, AI Providers, Claude.ai, Actions) |
src/ConfigManager.ts | Read/write config: include/config.h, server/.env, platformio.ini |
src/RelayManager.ts | Spawns/stops server/relay.py as a child process |
src/PortDetector.ts | Detects serial ports via PlatformIO → pyserial → PowerShell fallback |
package.json | Manifest: commands, views, activity bar, contributes |
out/extension.js | Compiled bundle (generated — never edit directly) |
Recent behavior to preserve:
- Board env list is read dynamically from
platformio.inisections ([env:...]). - Selected board env is persisted in
.vscode/esp32-display.json. - Build/flash command includes the selected env (
pio run -e <env>). - Saving config patches only the selected env section in
platformio.ini(upload_port,monitor_port,upload_speed).
Where Config Is Stored
ConfigManager.save() writes to three files:
| File | Fields written |
|---|---|
include/config.h | WiFi, API keys, Anthropic/OpenRouter URLs, relay host/port, update interval |
server/.env | CLAUDEAI_SESSION, LASTACTIVE_ORG, RELAY_PORT |
platformio.ini | selected env section: upload_port, monitor_port, upload_speed |
Also written by extension:
| File | Purpose |
|---|---|
.vscode/esp32-display.json | Persist last selected boardEnv |
ConfigManager.load() reads all three and merges them.
Tab ↔ Pane Map
| Tab button label | data-tab | id="tab-*" pane |
|---|---|---|
| 🏠 Home | home | tab-home |
| 📡 Device | device | tab-device |
| 🔑 API Keys | apikeys | tab-apikeys |
| 🤖 AI Providers | anthropic | tab-anthropic |
| ☁️ Claude.ai | claudeai | tab-claudeai |
| ⚡ Actions | actions | tab-actions |
Board-aware flow
- Device tab board selector (
#board-env) is populated fromgetAvailableEnvs(). - UI sends
boardEnvin build/buildAndFlash messages. - Panel backend spawns PlatformIO with
-e boardEnv. - Config save patches only that env in
platformio.ini.
If adding a new board env to platformio.ini, no extra extension code should be required for the selector to show it.
Build Commands
All commands run inside vscode-extension/:
cd vscode-extension
# Compile TypeScript (type-check only — does NOT produce out/)
npm run compile
# Fast dev build (produces out/extension.js with source map)
npm run build
# Watch mode (rebuilds on every file save)
npm run watch
# Package into .vsix (runs vscode:prepublish → minified build first)
npm run package
# Build + package + install in one go
npm run package ; code --install-extension esp32-token-display-1.0.0.vsix --force
Edit → Rebuild → Reinstall Workflow
cd e:\Gap_code\TokenDisply\vscode-extension
# 1. Edit source files (ConfigPanel.ts, ConfigManager.ts, etc.)
# 2. Package (compiles + bundles + creates .vsix)
npm run package
# 3. Install
code --install-extension esp32-token-display-1.0.0.vsix --force
# 4. In VS Code: Ctrl+Shift+P → "Developer: Reload Window"
Tip: After reload, the Config Panel reopens automatically because
activate()callsConfigPanel.createOrShow().
Tip: When testing board-specific flows, verify both the board selector value and the generated PlatformIO command line in the Actions output.
Adding a New Tab
- Add a tab button in
_html()(around line 257–262):<button class="tab-btn" data-tab="mytab">🆕 My Tab</button> - Add the matching pane with
id="tab-mytab":<div class="tab-pane" id="tab-mytab"> ...content... </div> - If new fields need saving, add them to
ESP32Configinterface inConfigManager.ts, updateDEFAULTS,buildConfigH()/buildEnv(), andload().
Adding a New VS Code Command
- Register in
package.json→contributes.commands:{ "command": "esp32td.myCommand", "title": "My Command", "category": "ESP32 Token Display" } - Wire up in
extension.ts:vscode.commands.registerCommand('esp32td.myCommand', () => { /* … */ })
Common Issues
Build/flash runs against wrong board env
- Check Device tab board selection.
- Confirm Actions output starts with
pio ... run -e <expected-env>. - If selection resets after reload, check
.vscode/esp32-display.jsonwrite permissions.
Port/speed changed in wrong env section
Confirm that save logic is patching only the selected env section in platformio.ini.
If keys are missing in that section, add them manually once (upload_port, monitor_port, upload_speed) so future patches can replace values safely.
out/extension.js is stale after editing
Run npm run build (or npm run package to also get a fresh .vsix).
Extension does not activate
- Check the Output panel → ESP32 Token Display channel.
- Make sure
"activationEvents": ["onStartupFinished"]is inpackage.json. - Verify the installed version with:
code --list-extensions --show-versions | Select-String esp32.
Webview shows blank / old content
The webview HTML is inlined as a template string in ConfigPanel._html(). After rebuilding the extension JS, reload VS Code (Developer: Reload Window).
vsce not found
npm install --save-dev @vscode/vsce
TypeScript errors
npm run compile # shows all tsc errors without bundling
When not to use it
- →When editing out/extension.js directly
- →When the goal is to modify Designer.cs files by hand
Limitations
- →The skill does not support direct editing of out/extension.js
- →The skill requires npm for build commands
- →The skill requires `code` command for installation
How it compares
This skill provides a structured workflow for developing and deploying a VS Code extension, ensuring proper compilation, packaging, and installation steps are followed, unlike manual, error-prone processes.
Compared to similar skills
vscode-extension-dev side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| vscode-extension-dev (this skill) | 0 | 2mo | Review | Intermediate |
| turborepo | 61 | 2mo | Review | Intermediate |
| codex-skill | 12 | 5mo | Review | Advanced |
| run-nx-generator | 5 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
turborepo
vercel
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.
codex-skill
feiskyer
Use when user asks to leverage codex, gpt-5, or gpt-5.1 to implement something (usually implement a plan or feature designed by Claude). Provides non-interactive automation mode for hands-off task execution without approval prompts.
run-nx-generator
nrwl
Run Nx generators with prioritization for workspace-plugin generators. Use this when generating code, scaffolding new features, or automating repetitive tasks in the monorepo.
zod-4
prowler-cloud
Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.
copilot-sdk
github
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
effect-ts-expert
ojowwalker77
This skill should be used when the user is working with Effect-TS, asks to "write Effect code", "use Effect", "functional TypeScript", "handle errors with Effect", "dependency injection Effect", "Effect Layer", or needs expert-level guidance on Effect-TS patterns, error handling, concurrency, and best practices.