Claude Code • Codex • Opencode • Cursor • Kiro CLI • Kiro • Cline • Aider

Your agents should remember things.

Skills, instincts, memory, security and research-first — one layer that works the same in every harness, including Kiro. Less re-reading, fewer wasted tokens, no guessing at APIs.

$ curl -fsSL https://theelephantcoder.github.io/agent-harness/install.sh | bash

curl install  ·  MIT  ·  works on existing projects with harness init --migrate

180s → 13s*cold start on 250k LOC
~65%fewer tokens per task
~40%fewer tool calls
<100mshook p99 overhead

Skills

Reusable SKILL.md that follows the agent skills spec. Write once, use in every harness.

harness skill list

Instincts

Hooks that fire on their own. Pre-tool guard, post-edit format + typecheck, session hydration. Muscle memory for agents.

instincts/research-first blocks edits until plan exists

Memory

Tiered MEMORY.md under 8k tokens. Hot always, warm on keyword, cold on demand. Overflow archives with harness optimize, no 3 minute re-explanation.

memory/MEMORY.md + SOUL.md + USER.md

Security

Default deny. Prompt injection check, secret scan before commit, bash allowlist, file boundaries. Catches the dumb mistakes.

harness doctor

Research-first

Agent checks research/findings/ first, then codebase, then web. Writes research/plans/ and waits for an ok.

research → plan → approve → build

One source, every harness

You write skills and memory once. harness init installs to each tool's config.

Claude Code.claude/settings.json + .claude/skills/
Opencodeopencode.json
Codex.codex/hooks.json
Cursor.cursor/rules/*.mdc
Kiro CLI.kiro/skills/ + .kiro/settings.json
Kiro.kiro/steering/ + .kiro/settings.json
Cline.clinerules/ + AGENTS.md
Aider.aider.conf.yml + CONVENTIONS.md
Generic.harness/ + AGENTS.md

Quick start

npm install -g https://codeload.github.com/TheElephantCoder/agent-harness/tar.gz/refs/heads/main
harness doctor
harness bench --quick
brew tap theelephantcoder/agent-harness https://github.com/TheElephantCoder/agent-harness
brew trust theelephantcoder/agent-harness
brew install agent-harness
harness doctor
pip install agent-harness-cli
pipx install agent-harness-cli
harness doctor
echo "deb [trusted=yes] https://theelephantcoder.github.io/agent-harness/apt stable main" | sudo tee /etc/apt/sources.list.d/agent-harness.list
sudo apt update
sudo apt install agent-harness
harness doctor
git clone https://github.com/TheElephantCoder/agent-harness.git
cd agent-harness
npm install
npm link

In your project

cd your-project
harness init --auto
# or
harness init --migrate

# day to day
harness optimize
harness skill list
harness doctor
harness bench --compare

See docs/cli.md and docs/brew.md.

One setup, measured

My own project, my own runs: 250k LOC TypeScript monorepo, M2 Max. Independent A/B results on other stacks live on the Benchmark tab. Run it yourself.

harness bench --quick
harness bench --compare
metricbeforeafter
cold start~180s~13s
tokens / task~142k~48k
tool calls8751
hook p99—87ms

Verified regardless of model: optimize shrinks overgrown memory 3–11x to budget, the repo index compresses orientation 13.5x vs reading everything, policy hooks run in milliseconds. Methods and numbers.

Research-first flow

  1. research — check research/findings/, grep codebase, web search if needed
  2. plan — write research/plans/<task>.md
  3. approve — quick ok (tiny edits auto-approve)
  4. build — implement
  5. verify — tests + harness bench + harness doctor
  6. remember — harness optimize prunes MEMORY.md, archive keeps history

Works on your existing repo

npx -y https://codeload.github.com/TheElephantCoder/agent-harness/tar.gz/refs/heads/main init --migrate
git status # see what it added
harness doctor --fix

Remove the harness and your project still works — adapters are just file mappings.

Get started on GitHub

* Single-setup numbers from my own project (250k LOC TypeScript monorepo, M2 Max). Independent A/B runs on other models and hardware live on the Benchmark tab, results vary. Run harness bench --quick to measure your own.