Harden repo for coding agents
Skill justinramos101/agent-skill-kit/skills/harden-repo-for-coding-agents
Battle-tested Agent Skills for coding agents — source-grounded, failure-driven heuristics that audit and design real surfaces. Install with npx skills.
npx -y skills add justinramos101/agent-skill-kit --skill harden-repo-for-coding-agentsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Assess, harden, scaffold, or diagnose a repo's agent-readiness. Triggers: 'make this repo work with Claude Code', 'agentify this repo', 'score our agent-readiness', 'why does the agent keep tripping here', 'add a PR evidence contract so agent PRs prove their claims'. Covers instruction files, hooks and gates, sandboxing, CI runner trust, PR evidence / proof-of-work gates, docs indexes, and skill/tool surfaces for Claude Code, Cursor, Codex, Copilot, Windsurf, and Aider. Do NOT use to promote observed agent failures into rules from a failure log, or to design an LLM product's eval loops.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
4.6 KB, as published. Nobody here has run it
Harden Repo for Coding Agents
Core principle: make the repository legible to a stateless, context-bound LLM that
must rediscover the project every session. Four named moves recur across every surface: progressive
disclosure — on-demand beats on-trigger beats always-loaded, because token budget is
the dominant scarcity (W6); hard gates beat soft prose — a hook holds at 100%, an
instruction sentence at ~70% (W3); hand-curate, never /init — autogenerated
instruction files drop task success ~3% and inflate cost >20% (W9); and
defense-in-depth — harness hook, CI branch protection, and sandbox compose; none
alone suffices (W10). W2–W10 live in references/empirical-warnings.md.
Run to completion from the request and the repo, stating assumptions in the output. Ask only on genuine blockers — chiefly, which harnesses the team uses when neither the request nor the repo says and the work emits per-harness output.
Out of scope (capabilities, not files): promoting observed agent failures into durable rules from a failure log, and designing or operating an LLM product's eval loops.
Invariants
- Never infer the harness set from dotfiles.
.claude/proves Claude Code is used, not that it is the only harness in play. Emit per-harness equivalents for every harness named in the inventory — not just the one whose dotfile exists. - Hand-curate instruction files from project knowledge — stack, layout, build/test commands, invariants. Never autogenerate; no placeholder prose. The quality bar is "specific to this project, verifiable by reading the file."
- Forbidden-tier actions get a hard gate — a PreToolUse hook that exits 2 plus a mirroring CI/branch-protection rule — never prose alone.
- A deny-list hook ships with its variant-matrix test fixture as one artifact, never
two (the bypass categories are enumerated in
references/playbooks/gates.mdH5). - A PR evidence contract ships as template plus enforcing required check together —
a PR template alone is prose (~70%), not a proof-of-work gate
(
references/playbooks/operations.md).
Workflow
- Classify the request as assess, harden, scaffold, or diagnose, and name the surfaces in play. If ambiguous, pick the closest reading and say so in the output.
- Inventory the harness set (from the request, or ask once — see Invariants) and the project knowledge the artifacts must encode: stack, repo layout and scope, build/test/lint commands, invariants the agent must not break.
- Load the matching references:
references/playbooks/gates.md(hooks, action tiers, per-harness gate primitives),instruction-surface.md(root instruction files),sandbox.md(isolation, egress, secrets),context-surfaces.md(skills, docs index, specs, tools/MCP),operations.md(CI runner trust, PR evidence contracts, evals, telemetry, governance). Load only what the surfaces need. - Apply the loaded playbooks. Assess: findings, each with severity 0–4 (4 = an agent can take an irreversible or destructive action today; 3 = a safety rule exists only as prose; 2 and below = cost, drift, or quality) and a concrete verification step. Harden: recommendations ranked by severity closed per token spent, each naming the artifact to change and how to verify. Scaffold: write the artifacts per the playbooks' scaffold notes. Diagnose: ranked hypotheses, each with a check that confirms or kills it; fix the top confirmed one and state the prevention.
- Audit scaffolds against the playbook. After writing, re-read the actual diff and report every scaffold heuristic in the loaded playbooks as applied, skipped-because-X, or deferred. Fix gaps and re-audit at most twice, then stop and report what remains open.
- Report in chat — findings/recommendations with severities, assumptions made, and verification steps. Write report files only when asked, at a path the user names.