AgentKit
ReferenceCLI commands
BetaYou are reading docs for the beta channel (2.4.1-beta.1) — updated automatically on every beta release.Switch to stable →

CLI commands

ak skill repair

Rebuild a corrupted per-skill runtime env

When ak skill verify reports corrupt, this command tears down the per-skill record and re-installs from the live runtime block. Other states (ok / missing / unknown) are no-ops so this is safe to drive from a reconciliation loop.

Who it's for: Power devs, drift-reconciliation jobs, CI cache hygiene.

When to use it: After ak skill verify reports corrupt.

What changes on disk: Removes ~/.agentkit/skills/<kit>/<skill>/, then re-runs install. Holds an exclusive advisory lock at ~/.agentkit/skills/<kit>/<skill>.lock for the duration; concurrent repairs of the same skill conflict.

Usage

ak skill repair <kit>/<skill> [flags]

Examples

ak skill repair marketing/youtube
ak skill repair engineer/web-testing --kits-dir kits/

Flags

FlagDescription
-h, --helphelp for repair
--jsonEmit machine-readable JSON (implies --no-interactive)
--kits-dir stringKits directory (default: ./kits or $AGENTKIT_KITS_DIR)
--no-interactiveDisable interactive prompts (CI-safe)
-q, --quietSuppress non-error output on stderr
-V, --verboseExtra diagnostic output on stderr (loses to --quiet)
-y, --yesAssume yes for all prompts

Output modes

ModeBehavior
prettydefault on TTY (colors, ASCII markers)
plainauto when stdout piped or --no-interactive
json--json (single-object envelope, NDJSON-safe)

Exit codes

CodeMeaning
0success
1runtime error
2invalid flags
3user-cancel (SIGINT, prompt-cancel)
4skill has no runtime block
5kit or skill not found
  • ak skill — Manage per-skill runtime envs

On this page