3.0.0-beta.15). Features may change before the next stable release.Switch to stable →Skills
Operate the ak CLI safely with ak:ak
Run ak subcommands, disambiguate scope, prefer read-only inspection before mutation, and interpret --json envelopes without breaking user-owned state.
Use ak:ak when the next concrete action is running an ak subcommand or
interpreting its output. This Skill owns the safe operating model for the
control-plane CLI itself — not the flag reference, which stays authoritative
in ak <cmd> --help and the --json envelope.
Choose ak:ak for CLI operation
Use ak:ak when
- The next action is invoking an
aksubcommand (init,kit,skills,plan,journal,doctor,recover,self-update,login, …). - You need to disambiguate a read-only inspection from a mutating lifecycle command before it lands.
- You need to disambiguate project vs user/global scope, adapter, or delivery mode before a change hits somewhere unexpected.
- You need to interpret an
ak <cmd> --jsonenvelope.
Choose another Skill when
- Authoring or refining a Claude Skill — use
ak:skill-creator. - Writing or executing an implementation plan — use
ak:planorak:cook. - Writing a technical journal entry — use
ak:journal. - Choosing which installed Skill fits a task — use
ak:agentkit(task router). - Any kit-specific workflow already covered by its own Skill — use that Skill.
ak:agentkit decides which Skill runs. ak:ak runs the ak binary
itself.
Safe operating protocol
- Classify the requested operation and identify its project/user scope, Kit, runtime and delivery mode.
- Inspect the installed binary's version and command help. Reuse that evidence within the session while the binary, version and target are unchanged; inspect again after an update or target change.
- Use read-only status/validation before lifecycle changes. Inspect partial state before a retry; a retry within the existing authorized scope does not require repeated confirmation.
- Continue additive or safely reconcilable changes inside existing user authorization.
--yesand--no-interactiveare appropriate for authorized scripted work when supported by that command. A prompt is not the only mutation boundary; some writers act directly. - Destructive overwrite, reset, restore or removal needs explicit scope authorization and the supported preview/snapshot safeguards. Preserve unknown and modified files. Never combine
--forceand--fresh. When a--freshplan stops with listed risks and a risk token, show the user each risk and its files, and rerun with--accept-risks <token>only after the user accepts that exact list. A token covers only the project, target, and Kit whose plan printed it; never reuse it elsewhere or save it for later runs. Seeak kit init --fresh. - Report the exact command, scope, result and unresolved evidence. Use
--jsonfor machine-readable output.--quietoverrides--verbose; do not rerun a mutation merely to obtain verbose logs.
Command families by task
- Bootstrap and setup —
ak init,ak new,ak setup,ak onboard. All mutating; confirm intended kit and scope first.ak setupwrites user config only.ak onboardruns setup, CLI login, then kit install. Basic setup preserves stored telemetry consent and does not ask about it; change consent explicitly throughak setup, not as an onboarding prerequisite. - Kits —
ak kit init|install|refresh|validate|uninstall|list-kits|repair-install-mode.list-kitsandvalidateare read-only; the rest mutate. - Skills — inventory (
ak skills list|show|search|install|remove|graph) and per-skill environment (ak skill install|remove|repair|upgrade|verify). - Agents, content, commands — mirror the skills shape: reads (
list,show,search), writes (install,remove), and one domain-specific mutating action per group. - Plans and journals — file-first plan and journal management.
ak plan list|show|status|search|validate|resolve|parseare read-only.ak plan create|check|uncheck|add-phase|update|use|archive|close|reindex|migratemutate.ak plan kanbanis a diagnostic TUI.ak journal list|show|validateread;ak journal createwrites. - Diagnostics —
ak describe,ak doctor,ak activity,ak audit,ak sessions,ak analytics,ak backups,ak versions,ak changelog,ak diagnostics export. Mostly read-only;enable/disable/deleteunderanalyticsandcontent-searchmutate.ak describe <cmd> --jsonreturns a command's flags, exit codes, and agent contract offline. - Improvement work —
ak insights work listis read-only.work createwrites a scoped plan in a registered project, andwork defer|dismiss|awaiting-verification|verifypersist local lifecycle state; classify them as mutating.verifycompares recorded evidence and never runs a model or edits an artifact. - Shadow decision comparison —
ak eval decision <request.json|->runs an explicit shadow comparison. Treat it as mutating: enabled calls send data externally and may incur charges, even though it writes no local report. It requires user-scopesemantic_decisionconsent, and project config can only restrict it. Credentials resolve from the process environment, then the AgentKit home.env, never a project.env. Never enable it from an ambient credential or as part of ordinary routing. Checkstatus,fallback_reason, and provenance; the effective decision always remains the supplied legacy decision. See theak eval decisionreference. - Workflow, triage, and UI experiments —
ak eval workflowvalidates scenario, fix, or debug decision facts in the defaultoffmode;--mode shadowalso requires explicitworkflow-controllerconsent and may incur charges.ak eval triagecompares shadow finding triage with authoritative review decisions, andak eval uireports opt-in shadow UI regression signals, which in shadow mode need explicitui-regressionconsent. Classify all three as mutating. Effective actions, review authority, and deterministic test outcomes stay unchanged.ak eval workflow-benchmark,ak eval triage-benchmark, andak eval ui-benchmarkevaluate local labeled evidence offline and are read-only. - Test impact —
ak test optimize --base <ref> --jsonplans without executing checks, but classify it as mutating:--runexecutes trusted repository commands and--outputcreates a new receipt. Semantic mode defaults to off; explicitly granted modes can send compact facts externally and incur charges, shadow keeps the baseline, and advisory only adds checks.ak test classify-e2eneeds its own consumer grant, may incur charges, and never edits the class manifest.ak test benchmarkis mutating because it executes a trusted regression corpus in isolated temporary workspaces;--semantic-replaystays offline. - Secrets —
ak secretslist,get,export, andrecovery listare read-only.set,delete,rotate,import-env,approve,audit,grant,grants,revoke,trust, andrecovery accept-rollback|add|init|removeare classified as mutating. - Runtime orchestration — inspect installed
ak orchestrate --helpfirst.proberuns bounded version/help checks and writes an owned metadata cache; it does not prove authentication or invoke inference.prepare,advance, andacceptpersist resolved job, attempt, and artifact evidence.events,output, anddiagnoseinspect recorded evidence;plan-statusand lifecyclestatus/resumemay persist reclassification. External process supervision requires Darwin. Diagnostic bundles exclude private argv and environment. - Recovery —
ak recover,ak backups restore. Mutating and irreversible without a priorak backups create. - Watch and daemons —
ak watch start|stop|status|dry-run,ak content schedule daemon,ak codex-agent-runtime serve,ak api start|stop|status,ak config start|stop|status. - Config, auth, and MCP —
ak config prefs resolve|set|unset|validate, top-level auth (ak login,ak logout,ak whoami,ak licenses), andak mcp add|link|list|remove|show|verify. Auth commands are top-level, not under anak authparent. Email OTP login needs an interactive terminal; for scripted or headless login, use the API-key route instead of piping a code. - Self-update and migrations —
ak self-update,ak migrate prefs|rollback. Runak versionsand checkak changelogbefore invoking. - Background auto-update —
ak update --schedule daily|weekly|off,--project/--no-project, and--ackare settings flags: mutating (they writeauto_update:in~/.agentkit/config.yaml), but they apply no update themselves.ak update --statusis read-only. A background project step reconciles only the trackedkits/tree; an attendedak update <dir> --yesalso refreshes every installed project runtime (--target a,bnarrows them). Never turn on a schedule or opt in a project without an explicit user request.
Source of truth
The generated command appendix carries a version stamp. If it lags behind
ak --version, treat it as a starting hint and re-check flags with
ak <cmd> --help when the binary, version, target, or command contract changes. ak self-update advances the
binary independently of installed skill content, so version skew is normal
after self-update and before the next ak update refresh.
Authoritative surfaces, in order:
ak <cmd> --helporak describe <cmd> --json— always current for the running binary. See the command contract.ak <cmd> --jsonoutput — read its declared framing fromak describe: versioned envelope,ndjson,protocol, orjson-legacy;unspecifiedmeans unknown.- The Skill's bundled command reference — starting index, may lag.
Anti-patterns
- Do not combine
--forcewith--freshon any lifecycle command. - Do not run installer, refresh, migration, uninstall, or destructive smoke tests against real maintainer state. Set a temporary AgentKit home first.
- Do not invent flags not present in
ak <cmd> --help. The Cobra metadata is authoritative. - Do not treat a source-only capability as active in the installed binary.
Confirm via
ak versionsorak doctor. - Do not infer adapter capability from another adapter.
- Do not report a mutating command's outcome without the resolved scope — say project vs global, adapter, and any conflict skipped.
Related Skills
ak:agentkit— task router (which Skill runs).ak:skill-creator— author Claude Skills.ak:plan— implementation plan lifecycle.ak:journal— technical journal entries.
For effectiveness and local usage, see ak insights, ak eval and ak usage. Collection, evaluation, consent and contribution have different effects; inspect each command before invoking it.