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 audit scripts
Audit local kit hook and skill scripts
Read-only advisory audit for local AgentKit hook scripts and skill scripts. It scans file text for language, dependencies, entrypoints, and heuristic risk findings. It never executes scripts and does not block installs.
Who it's for: Power devs and maintainers reviewing local or bundled kit scripts.
When to use it: Run before installing or updating kits, or in CI to inspect advisory risk changes.
What changes on disk: Read-only. Bounded local file reads only; no network calls and no script execution.
Usage
ak audit scripts [path...] [flags]Examples
ak audit scripts --json
ak audit scripts ./kits/engineer ./kits/core --json
ak audit scripts ~/.claude/plugins/ak-engineer --no-interactiveFlags
| Flag | Description |
|---|---|
-h, --help | help for scripts |
--json | Emit machine-readable JSON (implies --no-interactive) |
--max-file-bytes int | Maximum bytes to read per script file |
--no-interactive | Disable interactive prompts (CI-safe) |
-q, --quiet | Suppress non-error output on stderr |
-V, --verbose | Extra diagnostic output on stderr (loses to --quiet) |
-y, --yes | Assume yes for all prompts |
Output modes
| Mode | Behavior |
|---|---|
pretty | default on TTY (colors, ASCII markers) |
plain | auto when stdout piped or --no-interactive |
json | --json (single-object envelope, NDJSON-safe) |
Exit codes
| Code | Meaning |
|---|---|
0 | success |
1 | runtime error |
2 | invalid flags |
3 | user-cancel (SIGINT, prompt-cancel) |
1 | scan failed (missing path, unreadable file, invalid root) |
2 | invalid flags |
Related commands
ak audit— Check installed kits for drift