AgentKit
DocsKitsCLI ReferenceDesktop App

ak skill

ak skill install

Add one skill to a kit's native Claude Code install, then provision its pinned Python or Node environment.

Use ak skill install to add one skill from a local kits tree to a kit you already installed natively for Claude Code, and to provision the skill's declared Python or Node environment.

Usage

ak skill install <kit>/<skill>

Exactly one canonical reference is required. The command reads <kits-dir>/<kit>/skills/<skill>/skill.yaml directly; the skill does not need to be listed in kit.yaml exports.

ak skill install marketing/youtube
ak skill install engineer/web-testing --kits-dir kits/
ak skill install engineer/ak-advise --kits-dir kits/ --yes

Option

FlagDefaultDescription
--kits-dir <dir>AGENTKIT_KITS_DIR or ./kitsSelect the local kits source.

Shared flags are described in CLI conventions. The command never prompts; --yes and --no-interactive do not change its mutation policy.

Add the skill to a native kit install

When the kit has an active global native Claude Code install, the command first adds the skill into it:

  • It writes only ~/.claude/skills/<skill>/.
  • It records the skill in the kit's ownership indexes under ~/.agentkit/adapters/claude-code/<kit>/.agentkit/.
  • It extends the kit's saved skill selection, so a later ak kit refresh keeps the skill.

This step holds the kit lifecycle lock. If a file in the skill directory holds edits AgentKit did not write, the command changes nothing and exits 6.

When the kit is delivered as a Claude Code plugin, the command prints a warning, skips this step, and manages only the runtime environment; run ak kit refresh <kit> to change the plugin's skills. Codex, project installs, and remote sources are not supported for this step yet. With no native install and no plugin, the command manages only the runtime environment.

What it writes for the environment

When the skill declares a runtime: block, the command then creates or refreshes its environment. A prompt-only skill that was added to the kit install has no environment, and that is not an error.

For a new runtime hash, AgentKit stages the environment beside the cache and renames it into place after the tools complete. It then writes the per-skill manifest atomically:

~/.agentkit/cache/<runtime-hash>/{venv,node_modules}/
~/.agentkit/skills/<kit>/<skill>/.manifest.json

A ready cache is reused. There is no backup or rollback snapshot, but a failed new cache population removes its staging directory. A legacy install.sh is not executed; when found, its path is reported as a warning on stderr.

Package and network policy

Python uses uv; Node uses pnpm. uv can also resolve the requested Python runtime before package installation. Package specs must be exact pins such as pypdf==5.1.0 or zod@3.24.1. AgentKit fixes package sources to public PyPI and npm, removes common registry override variables, rejects URL/VCS, local-file, flag-injection, and unsafe specs, and passes --ignore-scripts to pnpm.

Provisioning the environment does not contact the AgentKit kit registry and performs no account or entitlement check. Package-manager network access is still possible.

Output and automation

Success writes these lines to stderr; the first appears when the skill was added to the kit install, the second when an environment was provisioned:

[OK] <kit>/<skill> added to the <kit> Claude Code install (N written, M unchanged)
[OK] <kit>/<skill> env installed

With --json, a skill added to the kit install also prints a versioned envelope with kind: skill_install on stdout. An environment-only run still leaves stdout empty and has no JSON success envelope. JSON execution failures use a structured error envelope on stderr. Capture the two streams separately.

Exit behavior

ExitMeaning
0The skill was added to the kit install, the record was written, or a ready cache was reused. Opt-out and unsupported-only runtime declarations can also complete as no-ops.
1Parsing, path validation, tool execution, package policy, or filesystem work failed.
2The single reference was malformed, or flags were invalid.
4uv or pnpm was missing, the skill declared no supported runtime block, or another install holds the kit lifecycle lock.
5The local kit or skill manifest was not found.
6A skill file holds edits AgentKit did not write; nothing was changed.

Cobra rejects a missing or extra positional argument before the command's classified renderer; that path currently exits 1. Do not use it as an argument-validation contract.

Verify and recover

ak skill verify <kit>/<skill>

If installation fails, correct the declaration or tool dependency and rerun. Do not delete a shared cache hash until you have checked whether other skill records reference it.