connect-harness — Claude Code skill: what it does, how to install
The connect-harness Claude Code skill routes Pi, Claude Code, or Codex requests through a running Evolving Infra stack. It checks tool calls and runs a test prompt with the selected harness.
Apache-2.0 ★ 173 updated 2026-11-16
npx skills add mit-han-lab/EvolvingInfra --skill connect-harness -a claude-codeWhat connect-harness does
The skill connects a coding-agent harness to a live Evolving Infra stack using launch scripts from examples/agents/. It checks the router and the model's tool-call parsers. Claude Code and Codex use a LiteLLM proxy at 127.0.0.1:4000, with its key written to ~/.config/evolving-infra/translator-key; Pi needs no translator.
A running stack with a gateway section and an installed harness are required. The stack must use tool-call and reasoning parsers without --planner. Run the Claude Code script outside another Claude Code session: inherited CLAUDE_CODE_* variables can pass that session's key to the proxy. The skill makes no changes to repository files.
What it helps with
- connect Pi to an Evolving Infra gateway
- route Claude Code requests through LiteLLM
- check whether a harness runs tool calls
- send a test prompt to the selected model
Example prompts for the agent
- Connect Codex to the running Evolving Infra stack and test a tool call.
- Set up Claude Code through the gateway and run a test prompt.
- Connect Pi to the gateway and check the model's response.
How to install connect-harness
1Skills CLI (Vercel)
npx skills add mit-han-lab/EvolvingInfra --skill connect-harness -a claude-code2Manually: put the files in place
~/.claude/skills/connect-harness/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/connect-harness/
1Skills CLI (Vercel)
npx skills add mit-han-lab/EvolvingInfra --skill connect-harness -a codex2Manually: put the files in place
.agents/skills/connect-harness/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mit-han-lab/EvolvingInfra --skill connect-harness -a cursor2Manually: put the files in place
.cursor/skills/connect-harness/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mit-han-lab/EvolvingInfra skills/connect-harness2Manually: put the files in place
.github/skills/connect-harness/SKILL.md1Skills CLI (Vercel)
npx skills add mit-han-lab/EvolvingInfra --skill connect-harness -a gemini-cli2Platform CLI
gemini skills install https://github.com/mit-han-lab/EvolvingInfra --path skills/connect-harnessManually: put the files in place
.devin/skills/connect-harness/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about connect-harness
How do I install connect-harness in Claude Code?
Run npx skills add mit-han-lab/EvolvingInfra --skill connect-harness -a claude-code. The skill file will be at ~/.claude/skills/connect-harness/SKILL.md.
What does connect-harness do?
It connects Pi, Claude Code, or Codex to a running Evolving Infra stack and checks model requests and tool calls. Claude Code and Codex use a LiteLLM proxy.
What does connect-harness need to run?
It needs a running Evolving Infra stack with a gateway section and an installed harness. The stack must have tool-call and reasoning parsers enabled, with --planner disabled.
Source text
SKILL.md · Apache-2.0
---
name: connect-harness
description: Run a coding-agent harness (Pi, Claude Code or Codex) on a running Evolving Infra stack with the launch scripts of examples/agents. Use when asked to use Evolving Infra as the model of Pi, Claude Code, Codex or another off-the-shelf agent harness. Not for changing an agent's own code to send agent identities; use `connect-agent`.
---
# Connect a coding-agent harness
Point Pi, Claude Code or Codex at a running stack, so the harness's model requests are served
by Evolving Infra. Needs a running stack ([`deploy-stack`](../deploy-stack/SKILL.md)) and the
harness installed on the machine where it runs.
## Scope
- **Reads**: `examples/agents/`: the launch scripts, the translator and the configs with parsers;
`docs/api-reference.md`: the router's routes.
- **Writes**: nothing in this repository. A harness this skill has no script for gets a script in
`examples/agents/` only when the owner asks for one.
- **Never changes**: `evolving_infra/`: connecting a harness needs no change to the server. The
harness's own settings (its directory in the home directory): the scripts pass everything per
process.
- **Outside the repository**: starts a LiteLLM proxy on 127.0.0.1:4000 for Claude Code and Codex,
and writes its key to ~/.config/evolving-infra/translator-key. Confirm with the owner first.
## Inputs
- The gateway URL: `gateway_url` in the `stack.json` of the work directory of `evolving-infra serve`
on the first host (port 30800), reachable from the machine that runs the harness. Only a config
with a `gateway` section starts the gateway; the `examples/agents/` configs have one.
- Which harness, and whether it is installed (`pi --version`, `claude --version`,
`codex --version`). Do not install a harness without asking.
- Never ask for a token or password: the scripts use no credential of the person's.
## Steps
### 1. Check the stack serves tool calls
The stack must run with the tool-call and reasoning parsers of its model
(`examples/agents/<model>.yaml`) and without `--planner`. Read the engine command in the stack's
work directory and check `--tool-call-parser` is set. Then send one request with a tool:
```bash
curl -s $EVOLVING_INFRA_URL/v1/chat/completions -H 'Content-Type: application/json' -d '{"model": "<model>",
"messages": [{"role": "user", "content": "What is the weather in Paris? Use the tool."}],
"tools": [{"type": "function", "function": {"name": "get_weather", "parameters":
{"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}]}'
```
**Check**: the reply has `choices[0].message.tool_calls` with `get_weather`. A tool call inside
`content` means the parser is missing: restart the stack with `examples/agents/<model>.yaml`. An
HTTP 400 about prepared lifecycle callbacks means the stack runs with `--planner`.
### 2. Start the translator (Claude Code and Codex only)
Pi speaks chat completions and needs no translator: go to step 3.
```bash
EVOLVING_INFRA_URL=<gateway url> bash examples/agents/translator.sh &
```
**Check**: `curl -s 127.0.0.1:4000/health/liveliness` answers `"I'm alive!"`. Start only one
translator: a second one rewrites the key file and the first one then refuses every request.
### 3. Run one prompt
```bash
export EVOLVING_INFRA_URL=<gateway url>
bash examples/agents/pi.sh -p "Reply with the word ready"
bash examples/agents/claude-code.sh -p "Reply with the word ready"
bash examples/agents/codex.sh exec --skip-git-repo-check "Reply with the word ready"
```
**Check**: the harness prints the model's reply. The engine log of the stack
(`<work dir>/logs/engine-w<i>.log`) shows the request. On Claude Code, `No connected db` or an
authentication error means the translator's key does not match: restart the translator.
### 4. Run one tool call
Ask for a task that needs a tool, for example "List the files in this directory".
**Check**: the harness runs its tool (it shows the command or the file list) and then answers.
Text that looks like a tool call but does not run means the parser is missing (step 1).
## Returns
- The harness, its version, the gateway URL and the served model, and `GET <gateway url>/gateway/stats`
after the run (agents and branches the gateway inferred).
- The reply of step 3 and the tool run of step 4.
- The limits that apply ([examples/agents](../../examples/agents/README.md#limits)): no agent
identity, no `--planner`; decisions about them are the owner's.
## Pitfalls
- Run inside another Claude Code session, `claude-code.sh` inherits that session's login
through `CLAUDE_CODE_*` variables and sends its key to the translator. Run it from a plain
terminal, or with `env -i HOME=$HOME PATH=$PATH`.
- `pkill -f litellm` also matches the shell that runs it; stop the translator by its PID.
© mit-han-lab · Apache-2.0 · mit-han-lab/EvolvingInfra