跳到正文
DEV Community· Nir Feinstein·· 3 小時前AI 評分71

agent-harness 以智能體技能和 hooks 協助 Claude Code 完成及核實工作

Skills and hooks that make Claude Code finish what it starts

AI 導讀

agent-harness 透過 Agent 技能、規則和 hooks,讓 Claude Code 和 Codex 按請求規模處理工作,並以可核實證據確認完成。

正文

The most expensive thing a coding agent does is not writing a bug. It is ending a turn that sounds finished when it is not: "Deployed!" with no URL checked, three requests with one done, or a list of "next steps for you" that the agent could have done itself.

I run many projects through Claude Code and Codex at the same time, so I built agent-harness: a set of Agent Skills, rules and hooks that change how the agent sizes, finishes and reports work. There is no service behind it; it is files in your agent's config.

Plain words in, the right amount of process out

The harness reads what you asked and picks how to act:

You type The agent acts as It keeps
a question or a tiny edit an engineer nothing extra
"fix the login bug" engineer + QA the matching row, if a ledger exists
"make it production ready" the whole product team: spec, build, UX review, QA of every flow, release gates, deploy READINESS.md
"get customers" the CEO: product, growth, sales, support, money COMPANY.md
"finish all my projects" a portfolio head with bounded parallel workers PORTFOLIO.md

A fix stays a fix. A product request gets a ledger of every user flow and release gate.

Done means evidence

Every row in a ledger is verified only with evidence: a test run, phone and desktop screenshots, or a URL check. A Stop hook (done-check.py) reads your last request when the agent tries to stop and sends it back when the work is not verifiably finished.

One owner action at a time

You write standing approvals once in OWNER.md: money caps, which accounts and channels the agent may use, which decisions it makes alone. Inside them it acts. Outside them it asks one exact thing:

NEEDS YOU (1 of 3): Stripe -> create the account -> unblocks checkout

Moving money, signing and creating new third-party accounts always stay yours.

It keeps running and improves itself

run-company/scripts/schedule.sh installs a launchd or cron job that runs continue in a project every few hours, with no chat open. Every friction and every owner ask is logged, and a weekly review tests one harness change against the current version on the same task before keeping it.

Try it

git clone https://github.com/fainir/agent-harness ~/agent-harness && ~/agent-harness/install.sh

The installer is idempotent and keeps your own content; ./install.sh --uninstall removes everything it added. It works with Claude Code and Codex, and with any agent that reads AGENTS.md and ~/.agents/skills. bash tests/test.sh runs the offline test suite (hooks, learn scripts and a full install and uninstall cycle in a throwaway home).

Limits, honestly: the agent is only as good as the model and the accounts it can reach, and background runs spend model usage while they run. Pause one with schedule.sh --remove <dir>.

Code: https://github.com/fainir/agent-harness

來源:DEV Community · dev.to