by wanshuiyin
HERO = Hashing · Edge cases · Rubrics · Overbuild — the four shapes coding agents over-defend in. A paste-in contract that stops them. Works with Claude Code, Codex, Antigravity, Cursor, Copilot, Windsurf, Gemini CLI.
# Add to your Claude Code skills
git clone https://github.com/wanshuiyin/HERO-Anti-OverDefenseGuides for using ai agents skills like HERO-Anti-OverDefense.
HERO-Anti-OverDefense is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by wanshuiyin. HERO = Hashing · Edge cases · Rubrics · Overbuild — the four shapes coding agents over-defend in. A paste-in contract that stops them. Works with Claude Code, Codex, Antigravity, Cursor, Copilot, Windsurf, Gemini CLI. It has 74 GitHub stars.
HERO-Anti-OverDefense's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/wanshuiyin/HERO-Anti-OverDefense" and add it to your Claude Code skills directory (see the Installation section above).
HERO-Anti-OverDefense is primarily written in Markdown. It is open-source under wanshuiyin on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh HERO-Anti-OverDefense against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
你让它写个功能,它给你造了座堡垒,然后功能一直没写完。
The shapes look like an agent optimising for not being blamed rather than for the work being good — a hypothesis that fits what we observed, not an established account of how these models are trained. Either way the shapes are real, there are four of them, and their initials are the name: Hashing, Edge cases, Rubrics, Overbuild. Naming them makes it possible to say which one just happened instead of arguing about vibes.
This repository is a short block you paste into your agent's config, plus a catalogue of the behaviours it is meant to stop. It works with Claude Code, Codex, Antigravity, Cursor, GitHub Copilot, Windsurf and Gemini CLI — anything that loads a config file without being asked. There is nothing to install.
🧬 Generalised out of ARIS (~13.7k★), whose cross-model reviewer is genuinely good — and also spent a measurable share of its output proposing hashes nobody reads. HERO keeps the value and drops the tax.
RULES.md |
The contract, in English and Chinese, plus the three places the line is genuinely hard to draw. |
cases/ |
Observed behaviours: what was asked, what the agent did, why it is disproportionate, what proportionate looks like. You do not paste this in — it is what you quote back when the agent argues. |
hosts/ |
Where to paste it — Claude Code, Codex, Antigravity, Copilot, Cursor, Windsurf, Gemini CLI. |
Paste this into the file your agent already reads on every turn — CLAUDE.md,
AGENTS.md, .github/copilot-instructions.md, .cursorrules. See
hosts/ for the full table.
=== SCOPE LIMITS (these bound what you PROPOSE, never what you look for) ===
Report anything that is actually wrong here — including a rare-looking case, if
this project actually produces it. Then keep the fix in scope:
1. This is not a security paper. Verification is welcome; over-defense is not.
Unless this project states otherwise, assume a cooperating operator on their
own machine; if it has a real adversary, it will say so and that scope wins.
2. Do not add hashes, checksums or fingerprints unless the hash replaces a
materially more expensive operation AND its result changes what happens next.
3. No defensive scaffolding: no feature flags, migration frameworks, compat
layers or wrappers for cases that do not occur here.
4. No corner-case obsession: exotic encodings, symlink races, RTL text and
millisecond races are out of scope unless the case is reachable through this
project's supported use — its documented inputs, its published interface, its
real data. Reachable is enough; you do not need a reproduction. Constructible
in principle is not enough.
5. Where judgement is needed, judge. Do not replace it with a scoring table, a
checklist, or a re-verification loop over something already settled.
6. None of this overrides security, migration, verification or review that the
user, this project's own conventions, or a higher-priority rule asked for.
Those were requested; they are the work, not scope creep.
Shapes already seen, for calibration. Examples, not a checklist — a real finding
is not dismissed by resembling one:
H hashing every row of two spreadsheets to answer what comparing cells answers
H writing checksum files that nothing ever reads
E hardening the accounts of an app that has no users and no deployment
R auditing your own patch all night while the feature stays unwritten
R a reviewer that returns a failing verdict on everything
O guards whose justification is the previous guard, not the requirement
And two that look like the above and are not. Report these:
✓ a digest that lets you skip re-reading a large file you already have
✓ a rare-looking input this project's own documentation example produces
Before running any check, answer: what specific failure would this detect, and
what would I do differently if it occurred? No answer means do not run it.
Say plainly when something is correct. Do not manufacture findings.
Or in one command. It appends to CLAUDE.md and leaves whatever is already
there untouched; run it twice and the second run does nothing:
grep -qi 'scope.limits' CLAUDE.md 2>/dev/null || { printf '\n\n'; curl -sL \
https://raw.githubusercontent.com/wanshuiyin/HERO-Anti-OverDefense/main/RULES.md \
| awk '/^=== SCOPE LIMITS/,/^Say plainly when something is correct/'; } >> CLAUDE.md
Swap the filename for your host — AGENTS.md for Codex and Antigravity,
.github/copilot-instructions.md for Copilot; see hosts/.
For the Chinese block see the Chinese README — both the
grep guard and the awk range have to change together, and changing only one
of them costs you the protection against running it twice.
It reads RULES.md instead of shipping a second copy, so there is nothing here
that can fall out of sync with the contract. It only ever appends — no temp
file, no overwrite — so the worst it can do to a file you already have is add a
block at the end.
Too long for your config? There is a short version — same six rules, no worked examples, about half the size. The examples are what does the calibrating, so take the full block if you have the room.
That is the whole install. There is no setting that points at
cases/ and nothing else to configure — the catalogue is not
loaded by your agent, on purpose. It is what
you quote back, by ID, when the agent insists some hardening is necessary.
⚠️ Put it where it is always loaded. An invoked copy still works when you invoke it — but it is absent exactly on the long unattended runs, where nobody is there to invoke it and where this failure costs you a night.
Checksums, fingerprints and digests added where nothing reads them.
A hash earns its place when it replaces a materially more expensive operation and its result changes what happens next. Comparing a digest to avoid pulling an unchanged large file back into context is a real saving. Hashing every row of a spreadsheet to answer what ordinary cell comparison already answers is not — and note that the second one does read its hashes, which is why "something reads it" is too weak a test.
Defending inputs that do not occur here.
That word is the entire rule. A rare-sounding case this project actually produces is a real bug and must be reported. A hostile actor who never visits is not.
Judgement replaced by machinery — scoring tables, checklists, re-verification loops over something already settled.
The characteristic symptom: a night of work, a complete audit trail, and no feature.
Scaffolding, feature flags, migration frameworks and compatibility layers built for a future nobody asked for. Guards guarding guards.
Point out one flaw and the agent reverses the whole direction; say it went slightly east and it relocates to the Atlantic. Same root, different symptom, and none of the four letters fits it — so it is catalogued outside HERO. Blurring the taxonomy is how a case catalogue stops being useful.
Asked to diagnose itself, the model put it better than we did:
My own failure mode here is turning "could improve confidence" into "therefore must be built and checked." That silently promotes optional uncertainty reduction into the main task.
That is the whole disease in two sentences. Optional uncertainty reduction is infinite; the task is not.
These limits bound the fix, never the search. Getting this backwards makes the contract actively harmful.
One of the defects that motivated this repository was a scheduler that hung because a dependency written as a bare string, where a list was expected, got iterated character by character. That sounds like a rare input-shape edge case — except the project's **own documentation