К основному содержанию
скилл CX Codex

connect-harness — скилл для Claude Code: что делает и как установить

Скилл connect-harness для Claude Code подключает Pi, Claude Code или Codex к запущенному стеку Evolving Infra. Он проверяет вызовы инструментов и запускает пробный запрос через выбранный harness.

Apache-2.0 ★ 173 обновлён 2026-11-16

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add mit-han-lab/EvolvingInfra --skill connect-harness -a claude-code
Открыть на GitHub

Что делает connect-harness

Скилл направляет запросы модели из coding-agent harness в работающий стек Evolving Infra. Он использует скрипты запуска из examples/agents/, проверяет маршрутизатор и парсеры вызовов инструментов. Для Claude Code и Codex скрипт запускает прокси LiteLLM на 127.0.0.1:4000 и записывает ключ переводчика в ~/.config/evolving-infra/translator-key; Pi работает без переводчика.

Нужны работающий стек с секцией gateway в конфигурации и установленный выбранный harness. Стек должен использовать парсеры вызовов инструментов и рассуждений без --planner. Для запуска Claude Code скрипт нельзя вызывать из другой сессии Claude Code: переменные CLAUDE_CODE_* могут передать её ключ прокси. Скилл не меняет файлы репозитория.

Какие задачи решает

  • подключить Pi к шлюзу Evolving Infra
  • направить запросы Claude Code через прокси LiteLLM
  • проверить, что harness выполняет вызовы инструментов
  • запустить пробный запрос к выбранной модели

Примеры запросов агенту

  • Подключи Codex к работающему стеку Evolving Infra и проверь вызов инструмента.
  • Настрой Claude Code через шлюз и запусти пробный запрос.
  • Подключи Pi к шлюзу и проверь ответ модели.

Как установить connect-harness

1Через Skills CLI (Vercel)

npx skills add mit-han-lab/EvolvingInfra --skill connect-harness -a claude-code

2Вручную: положить файлы

~/.claude/skills/connect-harness/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/connect-harness/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о connect-harness

Как установить connect-harness в Claude Code?

Запусти npx skills add mit-han-lab/EvolvingInfra --skill connect-harness -a claude-code. Файл скилла появится в ~/.claude/skills/connect-harness/SKILL.md.

Что делает connect-harness?

Он подключает Pi, Claude Code или Codex к запущенному стеку Evolving Infra и проверяет запросы модели и вызовы инструментов. Для Claude Code и Codex запускается прокси LiteLLM.

Что нужно для работы connect-harness?

Нужны работающий стек Evolving Infra с секцией gateway в конфигурации и установленный harness. В стеке должны быть настроены парсеры вызовов инструментов и рассуждений, а --planner должен быть выключен.

Исходный текст

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

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
llm-gateway devops-skills Скилл llm-gateway помогает развернуть API-шлюз перед несколькими LLM: балансировка, лимиты, ключи, кеш и учёт расходов. CX Codex +1 370установок llm-cost-optimization devops-skills Скилл llm-cost-optimization для сокращения расходов на LLM API: кеширование, выбор модели под задачу, батчинг и расчёт выгоды от self-hosting. CX Codex +1 370установок configuring-ai-agents celigo Скилл configuring-ai-agents помогает настраивать шаги AiAgentImport в Celigo для извлечения данных, классификации и генерации текста через языковые модели. CX Codex +1 4 100установок openai-agents-sdk laguagu Помогает разрабатывать агентов на Python с OpenAI Agents SDK. Подключается к задачам с инструментами, передачей управления между агентами, сессиями и потоковой выдачей. CX Codex +1 2 500установок codex-fable5 baskduf Скилл codex-fable5 переносит рабочие привычки Claude Fable 5 в среду Codex. Он заставляет агента сначала изучать код утилитой rg, проверять факты и фиксировать промежуточные шаги. CX Codex +1 ★ 437звёзд репо create-harness-spec hedera-dev Превращает идею фичи Hedera в готовый harness-рецепт: PRD, spec.yaml, валидаторы и опциональные стадии. Проводит «гриллинг» — серию уточняющих вопросов — и выдаёт файлы только после подтверждения. CX Codex +1 593установок

Из того же набора7

add-harness Скилл add-harness для Claude Code добавляет скрипт запуска нового агентского harness в Evolving Infra. Он включается, когда нужно подключить harness, для которого ещё нет скрипта в examples/agents. CX Codex +1 ★ 173звёзд репо run-benchmark Скилл run-benchmark для Claude Code запускает replay-бенчмарк Evolving Infra, оценивает результат и сравнивает его с эталоном. Срабатывает на просьбу воспроизвести результаты статьи или проверить изменение в бенчмарке. CX Codex +1 ★ 173звёзд репо diagnose-run Скилл diagnose-run для Claude Code разбирает сбои запуска, запросов и результаты бенчмарков Evolving Infra. Он подключается, когда evolving-infra serve завершается с ошибкой или бенчмарк уступает эталону. CX Codex +1 ★ 173звёзд репо connect-agent Скилл connect-agent для Claude Code подключает код агента к запущенному Evolving Infra. Он добавляет идентификаторы к запросам модели и завершает ветки задач. CX Codex +1 ★ 173звёзд репо check-pr Скилл check-pr для Claude Code сверяет изменения и описание pull request с правилами проекта Evolving Infra. Запускается перед созданием PR, отправкой исправлений после ревью или при проверке чужого PR. CX Codex +1 ★ 173звёзд репо deploy-stack Скилл deploy-stack для Claude Code разворачивает Evolving Infra на одном или нескольких GPU-хостах. Запускается по запросу развернуть, запустить или адаптировать стек под Docker, Slurm с Pyxis либо установку из исходников. CX Codex +1 ★ 173звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой