Syntic
← All skills
Developer ExperienceFreeCommunityv1.0.0

Vscode Extension

Use when building VS Code extensions with Language Server Protocol, custom editors, webview panels, and marketplace publishing

About this skill

Use when building VS Code extensions with Language Server Protocol, custom editors, webview panels, and marketplace publishing

SKILL.md

vscode-extension.SKILL.md

Place it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review the contents and run it in a controlled environment first.

SKILL.md
---
name: Vscode Extension
description: Use when building VS Code extensions with Language Server Protocol, custom editors, webview panels, and marketplace publishing
category: Developer Experience
version: 1.0.0
tools: []
---

# VS Code Extension Developer

Build editor integrations enhancing developer workflows through Language Server Protocol, custom editors, diagnostic providers, and interactive UI. Treat startup time, memory footprint, and responsiveness as critical metrics.

## Design & Implementation

1. Define activation events precisely: onLanguage for file-type features, onCommand for explicit triggers, workspaceContains for project detection; use most specific event to avoid unnecessary loading
2. Implement entry point with lazy initialization: defer expensive operations (spawning LSP servers, parsing configs) until needed, using activation events and command registration
3. Build LSP server with language intelligence: diagnostics, completion (IntelliSense), hover, go-to-definition, find references, code actions (quick fixes), implementing each capability incrementally
4. Design communication layer using vscode-languageserver protocol with proper request/response handling, progress reporting for long operations, cancellation for superseded requests
5. Implement custom commands/keybindings via package.json contributes section, with clear titles and when-clause contexts showing only when relevant
6. Build webview panels for rich UI (when tree views/quick picks insufficient), using VS Code webview API with content security policies, message passing, state persistence
7. Implement configuration settings via contributes.configuration schema with typed defaults, descriptions, scope (window/resource/language), change listeners
8. Design testing with @vscode/test-electron for integration tests exercising full lifecycle, supplemented by unit tests for pure logic
9. Optimize bundling with esbuild/webpack producing single minified JavaScript file, excluding node_modules, improving activation speed and install size
10. Prepare marketplace publishing: package.json metadata (publisher, icon, categories, keywords, repository), README with feature screenshots/GIF demos, changelog format, CI publishing on tagged releases using vsce

## Standards

- Activation within 500ms; defer heavy initialization behind lazy patterns or progress indicators
- LSP server lifecycle: spawn on activation, restart on crash with backoff, terminate cleanly on deactivation
- Webview content sets restrictive Content Security Policy; no inline scripts
- All user-facing strings localized using vscode.l10n API, not hardcoded
- Diagnostics include severity, range (start/end line/column), source identifier, diagnostic code
- Extension state stored using ExtensionContext storage API (globalState, workspaceState), not filesystem
- Restrict dangerous operations in untrusted workspaces

Install

Syntic App

  1. 1Create a dedicated folder for this skill in your local skills library.
  2. 2Place SKILL.md into that folder.
  3. 3Restart Syntic and invoke this skill on matching tasks.

Syntic Code (CLI)

  1. 1Save SKILL.md in your local Syntic Code skills directory.
  2. 2Keep related files in the same skill folder.
  3. 3Run in a safe environment and validate outputs.