/kapso:kapso-setupfrom kapso
Installs and configures the Kapso development environment from scratch: detects existing tools, installs leeroo-kapso package and coding-agent CLIs, handles logins and keys, and verifies with kapso doctor.
Ships in kapso. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
From a bare machine to kapso doctor build green, in under five minutes, with at
most three questions and two links to click. Detect first, in silence; ask only what
the environment cannot answer; never print a key or a token.
Run these and read them, without narrating each one:
node --version; python3 --version; git --version
command -v uv uvx pipx kapso kapso-mcp claude codex
claude auth status 2>&1 | head -3
codex login status 2>&1 | head -3
ls -a .env kapso-config.yaml harness.yaml 2>/dev/null
What you learn: the runtimes, which install method the machine has (uv first,
pipx second, pip into the active environment last, never the global Python),
whether kapso and kapso-mcp are on PATH and from one install (kapso --version
and kapso-mcp --version agree), which CLIs exist and are logged in, which keys
.env names (read the names only, with grep -o '^[A-Z_]*='; a
CLAUDE_CODE_OAUTH_TOKEN there is Claude Code's login as far as Kapso's sessions
are concerned, whatever claude auth status says), whether the project has a
kapso-config.yaml or a harness directory.
The package, pinned to this plugin's version:
uv tool install "leeroo-kapso==0.9.0" # else: pipx install "leeroo-kapso==0.9.0"; else, in the active venv: pip install "leeroo-kapso==0.9.0"
uv tool install "${CLAUDE_PLUGIN_ROOT}/.." (the
marketplace clone is the repository); on Codex uv tool install "leeroo-kapso @ git+https://github.com/Leeroo-AI/kapso@redesign". Then kapso --version must
print the plugin's version.uv nor pipx present: install uv the way its site says
(curl -LsSf https://astral.sh/uv/install.sh | sh), then the line above.kapso is an unrelated tool that shadows the command: if
pip show kapso finds it, pip uninstall -y kapso first.~/.local/bin is not on it (export PATH="$HOME/.local/bin:$PATH").npm install -g @anthropic-ai/claude-code @openai/codex (Node 18+; a global install that needs root goes to
--prefix "$HOME/.local" instead). Kapso sends every model call through them;
there is no API-key fallback for generation.Run the doctor line of step 6 first: a CLI whose row is green needs no login (a token
in .env counts). For each CLI the doctor reports as not logged in, give the user the
command to run in their own terminal, claude auth login or codex login
(codex login --device-auth on a machine without a browser), and wait for their word:
a login started from a tool call ends with the call, and its link stops working.
Re-check both statuses before going on.
On Codex, add Kapso's MCP server to the user's config in this session, whether or
not the doctor's rows are green — a green install says nothing about the server,
and a session without it has no build, status or bank tools and does not say why.
Run both lines, then codex mcp list must show a kapso row; a list without one
is a setup that is not done, said to the user as such. Give the server two minutes to
start: Codex drops a server that has not answered within ten seconds, and
kapso-mcp imports the package first, which a busy machine can stretch past that.
codex mcp add kapso -- kapso-mcp
python3 -c 'import os, pathlib; p = pathlib.Path(os.environ.get("CODEX_HOME", pathlib.Path.home() / ".codex")) / "config.toml"; t = p.read_text(); h = "[mcp_servers.kapso]\n"; p.write_text(t.replace(h, h + "startup_timeout_sec = 120\n", 1)) if "startup_timeout_sec" not in t.split(h, 1)[1].split("\n[", 1)[0] else None'
On Claude Code the plugin's own entry runs kapso-mcp and needs nothing. A host
starts its MCP servers once per session, so the tools installed in this step reach
this session after a reconnect (/mcp on Claude Code) or in the next session (Codex).
Ask only for what the user's next step needs, write each to .env in the project
root with printf 'NAME=value\n' >> .env, and never print a value back:
LEEROOPEDIA_API_KEY (recommended): a hosted knowledge base of ML and AI
frameworks the campaigns consult; a new account at
https://app.leeroopedia.com/dashboard comes with $20 of free credit.OPENAI_API_KEY (optional): embeddings only, for an ingested corpus and semantic
search over past experiments; generation never uses it.The user has neither: continue, and say which doctor row would report it.
kapso doctor build --json --config kapso-config.yaml
(Without the flag when the project has no kapso-config.yaml yet: the packaged
config is the default.) Read the JSON: every row with "required": true must be "ok": true; fix what a
failing row's fix says and run it again. Rows with "required": false are optional
and name what they would enable; leave them unless asked. Use the next verb's rows
(build first), never the union: kapso doctor alone asks for the stores an ingest
needs. Offer kapso doctor build --models --config kapso-config.yaml, which spends a
few tokens to confirm each configured model answers.
kapso harness list --config kapso-config.yaml
One line per bundled harness; recommend one from what the repository looks like
(its dependencies, data files, notebooks) or none when nothing fits. Offer
kapso experience add mine --config kapso-config.yaml (the bank a learn fills), and,
when no Leeroopedia key is present, the Leeroopedia plugin's install line from its
own README (https://github.com/Leeroo-AI/leeroopedia-mcp).
Three lines, then stop: what to run next on this repository (/kapso:build <what you want> on Claude Code, $kapso-build <what you want> on Codex; the tools this setup
installed reach a session after /mcp reconnects on Claude Code, or in a new session
on Codex), where the record will go (<campaign>/.kapso/, the campaign a sibling
directory outside the repository), how to watch (kapso watch <campaign> --follow).
Do not start a campaign.
doctor row and its fix, and the skill retries after the fix.What SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/kapsoOperate Kapso (PyPI leeroo-kapso), the engine that runs experiments toward a measurable objective, deploys the best solution and learns from every run, from a coding session — launch a build and hand it off, follow it with kapso watch, answer a campaign that is WAITING ON YOU, tell a slow run from a dead one and stop or resume it, learn from a finished campaign into your bank, serve a build or this session the experience it should start from, deploy the winner, and run the harness and experience verbs. Use when the user mentions Kapso or kapso build, watch, inbox, resume, stop, learn, experience, harness, deploy or doctor, asks how a campaign is doing, or says a run died. Do not use for ordinary code edits, for writing the objective and its evaluation (kapso-build does that), for reading a finished run's result (kapso-review does that), or inside a Kapso campaign session, which never launches another campaign./kapso-buildTurn what the user wants built into a Kapso campaign — discover the repository's data, evaluation and domain in silence, write the brief (objective, how it is measured, baseline, target, rules, budget), get the evaluation approved through kapso-evaluation, and launch detached with the handoff. Use when the user says build X and verify it, I need Y that meets Z, improve W, make this pass the benchmark, get the metric above a number, ship a model that meets a bar, or runs /kapso:build. Do not use for a one-file change with an obvious fix, for operating a campaign already running (the kapso skill), or inside a Kapso campaign session.npx claudepluginhub leeroo-ai/kapso --plugin kapsoOther plugins' skills for the same job