From Harness Score
Builds and improves a repository's AI harness including AGENTS.md, rules, skills, commands, hooks, guardrails, and CI sensors. Acts on harness-score audit findings to raise maturity level.
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-score:harness-engineeringThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are improving this repository's AI harness: the guides, sensors, and
You are improving this repository's AI harness: the guides, sensors, and guardrails that make agent work reliable. The authoritative reference is https://paladini.github.io/harness-score/ — these recipes summarize it.
npx -y harness-score . --json first (and after changes)
so improvements are measured, not assumed.Create AGENTS.md with: what the project is (2 sentences), directory
layout, exact build/test/lint commands, non-negotiable conventions, and a
"do not touch" list.
For guidance scoped to part of the tree, add a nested CLAUDE.md
inside that subdirectory — Claude Code loads it automatically when working
in that subtree, the same idea as glob-scoped rules in other tools, just
directory-scoped instead of pattern-scoped.
For the team's most repeated procedure, create
.claude/skills/<name>/SKILL.md with frontmatter name: and a
description: written as a trigger ("Use when the user asks to …", ≥40
chars), body = numbered runbook. Add .claude/commands/<verb>.md for
human-triggered workflows like /review.
Register hooks in .claude/settings.json's "hooks" key:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{ "type": "command", "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/guard-shell.js" }]
}
],
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [{ "type": "command", "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/format-on-edit.js" }]
}
]
}
}
The gate script reads the tool-call JSON from stdin on PreToolUse, tests
the command against a destructive-pattern regex (rm -rf on roots, git push
--force, DROP TABLE), and — to block it — prints
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"…"}}
and exits 0. The feedback script runs on PostToolUse and formats the
edited file, best-effort. Commit both scripts. Full examples:
https://paladini.github.io/harness-score/guide/guardrails-and-safety
Wire the ecosystem's standard tools: test runner with a test script,
linter config, strict type checking (tsconfig "strict": true / mypy /
pyright), formatter. Document the commands in AGENTS.md.
.github/workflows/ci.yml running lint, typecheck, and tests on push/PR.
Optionally add the ratchet: npx -y harness-score --min-level <current>.
Pre-commit via husky+lint-staged or pre-commit.
.gitignore must cover .env and .env.* (keep !.env.example). Remove
real env files; replace inlined keys in .mcp.json with
${ENV_VAR} interpolation. Add LICENSE and commit the lockfile.
Re-run the scanner, report old level → new level, and if the user wants it
to stick, add the --min-level gate to CI so maturity only ratchets up.
npx claudepluginhub paladini/harness-score --plugin harness-scoreTurns repeated AI coding-agent mistakes into durable repository artifacts: instructions, drift checks, regression tests, failure memory, and adoption reports.
Set up or update an agent-first engineering harness for any repository, including knowledge maps, architecture boundaries, enforcement rules, and quality scoring.
Structures repositories for maximum AI agent effectiveness via three pillars: context engineering (AGENTS.md failure ledger), architectural constraints, garbage collection. Use for AI dev repos, agent failure diagnosis, AGENTS.md writing, CI gates.