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

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

Скилл add-harness для Claude Code добавляет скрипт запуска нового агентского harness в Evolving Infra. Он включается, когда нужно подключить harness, для которого ещё нет скрипта в examples/agents.

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

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

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

Скилл создаёт examples/agents/<harness>.sh, который запускает агентский harness с Evolving Infra как моделью. Он также добавляет строку о harness, API и скрипте в examples/agents/README.md и проверяет запуск одним запросом и одним вызовом инструмента.

Для работы нужны установленный harness и запущенный стек с конфигурацией examples/agents/<model>.yaml. Скрипт использует API gateway или translator в зависимости от API harness; другой API потребует изменения translator. Ключи и пароли у стека не нужны.

Скилл не меняет роутер и настройки harness в домашней директории. Проверки включают bash -n и python tools/check_agent_files.py; тестовый запуск выполняют из обычного терминала, чтобы не унаследовать учётные данные сессии другого агента.

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

  • добавить скрипт запуска для нового harness
  • настроить передачу запросов через gateway или translator
  • проверить ответ модели и вызов инструмента
  • задокументировать новый скрипт в таблице примеров

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

  • Добавь запуск OpenCode через Evolving Infra.
  • Подключи Aider, для которого ещё нет скрипта в examples/agents.
  • Создай скрипт для нового harness и проверь его вызовом инструмента.

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

1Через Skills CLI (Vercel)

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

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

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

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

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

Вопросы об add-harness

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

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

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

Создаёт скрипт запуска для нового агентского harness в Evolving Infra, проверяет его одним запросом и вызовом инструмента, затем добавляет запись в examples/agents/README.md.

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

Нужны установленный harness и запущенный стек с конфигурацией examples/agents/<model>.yaml. Для запросов через Anthropic Messages или OpenAI Responses используется translator; ключ или пароль стека не требуется.

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

SKILL.md · Apache-2.0
---
name: add-harness
description: Add a launch script that runs another agent harness (OpenCode, Aider, Cline, Goose, an in-house CLI, ...) on Evolving Infra, next to the Pi, Claude Code and Codex scripts in examples/agents. Use when asked to connect an agent harness that examples/agents has no script for. Not for the three harnesses that have one; use `connect-harness`. Not for changing an agent's own code to send agent identities; use `connect-agent`.
---

# Add a harness

Write `examples/agents/<harness>.sh`, which starts the harness with Evolving Infra as its model,
and check it with one prompt and one tool call. Needs a running stack served with an
`examples/agents/<model>.yaml` config ([`connect-harness`](../connect-harness/SKILL.md), step 1)
and the harness installed.

## Scope

- **Reads**: `examples/agents/`: the existing launch scripts, `examples/agents/common.sh` and the translator; the
  harness's own documentation for custom model providers.
- **Writes**: `examples/agents/<harness>.sh` (and a provider file beside it if the harness needs
  one), and a row in the table of `examples/agents/README.md`.
- **Never changes**: `evolving_infra/`: the router stays as it is; the harness's settings in the
  home directory: the script passes everything per process.
- **Outside the repository**: runs the harness against the stack; may start the translator
  (`examples/agents/translator.sh`). Confirm with the owner first.

## Inputs

- The harness, its version and its documentation for custom providers or base URLs. Ask for the
  documentation link when it is not clear which API the harness sends.
- The gateway URL of the running stack (`gateway_url` in `stack.json`, port 30800; a config with
  a `gateway` section, such as `examples/agents/*.yaml`, starts the gateway).
- Never ask for a token or password: the stack needs none, and the translator's key is local.

## Steps

### 1. Find which API the harness sends

Read the harness's provider documentation and find:

| The harness sends | Path | Example |
|---|---|---|
| OpenAI chat completions (`/v1/chat/completions`) | to the gateway directly: `$EVOLVING_INFRA_URL/v1` | `examples/agents/pi.sh` |
| Anthropic Messages (`/v1/messages`) | through the translator: `$TRANSLATOR_URL` | `examples/agents/claude-code.sh` |
| OpenAI Responses (`/v1/responses`) | through the translator: `$TRANSLATOR_URL/v1` | `examples/agents/codex.sh` |

The gateway serves chat completions only (`evolving_infra/router/gateway/`); the translator turns the other
two into chat completions. Another API needs a translator change: stop and ask the owner.

**Check**: the documentation names one of the three APIs and how to set its base URL.

### 2. Find how to set the provider for one process

In order of preference: command-line flags (Codex `-c`), a provider file loaded by a flag (Pi
`-e`), environment variables (Claude Code `ANTHROPIC_*`), a config directory chosen by an
environment variable. Do not write into the harness's files in the home directory.

Set: the base URL from step 1, the model name (`$EVOLVING_INFRA_MODEL`), and an API key. Directly
to the gateway any key works (`unused`); through the translator the key is `$TRANSLATOR_KEY`, which
`need_translator` reads. If the harness has separate model slots (a small model for background
work, a model for sub-agents), set every slot to the served model.

**Check**: the harness's documentation shows the setting applies without editing its files.

### 3. Write the script

Copy the closest example and keep its shape:

```bash
#!/usr/bin/env bash
set -euo pipefail
source "$(dirname "$0")/common.sh"
need_translator            # only through the translator
exec "${<HARNESS>_BIN:-<harness>}" <provider flags> "$@"
```

`common.sh` sets `EVOLVING_INFRA_URL`, `EVOLVING_INFRA_MODEL` and `TRANSLATOR_URL`; arguments after
the script name go to the harness.

**Check**: `bash -n examples/agents/<harness>.sh` passes.

### 4. Run one prompt and one tool call

```bash
export EVOLVING_INFRA_URL=<gateway url>
bash examples/agents/<harness>.sh <the harness's one-shot flag> "Reply with the word ready"
bash examples/agents/<harness>.sh <the harness's one-shot flag> "List the files in this directory"
```

**Check**: the first prints the model's reply; the second runs the harness's file or shell tool
and answers from its output. A tool call printed as text means the stack was not served with
an `examples/agents/<model>.yaml` config, which has the parsers.

### 5. Document it

Add a row to the table of `examples/agents/README.md`: the harness, the API it speaks, the path
(direct or translator) and the script.

**Check**: `python tools/check_agent_files.py` passes.

## Returns

- The script, the harness version it was run with, and the output of step 4.
- What the harness does that the script does not cover (several model slots, a model list it
  checks, a context window it assumes), as decisions for the owner.

## Pitfalls

- A harness that also sends a model-list or token-count request (`/v1/models`,
  `/v1/messages/count_tokens`) may stop when it fails: run it through the translator, which
  serves both.
- A harness started from inside another agent's session can inherit that session's credentials
  through environment variables; test it from a plain terminal.

© mit-han-lab · Apache-2.0 · mit-han-lab/EvolvingInfra

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

Каталог скиллов SKILL.md →
eval-harness affaan-m Скилл eval-harness для Claude Code, Codex, Cursor и других агентных платформ, реализующий eval-driven development: критерии успеха определяются до написания кода, результаты измеряются метриками pass@k и pass^k. CX Codex +1 6 500установок harness-writing trailofbits Скилл harness-writing для Claude Code помогает писать и улучшать харнессы для фаззинга кода на C/C++ и Rust. Он подключается при создании цели фаззинга или разборе невоспроизводимых сбоев. CX Codex +1 6 000установок pydantic-ai-harness pydantic Скилл pydantic-ai-harness для Claude Code и Codex, расширяющий Pydantic AI агентов возможностями кодирования, работы с файлами и командами, изоляции в песочницах и управления контекстом. CX Codex +1 3 300установок harness-creator walkinglabs Скилл harness-creator настраивает и проверяет окружение для кодинг-агентов. Он создаёт инструкции, трекеры задач и правила верификации, чтобы агент не бросал работу на полпути. CX Codex +1 2 600установок eval-harness-first Seth Hobson Скилл eval-harness-first для Claude Code, Codex и Cursor строит оценочный каркас перед запуском fine-tuning: золотые наборы, грейдеры по типам ошибок, калибровку судей и базовый замер модели. CX Codex +1 2 600установок test-harness zernie Скилл test-harness для Claude Code тестирует харнес — хуки, скиллы, настройки и CLAUDE.md. Запускается на каждом коммите, две из трёх ступеней бесплатны и не требуют API-ключа. CX Codex +1 2 100установок

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

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

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

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