AgentKit
DocsKitsCLI ReferenceDesktop App
BetaYou are reading docs for the beta channel (2.13.0-beta.20). Features may change before the next stable release.Switch to stable →

ak skill

ak skill upgrade

Re-hash an edited runtime declaration, provision its new cache entry, and preserve old shared cache data.

Use ak skill upgrade after changing a skill's runtime: declaration.

Usage

ak skill upgrade <kit>/<skill>
FlagDefaultDescription
--kits-dir <dir>AGENTKIT_KITS_DIR or ./kitsSelect the local declaration to hash.

Upgrade semantics

The runtime hash covers normalized Python version/packages and Node version/packages. Package order does not affect it.

  • A matching manifest is a no-op.
  • A missing manifest behaves like first-time install.
  • A changed declaration provisions or reuses the new hash and atomically refreshes .manifest.json.
  • The old cache hash is preserved because other skills may use it.

This command does not ask a package registry for a newer release when the declaration is unchanged. Change the exact package pin in skill.yaml first. Provisioning uses the same fixed PyPI/npm sources and package-policy gates as ak skill install.

There is no prompt, dry-run, force, backup, rollback, or per-skill upgrade lock. A failed new-cache population cleans its staging directory, but the previous record remains unless the final manifest refresh succeeded.

Output and exits

Success writes [OK] <kit>/<skill> upgrade complete to stderr and leaves stdout empty, including under --json or --quiet.

ExitMeaning
0The new declaration is active, already matched, or runtime management was opted out.
1The existing manifest was unreadable, or validation, tool, package, or filesystem work failed.
2The reference or flags were invalid.
4A required tool was missing or the source skill has no runtime block.
5The source kit or skill was not found.

JSON errors use a structured envelope on stderr. Missing or extra positional arguments are rejected before classification and currently exit 1.

Verify the new record

ak skill verify <kit>/<skill>