Skip to content
SKILLS
Documentation menu

Publish

Publishing from Claude Code

Give Claude Code a scoped publishing token, keep it in the OS credential store, and publish with a dry run and your approval.

Claude Code can prepare, validate and publish an artifact for you through the skills CLI. It acts with a scoped token: enough to publish in your namespace, nothing more.

1. Create a publisher token

Ask for exactly the publishing scopes, your namespace, and an expiry:

ScopeWhy
artifacts:readRead your own private and draft artifacts
artifacts:createCreate an artifact in your namespace
artifacts:updateEdit summary, links, keywords, visibility
uploads:createBegin an upload and send the archive
releases:publishFinalize the upload into a release
releases:updateEdit release notes (content stays immutable)

This token cannot revoke releases, deprecate artifacts, create or list tokens, read the audit trail or moderate. Keep those for yourself in the dashboard.

Ways to create it:

  • Dashboard → Tokens → New token. The token is displayed once.
  • From an existing credential: skills auth token create --name claude-code-publisher --scopes artifacts:read,artifacts:create,artifacts:update,uploads:create,releases:publish,releases:update --namespace <yourns> --expires-in 90d --store — --store puts the new token straight into the credential store instead of printing it. The calling credential needs tokens:write and can only grant what it holds itself.
  • Registry operator, from the server, piped directly into the credential store so it never appears on screen:
ssh <node> 'cd ~/apps/skills-spboucher-ai && pnpm -s admin token create --user <email> --name claude-code-publisher --namespace <yourns> --expires-in 90d' \
  | skills login --token-stdin

Optionally restrict the token to an address range with --ip <CIDR>.

2. Store it where Claude Code can use it but not show it

skills login            # prompts with hidden input, checks the token, stores it
skills whoami           # shows the identity, scopes, namespaces and expiry — never the token

Lookup order used by the CLI:

  1. SKILLS_TOKEN in the environment of the process (for one-off, process-scoped use).
  2. The OS credential store: macOS Keychain (service skills-registry, account = registry host), or secret-tool on Linux.
  3. A 0600 file at ~/.config/skills/credentials.json, only if you opted in with --insecure-file.

Claude Code runs skills … commands; the CLI reads the credential itself. The token never needs to be in a prompt, a CLAUDE.md, an MCP description, a .env file or your shell profile, and it must not be put there.

3. Ask in plain language

Publish the citation-check skill in ./skills/citation-check to Skills as version 1.2.0, with README, changelog and release notes.

A well-behaved session then does this, and you should expect to see each step:

  1. Uses the directory you named. It does not go looking through your workspace for other things to publish.
  2. Reads the package: manifest, SKILL.md, scripts. It points out anything that looks like a secret, personal data, private research material or third-party proprietary content.
  3. Updates public documentation and metadata if you asked (README, CHANGELOG, version, compatibility).
  4. Validates: skills validate ./skills/citation-check.
  5. Dry run: skills publish ./skills/citation-check --visibility public --dry-run, and shows you the report: target, version, visibility, file list with sizes, skipped files, declared permissions, findings, checksum.
  6. Waits for your approval when it matters (see below).
  7. Publishes: skills publish ./skills/citation-check --visibility public. The CLI uploads the archive with its hash and the server validates and scans it.
  8. Verifies: fetches the published metadata, compares the checksum, checks the install instructions.
  9. Reports the exact URL and version. If the server refused or quarantined the release, it says so; it does not claim success before the API confirms it.

When your explicit approval is required

SituationWhy
First public release of an artifactIt becomes visible to everyone, permanently in the history
Changing visibilityExposes or hides the artifact
Changing declared permissions, or adding scripts or network useChanges what installers are agreeing to
Deprecating, archiving or revokingAffects people who depend on it (and needs scopes the publisher token does not have)

The API enforces confirmation for visibility and destructive actions: without an explicit confirmation flag it answers 428 confirmation_required. The CLI asks interactively; --yes answers on your behalf, so an agent should pass --yes only after you approved the dry run. Routine patch releases can be delegated under a policy you state in advance, for example: "patch versions of artifacts that are already public, with no change in permissions or file types, may be published after a clean dry run".

Private versus public material

The files next to a SKILL.md are not automatically meant for the public. Before the dry run, make the intended contents explicit:

  • Keep the package directory free of data, drafts, notebooks and credentials.
  • Use .skillsignore for anything that must stay local.
  • The dry-run file list is the release. If a file should not be there, stop and remove it.

Blocking checks catch common credential formats and files such as .env. They cannot recognise your confidential manuscript or a client's data.

Rotation, revocation and troubleshooting

skills auth status                 # is a credential stored, for which registry, when does it expire
skills auth token rotate           # new secret, same grants; stored automatically, never printed; the old one stops working
skills auth token revoke <id|prefix>

Rotate before expiry and whenever the token may have been exposed. If a token leaks, revoke it first, then review your audit trail in the dashboard.

SymptomMeaningFix
401 token_expiredPast its expiryCreate a new token and skills login
401 token_revokedRevoked or replaced by rotationskills login with the current token
401 invalid_tokenWrong or truncated token, or calling from an address outside the token's allowlistCheck skills auth status; re-login
403 insufficient_scopeThe action needs a scope this token lacks (the response names it)Do it from the dashboard, or issue a token with that scope
403 namespace_forbiddenThe manifest's namespace is not on this tokenFix the manifest name or use the right token
409 version_existsThat version is already publishedBump the version; releases are immutable
422 release_rejectedBlocking findingsRead the findings, fix, bump nothing, publish again
428 confirmation_requiredNeeds a human yesApprove, then rerun
429 rate_limitedToo many requests, or repeated failed authentications from your addressWait for the time in Retry-After

Exit codes of the CLI: 0 success, 1 error, 2 validation failed, 3 authentication or authorization problem.

Using MCP instead of the CLI

The registry MCP server offers the same publishing steps as tools. Archive bytes still travel by HTTP PUT, and the same token rules apply. The CLI is the simpler path for publishing because it packs, hashes, uploads and verifies in one command.

↑↓ to navigate · enter to open · esc to close