/typefox-agent-skills:publish-vscode-extensionfrom typefox-agent-skills
Publishes VS Code extensions to the Marketplace and/or Open VSX Registry. Covers packaging, token setup, CI configuration, and troubleshooting.
Ships in typefox-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
There are two registries where VS Code extensions live:
@vscode/vsce.ovsx.Most production extensions publish to both. The same .vsix works on either registry — package once, publish twice. Don't publish only to Marketplace; non-Microsoft VS Code distributions can't see those extensions.
Match the user's intent — most sessions are prepare, not publish:
vsce/ovsx is the exception.Follow in order; do not skip ahead until each step's done when is met:
vsce package, then inspect with vsce ls. Done when: <name>-<version>.vsix exists and the file list has no src/, .git/, or full node_modules/ tree.[ -n "$VSCE_PAT" ] / [ -n "$OVSX_PAT" ] without printing values) and the user has publisher/namespace identity on each registry (ask before minting tokens if unknown)..vsix to each registry. Done when: every target vsce publish --packagePath … / ovsx publish … exits 0.VS Code extensions are not sandboxed — they run with the IDE's full privileges (files, processes, network). A publish token lets anyone push code that auto-updates on every install. Treat publishing like deploying malware-capable software: release from CI on protected branches/tags, not from a laptop; minimize activation scope and dependencies; and assume a stolen token is a full compromise until revoked.
When more context is needed, load:
references/manifest.md — the full package.json extension manifest: every required, recommended, and runtime field, the allowed categories list, marketplace presentation fields (galleryBanner, preview, badges, pricing, sponsor, qna), runtime fields (main, browser, activationEvents, contributes, capabilities, extensionKind), dependency fields (extensionDependencies, extensionPack), validation gotchas, and a security review checklist. Read whenever you're editing package.json, troubleshooting "field X was rejected" errors, or auditing an unfamiliar extension's manifest.references/vscode-marketplace.md — Azure DevOps PAT, publisher creation, vsce commands, verified publisher, unpublishing, common 401/403 errors. Read whenever a step involves Marketplace authentication, publisher identity, or vsce-specific flags.references/open-vsx.md — Eclipse account setup, the Publisher Agreement, access tokens, namespace ownership and the "unverified" warning, ovsx commands, CI integration. Read whenever a step involves Open VSX, namespaces, or ovsx.references/bundling.md — why and how to bundle the extension with esbuild or webpack, wiring into vscode:prepublish, externalizing the vscode module, Web Extension targets, .vscodeignore for bundled extensions. Read whenever the extension isn't bundled yet, ships to Web hosts (vscode.dev, github.dev), is unexpectedly large, or has a slow activation time.If the user hasn't said, default to both registries and tell them. Only skip Open VSX if the extension explicitly depends on proprietary Marketplace-only APIs or telemetry inappropriate for open-source distributions — and even then, say so explicitly.
Install Node.js, then install the publishing CLIs:
npm install -g @vscode/vsce ovsx
vsce (the "VS Code Extension manager") is the canonical packager. ovsx reuses vsce internally for packaging-from-source, so installing both is the normal setup. npx @vscode/vsce / npx ovsx also work if you'd rather not install globally.
Before publishing anywhere, make sure the extension is publish-ready. These are the same requirements for both registries — the registries reject or downrank extensions that fail them.
package.json manifestA minimal publish-ready manifest looks like:
{
"name": "extension-name",
"displayName": "Human Readable Name",
"description": "One sentence about what this extension does",
"version": "0.0.1",
"publisher": "<publisher-id-or-namespace>",
"engines": { "vscode": "^1.84.0" },
"categories": ["Other"],
"keywords": ["tag1", "tag2"],
"icon": "icon.png",
"repository": { "type": "git", "url": "https://github.com/user/repo" },
"license": "MIT",
"bugs": { "url": "https://github.com/user/repo/issues" },
"homepage": "https://github.com/user/repo#readme"
}
Four required fields: name, version, publisher, engines.vscode. Everything else is technically optional but the registry listing will look broken without displayName, description, categories, icon, repository, and license.
Two cross-cutting things to know up front:
publisher is the same string on both registries by convention, but they're two independent identity systems — registering acme on Marketplace does not reserve acme on Open VSX, and vice versa. Register both names early to avoid squatters.engines.vscode must be a real published VS Code version range (e.g. ^1.84.0). Wildcards (*) are rejected.For every other field and validation gotcha, read references/manifest.md.
README.md — rendered as the extension's marketplace landing page on both registries. Images in it must use absolute HTTPS URLs, not relative paths (the registries serve the README from a different origin).LICENSE — required for unambiguous licensing. Match the license field in package.json (SPDX identifier like MIT, Apache-2.0).CHANGELOG.md — rendered as the "Changelog" tab. Conventional format is Keep-a-Changelog..vscodeignore — exclude files from the .vsix (glob per line). Source TypeScript, tests, configs, and node_modules/ dev deps should not ship. Example:
.vscode/**
.vscode-test/**
src/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
!out/**/*.js
vsce automatically excludes devDependencies declared in package.json, so you don't need to list them.Extensions are npm projects — vsce package runs vscode:prepublish, which executes whatever the build pulls in. Commit package-lock.json and run npm ci in CI (not npm install). Consider project-level .npmrc with ignore-scripts=true during install to block lifecycle-hook attacks; re-enable only if the build genuinely needs install scripts. Verify AI-suggested npm packages exist on the registry before adding them.
Build the .vsix from the extension root:
vsce package
This runs vscode:prepublish, validates the manifest, and produces <name>-<version>.vsix. Always run vsce ls on the artifact before any registry sees it — shipped node_modules/ or .git/ is hard to undo.
If the extension isn't bundled, vsce package will warn and the resulting .vsix typically ships the full node_modules/ tree — large, slow to activate, and unusable in Web hosts like vscode.dev and github.dev. Bundling is strongly recommended before the first publish; see references/bundling.md for esbuild and webpack setup.
When publishing to both registries, build one .vsix with vsce package, then upload that exact file to each registry — never vsce publish and ovsx publish from source separately (two from-source builds can diverge; one artifact is inspectable with vsce ls before either registry sees it).
vsce package # produces <name>-<version>.vsix
vsce publish --packagePath <name>-<version>.vsix # → Marketplace
ovsx publish <name>-<version>.vsix # → Open VSX, same file
vsce publish / ovsx publish without a path package-and-publish in one step — only for a single registry. Dual-registry publishes always go through a shared .vsix.
If you don't know whether the user already has a Marketplace publisher or Open VSX namespace, ask before walking them through token creation — registering a publisher is a permanent ID claim.
Publishing requires two long-lived bearer credentials — a Marketplace PAT issued by Azure DevOps and an Open VSX token issued by open-vsx.org. Both are equivalent in power to an npm publish token: anyone holding one can push code that runs on every install of every extension under that identity. The agent's handling of these values is the security boundary, so treat this section as a precondition for every publish step below.
If the user pastes a token directly into the prompt — stop before running anything. The token is now in the conversation transcript, which may be persisted, logged, or replayed. Tell the user to:
export VSCE_PAT=... for Marketplace.export OVSX_PAT=... for Open VSX.Do not proceed using the pasted value.
Otherwise, expect the tokens to live in environment variables and let the CLIs pick them up by name. Both tools already read these names natively, so the command line should contain neither the token value nor an explicit -p flag with the variable substituted in:
vsce reads VSCE_PAT automatically; just run vsce publish ….ovsx reads OVSX_PAT automatically; just run ovsx publish ….If the user wants to keep different names (e.g., for a multi-publisher setup), reference them by name (-p "$MY_PAT"), never by value. Do not echo, log, write to a file, paste into a commit, or include the value in the summary reported back to the user.
Before running anything that needs a token, confirm the variable is actually set in the same shell that will run the tool — [ -n "$VSCE_PAT" ] and [ -n "$OVSX_PAT" ], do not print the value. A token exported in another terminal won't be visible here. If a variable is missing, ask the user to set it; do not ask them to paste it.
If the agent harness has a built-in secret/credential mechanism (an injected env var, a secret-resolution step, etc.), prefer that over a plain shell variable.
The vsce login / ovsx login flows store tokens in the OS keychain after an interactive prompt. That path is fine when the user is running the CLI on their own machine — the value never enters the chat. It is not appropriate when the agent is doing the publishing, because the agent can't usefully interact with a Password: prompt and shouldn't be feeding the value into one anyway. Use the env-var path instead.
Publisher account hygiene: enable 2FA on the Microsoft account (Marketplace), GitHub account (Open VSX login), and Eclipse account. Use single-purpose tokens with the narrowest scope; rotate on schedule (Open VSX tokens never expire — treat that as higher risk). Audit Marketplace publisher members and Open VSX namespace members periodically; CI tokens should be Contributor, not Owner, on Open VSX.
With tokens confirmed (see above) and the .vsix already built and inspected — package once, publish twice:
vsce publish --packagePath <name>-<version>.vsix
ovsx publish <name>-<version>.vsix
If the .vsix doesn't exist yet, run vsce package and vsce ls first (see Package once).
Both commands accept the same .vsix because the registries treat it as an opaque artifact; the manifest inside the zip identifies which <publisher>.<name>@<version> slot it belongs to on each side.
Both registries enforce monotonically increasing SemVer per extension. You cannot republish the same version — bump first.
vsce can do the bump-commit-tag for you on a clean git tree:
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.5.3 # explicit version
vsce publish minor -m "Release v%s" # custom commit message
ovsx doesn't have a version-bumping mode — let vsce handle the bump, then point ovsx at the resulting .vsix.
Both registries support a pre-release channel that's installed only when the user opts in (or runs VS Code Insiders):
vsce package --pre-release
vsce publish --pre-release
ovsx publish <file> --pre-release
Requires engines.vscode >= 1.63.0. The convention is odd minor numbers for pre-release, even minor numbers for release (e.g. 0.3.* pre-release, 0.4.* release) — this avoids the pre-release and stable channels colliding when SemVer compares them.
If the extension ships native binaries (a debug adapter, a language server in Rust/Go, native node modules), build and publish one .vsix per platform:
vsce package --target win32-x64
vsce package --target darwin-arm64
# … repeat for each target, then publish each artifact
vsce publish --packagePath ./pkgs/*.vsix
ovsx publish ./pkgs/*.vsix
Available targets: win32-x64, win32-arm64, linux-x64, linux-arm64, linux-armhf, alpine-x64, alpine-arm64, darwin-x64, darwin-arm64, web. A .vsix without --target is treated as universal and installable everywhere.
Prefer TypeFox/gh-publish-npm for CI — it packages once with project-local vsce/ovsx (from devDependencies, not fetched at publish time), publishes the same .vsix to Marketplace and Open VSX, skips registries that are already up to date, and masks tokens in logs. Add @vscode/vsce and ovsx to devDependencies. Pin the action to a full commit SHA, not a floating tag.
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- run: npm ci
- uses: TypeFox/gh-publish-npm@<commit-sha>
with:
vscode-packages: . # newline-separated paths for monorepos
vsce-token: ${{ secrets.VSCE_PAT }}
ovsx-token: ${{ secrets.OVSX_PAT }}
Trigger on tag push (v*) from a protected branch with required PR review — not on every merge, and not from a developer machine. For manual or single-registry publishes, use the vsce package + vsce publish / ovsx publish commands above instead.
evals/evals.json (opens in a new tab)evals/files/ci-logs/publish-error.log (opens in a new tab)evals/files/fastbelt-vscode/package.json (opens in a new tab)evals/files/langium-vscode/README.md (opens in a new tab)evals/files/langium-vscode/package.json (opens in a new tab)evals/files/open-collaboration-vscode/package.json (opens in a new tab)evals/files/unbundled-markdown-toolkit/package.json (opens in a new tab)references/bundling.md (opens in a new tab)references/manifest.md (opens in a new tab)references/open-vsx.md (opens in a new tab)references/vscode-marketplace.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub typefox/agent-skills --plugin typefox-agent-skills7 skills in this plugin
/agent-experienceMake a code repository agent-ready with state-of-the-art AX (Agent Experience): audit and set up AGENTS.md / CLAUDE.md and agent docs, wire verification sensors with self-correction messages, and build docs-as-memory (architecture docs, ADRs, exec plans). Use when the user wants to make a repo agent-ready or AI-friendly, onboard coding agents, create/review/improve AGENTS.md, CLAUDE.md, or other agent instruction files, set up a project for agent-first development, asks why an agent keeps repeating a mistake, asks any AX question (general or project-specific), or mentions "harness engineering", "agent readiness", "context engineering" (its repo-side slice), or "AX". Not for building agent runtimes or orchestration code, nor for authoring a single agent skill — use skill-creator for that./eclipse-license-checkVet third-party dependencies for an Eclipse Foundation project with the Eclipse Dash License Tool — license checks, "do I need to vet X?" questions, IPLab review filing, and release IP due diligence. Use whenever the user mentions Eclipse license checking, dash-licenses, the Dash License Tool, IPLab, third-party content for an Eclipse release, or dependency approval under the Eclipse IP Policy, even if they don't name the tool. Do not use for non-Eclipse projects or general license advice unrelated to the Eclipse IP Policy./go-documentationWrite idiomatic Go doc comments that render correctly on pkg.go.dev — package comments, `doc.go`, exported-symbol comments, testable `Example` functions, deprecation notices — and publish or debug modules on pkg.go.dev (`pkgsite`, the module proxy). Use when writing or reviewing Go documentation, or when a developer used to writing JSDoc/TSDoc/Markdown is unsure how Go doc comments differ. Not for general Go programming or non-Go languages./idiomatic-goApply Go community idioms for API and package design, error and concurrency patterns, naming (initialisms, stutter, receivers), generics vs interfaces, and Go code review — including PR or diff review, questions about "the Go way", pointer vs value receivers, channels vs mutexes, and building Go language tooling (parsers, language servers/LSP, type checkers, validators, DSLs, or toolkits built on a Go language framework) — even when the user doesn't say "idiomatic." Skip trivial one-line Go edits with no design choices. Do not use for godoc or doc comments — use the `go-documentation` skill./skill-evalsRun the eval loop that measures whether a skill actually improves an agent's output — design test cases, run them with the skill and against a baseline, grade against assertions, aggregate a benchmark, analyze patterns, and iterate. Use when the user wants to evaluate or test a skill, check whether a skill helps, run skill evals, benchmark a skill against a baseline, grade skill outputs, or iterate on a skill from eval results. Builds on the skill-creator skill for the mechanics; stop if skill-creator is unavailable./write-like-meRewrite AI-generated text so it reads in the user's own writing voice, driven by a style profile extracted from the user's hand-written documents — or, on explicit request with named documents, build that profile. Use whenever the user asks to make a draft sound like them, match their style, voice, or tone, "de-AI" or humanize agent-written text (with their profile, or on explicit request without one), post-process a draft before publishing it under their name, polish text they wrote themselves for consistency with their own style, or wants their writing style extracted or profiled from their own posts, emails, or docs — even when they don't say "style". Not for editing content, fixing grammar, writing new text from scratch, or imitating other people's or public authors' voices.