From akm CLI
Search, show, dispatch agents, and execute commands from an Agentikit stash directory. Use when the user wants to find or use tools, skills, commands, agents, or knowledge in their stash.
How this skill is triggered — by the user, by Claude, or both
Slash command
/akm CLI:agentikitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You have access to the `akm` CLI (Agentikit Manager) to manage extension assets from a stash directory.
You have access to the akm CLI (Agentikit Manager) to manage extension assets from a stash directory.
The stash directory is resolved using a three-tier fallback:
AKM_STASH_DIR (optional override)stashDir field in $XDG_CONFIG_HOME/akm/config.jsonSet the stash directory persistently with akm config set stashDir /path/to/stash (preferred). The AKM_STASH_DIR env var is only needed as a temporary override.
The stash directory contains:
Assets are resolved from multiple sources in priority order:
local) — your local stash directorysearchPaths in configakm addSearch paths let you share curated asset collections across projects without copying files. Configure them with akm config set searchPaths '["/path/a","/path/b"]'.
Assets are classified using a multi-signal matcher system that considers file extension, directory placement, parent directory name, and (for markdown files) content signals such as frontmatter fields and body patterns. This means assets can be correctly classified even if placed outside their canonical directory.
Refs use the format [origin//]type:name. Simple refs like script:deploy.sh search all sources. Origin-qualified refs like npm:@scope/pkg//script:deploy.sh or local//script:deploy.sh target a specific source.
Scan stash directories, auto-generate missing .stash.json metadata, and build a semantic search index.
akm index [--full]
Use --full to force a full reindex instead of incremental. Run this after adding new extensions to enable semantic search ranking.
Find assets using a hybrid search pipeline: semantic embeddings + TF-IDF ranking. Falls back to name substring matching when no index exists.
akm search [query] [--type skill|command|agent|knowledge|script|any] [--limit N] [--source local|registry|both]
The response includes hits (ranked results), plus diagnostic fields: timing (totalMs, rankMs, embedMs), warnings (string array of non-fatal issues), and tip (contextual usage hint).
ref, which you pass to akm show.id, action (contains install guidance), and curated fields.--source registry when the user is looking for installable community kits, or --source both to search everything at once.Retrieve the full content/payload of an asset using its ref from search results.
akm show <ref>
Returns type-specific payloads:
toc or section "..." as positional args to navigate, e.g. akm show knowledge:guide toc)All show responses include these common fields when using --detail full:
editable — boolean indicating whether the asset can be modified in placeeditHint — actionable guidance when editable is false (omitted when editable)origin — source origin identifier (null for working stash)action — suggested next action for the assetAt default detail level, show responses include: type, name, origin, action, description, plus type-specific content fields (prompt, template, run, setup, cwd, content, toolPolicy, modelHint, agent, parameters).
Show or update configuration stored at ~/.config/akm/config.json (XDG standard).
akm config list # Show current config
akm config get <key> # Get a config value
akm config set <key> <value> # Set a config value
akm config unset <key> # Remove a config value
akm config path # Show config file path
akm config path --all # Show all paths (config, stash, cache, index)
Common keys: stashDir, searchPaths, output.format, output.detail, embedding, llm, registries.
Discover and install kits from npm or GitHub registries.
akm search "deploy" --source registry # Search installable registry kits
akm registry search "deploy" --assets # Search registries including asset hits
akm add <package> # Install from npm, github, git, or local dir
akm clone <ref> # Copy an asset into the working stash for editing
akm list # List installed registry kits
akm remove <id> # Remove an installed kit
akm update [id] # Update one installed kit
akm update --all # Update all installed kits
Installed kits become searchable alongside local stash assets. Use --source registry with search to query only remote registries.
When the user wants to browse community kits:
akm search "<query>" --source registry.hits and use the id and action fields from registry results.akm add <id>.akm clone <origin-qualified-ref> to copy it into the working stash before editing.akm init will auto-install ripgrep to stash/bin/ if not already on PATH. Ripgrep is used for fast candidate filtering during search.
akm init (creates stash dirs, installs ripgrep)akm indexakm search "deploy" --type scriptakm show <ref>akm search "deploy" --source registryakm add <package> (optional)Default output format is JSON. The plugin always passes --format json --detail normal for consistent parsing.
You can dynamically spawn a stash agent to work on a task. The agent's prompt, tool constraints, and model preferences are defined in its markdown file and loaded at runtime.
akm show <agent-ref> returns JSON:
{
"type": "agent",
"name": "coach.md",
"path": "/stash/agents/coach.md",
"description": "Code review coach",
"prompt": "You are a code review coach. Focus on ...",
"toolPolicy": { "read": true, "edit": false, "bash": false },
"modelHint": "anthropic/claude-sonnet-4-5-20250514"
}
prompt (required) — the agent's system instructionstoolPolicy (optional) — boolean flags indicating which tool categories the agent should usemodelHint (optional) — preferred provider/model (advisory only in Claude Code)When the user asks you to dispatch, run, or use a stash agent:
Resolve the ref. If the user gives a direct ref (e.g. agent:coach.md), use it. Otherwise search:
akm search "<query>" --type agent --limit 1
Extract ref from the first hit in the hits array. Refs use the format [origin//]type:name (e.g., script:deploy.sh, npm:@scope/pkg//script:deploy.sh).
Fetch the agent payload:
akm show <ref>
Parse the JSON. Verify type is "agent" and prompt is non-empty. If validation fails, inform the user.
Compose the subagent prompt. Build a prompt that embeds the stash agent's persona and the user's task:
<agent-persona>
{value of the "prompt" field from akm show}
</agent-persona>
<tool-constraints>
{render toolPolicy as natural language, e.g.:
- "You may read files but must NOT edit files or run shell commands."
- If toolPolicy is absent, omit this section.}
</tool-constraints>
Task: {the user's task description}
Spawn the subagent using the Agent tool with subagent_type: "general-purpose" and the composed prompt.
Report results to the user. If modelHint was present, note that Claude Code does not support per-subagent model selection so it was not enforced.
User: "Dispatch the coach agent to review src/auth.ts"
You would run:
akm show agent:coach.md
Then spawn a general-purpose subagent with the coach's prompt embedded, tasked with reviewing src/auth.ts.
You can execute stash command templates by resolving them, rendering argument placeholders, and running the result.
akm show <command-ref> returns JSON:
{
"type": "command",
"name": "review.md",
"path": "/stash/commands/review.md",
"description": "Review a file for issues",
"template": "Review $1 for bugs, security issues, and code quality. Focus on: $ARGUMENTS"
}
template (required) — text with $ARGUMENTS (full arg string) and positional $1, $2, ... placeholdersGiven arguments "src/main.ts" --strict:
$ARGUMENTS → "src/main.ts" --strict (the full raw argument string)$1 → src/main.ts (first positional arg, quotes stripped)$2 → --strict (second positional arg)"double", 'single', `backtick`) are treated as a single argument with quotes removed.When the user asks you to run or execute a stash command:
Resolve the ref. If the user gives a direct ref (e.g. command:review.md), use it. Otherwise search:
akm search "<query>" --type command --limit 1
Extract ref from the first hit. Refs use the format [origin//]type:name.
Fetch the command payload:
akm show <ref>
Parse the JSON. Verify type is "command" and template is non-empty.
Render the template. Replace $ARGUMENTS with the full argument string and $1, $2, etc. with the corresponding positional arguments.
Execute the rendered text:
subagent_type: "general-purpose".Report results to the user.
User: "Run the review command on src/main.ts with --strict"
You would run:
akm show command:review.md
Then render the template replacing $1 with src/main.ts and $ARGUMENTS with src/main.ts --strict, and execute the resulting instruction.
Scripts in the stash can be executed directly. The akm show response includes a run field — a ready-to-execute shell command string.
When the user asks you to run or execute a stash script:
Resolve the ref. If the user gives a direct ref (e.g. script:deploy.sh), use it. Otherwise search:
akm search "<query>" --type script --limit 1
Extract ref from the first hit.
Fetch the script payload:
akm show <ref>
Parse the JSON. Verify type is "script" and run is non-empty.
Prepare the environment. If setup is present (e.g. bun install), run it first before executing run. If cwd is present, use it as the working directory.
Execute the command using the Bash tool with the run value:
# run examples:
# bash: cd "/path" && bash "/path/script.sh"
# bun (ts): cd "/path" && bun "/path/script.ts"
# node: cd "/path" && node "/path/script.js"
# python: cd "/path" && python "/path/script.py"
# powershell: powershell -ExecutionPolicy Bypass -File "/path/script.ps1"
Report results to the user.
User: "Run the deploy script"
You would run:
akm show script:deploy.sh
Extract the run field from the response and execute it with the Bash tool.
npx claudepluginhub itlackey/akm-plugins --plugin akmKnowledge base on Claude Code formats, patterns, and configurations for commands, agents, skills, hooks, memory, plugins, settings. Use for creating, improving, auditing components.
Guides Claude Code subagent development: agent files, YAML frontmatter, tool/model config, lifecycle/resumption, CLI/SDK usage, priority, built-in agents, troubleshooting via docs delegation.