Capability Discovery
The pipeline should never invent tools. Before drafting a kit that references
GitHub Actions, Supabase, Codex, or any other external dependency, check what
actually exists.
What we detect
- CLI tools on $PATH:
gh, git, node, go, rustc, cargo,
python3, pip, docker, vercel, supabase, firebase, wrangler,
ffmpeg, playwright, codex, graphify.
- MCP servers: parsed from
.mcp.json in the project root and
~/.claude.json (user level).
- Claude Code plugins: parsed from
~/.claude/plugins/installed_plugins.json.
- Codex: presence of the
codex CLI (enables peer-review commands).
- Knowledge graph: presence of
graphify-out/graph.json (enables the
graphify-integration skill).
Running discovery
node "${CLAUDE_PLUGIN_ROOT}/scripts/cavekit-tools.cjs" discover
Writes .cavekit/capabilities.json:
{
"discovered_at": "2026-04-17T14:22Z",
"cli_tools": {
"gh": true, "git": true, "node": true, "codex": false
},
"mcp_servers": ["codex-reviewer", "graphify"],
"plugins": [],
"codex": { "available": false }
}
How other commands use it
/ck:sketch — reads capabilities before proposing integrations. If a
kit would need a missing tool, it either adds a "Setup" task to the build
site or asks the user whether to proceed without it.
/ck:map — flags tasks that depend on missing capabilities as
blocked: setup-required.
/ck:make — refuses to dispatch subagents that require a missing MCP
server.
/ck:check — includes a "Capability Coverage" section in the inspect
report.
When to re-run
- After installing a new CLI tool.
- After adding or removing an MCP server.
- At the start of every new project (via
/ck:init).
- Whenever a task fails with "command not found".
The file is cheap to regenerate — always discover, never guess.
What we deliberately do not detect
- Network-accessible APIs behind credentials. Availability is not reachability;
kits should record credentials as a separate concern (never committed).
- IDE extensions. They are not scriptable from the loop and would create false
assurances.
- Language versions. Version-pinning is the project's responsibility
(package.json / go.mod / pyproject.toml); discovery only confirms
executables exist.
1---2name: capability-discovery3description: Detect which MCP servers, Claude Code plugins, and CLI tools are available in the current environment, so kits and build sites can bind to real capabilities instead of imagined ones. Runs via /ck:init --tools-only or `cavekit-tools.cjs discover`. Writes .cavekit/capabilities.json. Trigger phrases: "what do we have available", "what's installed", "detect tools", "can we use X", "setup tools".4---56# Capability Discovery78The pipeline should never invent tools. Before drafting a kit that references9GitHub Actions, Supabase, Codex, or any other external dependency, check what10actually exists.1112## What we detect1314- **CLI tools on $PATH**: `gh`, `git`, `node`, `go`, `rustc`, `cargo`,15 `python3`, `pip`, `docker`, `vercel`, `supabase`, `firebase`, `wrangler`,16 `ffmpeg`, `playwright`, `codex`, `graphify`.17- **MCP servers**: parsed from `.mcp.json` in the project root and18 `~/.claude.json` (user level).19- **Claude Code plugins**: parsed from `~/.claude/plugins/installed_plugins.json`.20- **Codex**: presence of the `codex` CLI (enables peer-review commands).21- **Knowledge graph**: presence of `graphify-out/graph.json` (enables the22 `graphify-integration` skill).2324## Running discovery2526```bash27node "${CLAUDE_PLUGIN_ROOT}/scripts/cavekit-tools.cjs" discover28```2930Writes `.cavekit/capabilities.json`:3132```json33{34 "discovered_at": "2026-04-17T14:22Z",35 "cli_tools": {36 "gh": true, "git": true, "node": true, "codex": false37 },38 "mcp_servers": ["codex-reviewer", "graphify"],39 "plugins": [],40 "codex": { "available": false }41}42```4344## How other commands use it4546- **`/ck:sketch`** — reads capabilities before proposing integrations. If a47 kit would need a missing tool, it either adds a "Setup" task to the build48 site or asks the user whether to proceed without it.49- **`/ck:map`** — flags tasks that depend on missing capabilities as50 `blocked: setup-required`.51- **`/ck:make`** — refuses to dispatch subagents that require a missing MCP52 server.53- **`/ck:check`** — includes a "Capability Coverage" section in the inspect54 report.5556## When to re-run5758- After installing a new CLI tool.59- After adding or removing an MCP server.60- At the start of every new project (via `/ck:init`).61- Whenever a task fails with "command not found".6263The file is cheap to regenerate — always discover, never guess.6465## What we deliberately do not detect6667- Network-accessible APIs behind credentials. Availability is not reachability;68 kits should record credentials as a separate concern (never committed).69- IDE extensions. They are not scriptable from the loop and would create false70 assurances.71- Language versions. Version-pinning is the project's responsibility72 (package.json / go.mod / pyproject.toml); discovery only confirms73 executables exist.