VS

vscode-extension-dev

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.zip

Installs 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.
267 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

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

You give it
Request to modify extension UI, add commands, change config logic, rebuild, or reinstall the .vsix
You get back
Modified extension behavior, updated configuration files, or a new .vsix package

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

FileRole
src/extension.tsEntry point — registers commands, activates ConfigPanel
src/ConfigPanel.tsWebview panel with all tabs (Home, Device, API Keys, AI Providers, Claude.ai, Actions)
src/ConfigManager.tsRead/write config: include/config.h, server/.env, platformio.ini
src/RelayManager.tsSpawns/stops server/relay.py as a child process
src/PortDetector.tsDetects serial ports via PlatformIO → pyserial → PowerShell fallback
package.jsonManifest: commands, views, activity bar, contributes
out/extension.jsCompiled bundle (generated — never edit directly)

Recent behavior to preserve:

  • Board env list is read dynamically from platformio.ini sections ([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:

FileFields written
include/config.hWiFi, API keys, Anthropic/OpenRouter URLs, relay host/port, update interval
server/.envCLAUDEAI_SESSION, LASTACTIVE_ORG, RELAY_PORT
platformio.iniselected env section: upload_port, monitor_port, upload_speed

Also written by extension:

FilePurpose
.vscode/esp32-display.jsonPersist last selected boardEnv

ConfigManager.load() reads all three and merges them.


Tab ↔ Pane Map

Tab button labeldata-tabid="tab-*" pane
🏠 Homehometab-home
📡 Devicedevicetab-device
🔑 API Keysapikeystab-apikeys
🤖 AI Providersanthropictab-anthropic
☁️ Claude.aiclaudeaitab-claudeai
⚡ Actionsactionstab-actions

Board-aware flow

  1. Device tab board selector (#board-env) is populated from getAvailableEnvs().
  2. UI sends boardEnv in build/buildAndFlash messages.
  3. Panel backend spawns PlatformIO with -e boardEnv.
  4. 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() calls ConfigPanel.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

  1. Add a tab button in _html() (around line 257–262):
    <button class="tab-btn" data-tab="mytab">🆕 My Tab</button>
    
  2. Add the matching pane with id="tab-mytab":
    <div class="tab-pane" id="tab-mytab">
      ...content...
    </div>
    
  3. If new fields need saving, add them to ESP32Config interface in ConfigManager.ts, update DEFAULTS, buildConfigH() / buildEnv(), and load().

Adding a New VS Code Command

  1. Register in package.jsoncontributes.commands:
    { "command": "esp32td.myCommand", "title": "My Command", "category": "ESP32 Token Display" }
    
  2. 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.json write 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 in package.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.

SkillInstallsUpdatedSafetyDifficulty
vscode-extension-dev (this skill)02moReviewIntermediate
turborepo612moReviewIntermediate
codex-skill125moReviewAdvanced
run-nx-generator53moReviewIntermediate

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.

61191

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.

12110

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.

571

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.

1260

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.

763

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.

744

Search skills

Search the agent skills registry