skills/vscode-extension-publisher/SKILL.md
Publish VS Code extensions to the Visual Studio Marketplace. Use when asked to publish my extension, setup VS Code marketplace publishing, package vscode extension, create a publisher, setup PAT for vsce, automate extension releases with GitHub Actions, or need help with vsce commands. Don't use for building the extension features themselves, publishing to Open VSX (different marketplace), or PyPI/npm package release.
npx skillsauth add luongnv89/skills vscode-extension-publisherInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guides users through setting up, packaging, and publishing VS Code extensions to the Visual Studio Marketplace, including PAT/publisher setup, pre-flight validation, and CI/CD automation.
Before creating/updating/deleting files in an existing repository, sync the current branch with remote:
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"
If the working tree is not clean, stash first, sync, then restore:
git stash push -u -m "pre-sync"
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin && git pull --rebase origin "$branch"
git stash pop
If origin is missing, pull is unavailable, or rebase/stash conflicts occur, stop and ask the user before continuing.
Before anything else, validate the environment and project.
Run the bundled preflight script:
bash scripts/preflight-check.sh
This checks:
@vscode/vsce is installed globally (installs it if missing)package.json exists and has required fieldsIf the script is not available, manually verify:
node --version (requires v18+)npm --versionvsce --version — if missing, run npm install -g @vscode/vsceThe following fields are required for publishing:
| Field | Description | Example |
|---|---|---|
| name | Extension identifier (lowercase, no spaces) | "my-extension" |
| displayName | Human-readable name | "My Extension" |
| description | Short description | "Adds cool features" |
| version | Semver version | "1.0.0" |
| publisher | Your publisher ID | "my-publisher" |
| engines.vscode | Minimum VS Code version | "^1.80.0" |
| categories | Marketplace categories | ["Other"] |
Recommended fields for better marketplace presence:
| Field | Description |
|---|---|
| icon | Path to PNG icon (min 128x128px, no SVG) |
| repository | GitHub repo URL |
| license | License identifier (e.g., "MIT") |
| keywords | Search keywords (max 30) |
| galleryBanner.color | Hex color for marketplace banner |
| galleryBanner.theme | "dark" or "light" |
If any required field is missing, help the user add it to package.json.
If the user has never published before, guide them through PAT creation:
vsce-publish (or any descriptive name)Important: The PAT must have:
If the user doesn't have a publisher identity:
vsce login <publisher-id>
Make sure the publisher field in package.json matches the publisher ID exactly.
Create a .vsix package for testing before publishing:
vsce package
This generates a file like my-extension-0.0.1.vsix.
Test locally before publishing:
code --install-extension my-extension-0.0.1.vsix
If there are packaging errors:
"license" in package.jsonOnce testing is satisfactory, publish:
vsce publish
Version bump options:
vsce publish patch # 1.0.0 → 1.0.1
vsce publish minor # 1.0.0 → 1.1.0
vsce publish major # 1.0.0 → 2.0.0
vsce publish 1.2.3 # Set exact version
In git repos, vsce publish automatically creates a version commit and tag.
After publishing: The extension appears on the marketplace within ~5 minutes. Verify at:
https://marketplace.visualstudio.com/items?itemName=<publisher>.<extension-name>
If the user wants automated publishing, generate a GitHub Actions workflow.
Copy the template from assets/github-actions-publish.yml to the project:
mkdir -p .github/workflows
cp assets/github-actions-publish.yml .github/workflows/publish.yml
Then guide the user to:
VSCE_PAT:
VSCE_PAT, Value: the Azure DevOps PATv* (e.g., v1.0.0)git tag v1.0.0 && git push origin v1.0.0See references/publishing-guide.md for CI/CD customization options.
After completing each major step, output a status report in this format:
◆ [Step Name] ([step N of M] — [context])
··································································
[Check 1]: √ pass
[Check 2]: √ pass (note if relevant)
[Check 3]: × fail — [reason]
[Check 4]: √ pass
[Criteria]: √ N/M met
____________________________
Result: PASS | FAIL | PARTIAL
Adapt the check names to match what the step actually validates. Use √ for pass, × for fail, and — to add brief context. The "Criteria" line summarizes how many acceptance criteria were met. The "Result" line gives the overall verdict.
Pre-flight phase checks: Node.js available, vsce installed, package.json valid
Auth Setup phase checks: PAT configured, Publisher verified
Package phase checks: Extension packaged, Size reasonable, Manifest correct
Publish phase checks: Upload success, Marketplace live, CI/CD configured
User says: "I want to publish my VS Code extension to the marketplace"
Actions:
vsce loginvsce package and test locallyvsce publishResult: Extension live on VS Code Marketplace.
User says: "publish a new minor version of my extension"
Actions:
vsce publish minorResult: Version bumped and published (e.g., 1.0.0 → 1.1.0).
User says: "create a GitHub Actions workflow to auto-publish my extension"
Actions:
assets/github-actions-publish.yml to .github/workflows/publish.ymlVSCE_PAT secret to GitHub repogit tag v1.0.0 && git push origin v1.0.0Result: Extensions auto-publish on version tags.
Cause: PAT is invalid, expired, or has wrong scope. Solution:
vsce login <publisher-id>Cause: Another publisher owns this extension name.
Solution: Change the name field in package.json to something unique. The displayName can still be anything.
Cause: Marketplace prohibits SVG icons for security reasons.
Solution: Convert the icon to PNG format (minimum 128x128 pixels) and update the icon field in package.json.
Cause: Required fields are absent.
Solution: Run the preflight script to identify missing fields, then add them to package.json.
Cause: Too many items in the keywords array.
Solution: Reduce keywords to 30 or fewer entries.
Cause: The vscode:prepublish script in package.json failed.
Solution: Run the prepublish script manually to see the error:
npm run vscode:prepublish
Fix the underlying build issue before retrying.
documentation
Manage software releases end-to-end: bump version, generate changelog, tag, push, GitHub release, publish to PyPI/npm. Use when user asks to ship, cut a release, tag a version, or list changes since last tag. Skip routine commits and marketplace publishing.
development
Review UI for usability issues using Steve Krug's principles and produce a scannable report. Use when asked for a usability audit, UX review, or UI feedback on screenshots, URLs, or code. Don't use for visual/brand design critique, accessibility (WCAG) audits, or backend/API review.
development
Validate app/startup ideas with market, feasibility, commercial, and open-source competitor analysis. Use when asked to evaluate, validate, or score a product idea. Don't use for PRDs, go-to-market plans, or investor decks.
testing
Install local-first security hardening: pre-commit secret detection, offline dependency scans, static analysis, reports, and gated free CI. Use when hardening repos or adding security hooks. Don't use for incident response or cloud security reviews.