AutoHarness is a set of skills for Claude Code, published as an MIT-licensed repository by its author, that automates writing and maintaining the project rules a coding agent is meant to follow. Its premise is that while Claude Code will follow rules written in CLAUDE.md, someone still has to write and maintain them, and the skills aim to generate them from the project itself and grow them as problems are found. The author describes it as an attempt at Harness Engineering, introduced in Claude CodeのSkillsでハーネスエンジニアリングを実装した — ルール自動生成でコード品質を継続改善する.
The name and idea come from Google DeepMind’s AutoHarness paper, which the author summarises as automatically generating a harness that rejects an agent’s illegal moves. The skills borrow only that inspiration — define what is not allowed and exclude it. In the author’s mapping, the skills’ verification rules correspond to the paper’s legality check but are managed by hand rather than automatically generated and optimised.
Capabilities
/autoharness-initanalyses the project’s configuration (such aspyproject.toml,tsconfig.jsonor.eslintrc) and generates.claude/rules/harness.md, a natural-language rule file covering type annotations, naming and forbidden patterns, and.claude/rules/harness_check.py, a script that runs lint, type checks and tests and returns the results as JSON. It also adds an@.claude/rules/harness.mdimport toCLAUDE.mdso the rules are loaded automatically./autoharness-updateanalyses failures and updates both the rules and the verification script. The author states that it also runs without being typed, triggering when a code-generation task wraps up, when type errors or test failures occur, or when the user gives feedback about the output.- Setup consists of copying the three skill directories from the repository into the project’s
.claude/skills/. - The verification script can be run in CI, and the author’s June 2026 revision recommends also connecting it to a PostToolUse hook on edits and writes, so that check results return to the agent in the same turn (see Agent Hooks).
Adoption & Ecosystem
The only evidence of effect given is the author’s own small trial (five runs per condition, metrics largely self-reported by the agents), in which conventions written into the rule file were followed in every run with the skills, while without them pathlib.Path and Decimal went unused in all runs of the feature-addition and bug-fix tasks; on the extension task the gap was slight, and functional outcomes were similar across conditions. The author treats this as indicative only. Stated limitations are the token cost of loading the rule file in every session, rules going stale if the technology stack changes, and no effect until the initial setup has been run. Re-evaluating with real linters and mypy, and automatic optimisation closer to the paper’s method, are named as future work.