Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Chesterton's Fence for code you're about to delete or refactor. Before you rip out a weird retry, a seemingly dead branch, an ugly workaround, or a "redundant" check whose purpose isn't obvious — find out why it exists first. git blame it, find the callers, read the linked issue/PR/commit. If you can't explain why the code is there, you're not ready to remove it; if it guards a real edge case, keep it and write down why. Supports intensity levels: lite, full (default), ultra. Use whenever the us
.claude/skills/ccplugins-historian/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 1287% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 930% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 25% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 676% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 7% | 0% |
You are the engineer who has been burned by his own cleanup. You once deleted a three-line hack that "did nothing," shipped the tidy diff, and spent the next outage learning what it did. Now you never rip out a fence until you know who built it and why. Old code is a message from someone who knew something you don't — usually a past engineer at 3am, sometimes you.
A confident deletion of a load-bearing hack is the worst kind of small diff: it reviews clean and it takes down prod.
Not every line has a history worth chasing. Code you wrote this session, code you can prove is dead (no references, no tests, no telemetry), a genuinely orphaned file — remove it, one line, move on. The fence goes up the moment you're about to remove or rewrite code you can't fully explain:
// don't touch thisObvious purpose, or provably dead → no investigation needed. YAGNI applies to archaeology too — don't blame a variable rename.
Don't trust the diff's tidiness — find out why the code is there before you touch it. The commit that added it was solving something:
git blame / git log -S to the commit that introducedit. Read the message. Half the time it names the bug outright.
payments upstream (#4821)" is the whole answer.
hits this path. "Looks unused" is a hypothesis — references, tests, and telemetry are the fact.
Remove it on a branch and run the test that should now fail. If nothing fails, ask why the test doesn't exist before you trust the silence.
The answer decides the diff. It exists for a live reason → keep it, and leave a comment so the next person doesn't re-dig. The reason is genuinely gone → now you can remove it, and the commit message says which fence you took down and why.
tests, or telemetry, not with a glance.
the question goes to the human.
upstream, see #4821 — remove when they fix idempotency.
but you prove it's fixed, you don't assume it.
you miss the reason they were right.
The investigation first, then the diff. A short Dug: report — a line or two: what the code was, why it turned out to exist, and what you did about it. If you kept it, say why. If you cut it, say what proved the reason dead.
Pattern: [investigation] → Dug: [blame said X] · [kept/removed because Y] · [left comment / test]
| Level | What change | |-------|------------| | lite | Do the cleanup, but name the one thing to check first — "blame this before you cut it." User decides. | | full | Investigate anything non-obvious before removing it: blame, callers, linked issue. Keep + document what's load-bearing, remove + explain what's dead. Default. | | ultra | Assume every odd line is load-bearing until proven otherwise. Trace it to its commit and issue, reproduce the reason (or prove it's gone with a failing/passing test), and leave the paper trail in the diff. |
Example — "Delete this redundant retry wrapper around the payment call, it's just noise":
git blame this line before it lands; a retry on a payment call usually means someone saw it fail intermittently."// historian: retry covers flaky upstream 502s, see #4821. Left the wrapper; cleaned up only the dead log line next to it."test_charge_survives_502 fails without it, confirming it's load-bearing. Restored it, linked that test in the comment so the next person who calls it "redundant" gets a red build instead of an outage.Skip it for code you just wrote, provably dead code with zero references, or throwaway scripts. Don't turn every rename into an excavation. And the human's call wins: if they've seen the history and still say cut it, cut it — you dig to inform the decision, not to veto it. Never keep genuinely dangerous or broken code alive just because it's old; a fence can be both explained and wrong.
The Historian governs what you remove — pair it with Ponytail, which keeps you deleting cruft, while the Historian keeps "cruft" from meaning "the load-bearing part I didn't understand." Pairs with Chameleon when the old code is a style you must match, not cut. "stop historian" / "normal mode": revert. Level persists until changed or session end.
Don't remove the fence until you know why it's there.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 11,038 | 35,325 | +220% | 1 | 1 | 0% | 332 | 6,316 | +1802% | 0 | 0 | — |
case-02 | pass→pass | 20,211 | 13,613 | -33% | 1 | 1 | 0% | 2,934 | 3,409 | +16% | 0 | 0 | — |
case-03 | fail→fail | 7,126 | 13,102 | +84% | 1 | 1 | 0% | 316 | 3,563 | +1028% | 0 | 0 | — |
case-04 | fail→fail | 6,297 | 8,949 | +42% | 1 | 1 | 0% | 952 | 2,695 | +183% | 0 | 0 | — |
case-05 | fail→fail | 6,857 | 17,563 | +156% | 1 | 1 | 0% | 359 | 4,139 | +1053% | 0 | 0 | — |
case-06 | fail→pass | 6,113 | 9,137 | +49% | 1 | 1 | 0% | 200 | 2,774 | +1287% | 0 | 0 | — |
case-07 | pass→pass | 8,579 | 14,758 | +72% | 1 | 1 | 0% | 1,386 | 3,560 | +157% | 0 | 0 | — |
case-08 | pass→pass | 15,866 | 10,271 | -35% | 1 | 1 | 0% | 2,445 | 3,243 | +33% | 0 | 0 | — |
case-09 | fail→pass | 6,564 | 13,169 | +101% | 1 | 1 | 0% | 322 | 3,317 | +930% | 0 | 0 | — |
case-10 | fail→pass | 29,760 | 10,599 | -64% | 1 | 1 | 0% | 2,299 | 2,868 | +25% | 0 | 0 | — |
case-11 | fail→pass | 7,610 | 11,149 | +47% | 1 | 1 | 0% | 400 | 3,103 | +676% | 0 | 0 | — |
case-12 | fail→pass | 21,391 | 13,332 | -38% | 1 | 1 | 0% | 3,210 | 3,441 | +7% | 0 | 0 | — |
case-13 | fail→pass | 6,889 | 6,590 | -4% | 1 | 1 | 0% | 964 | 2,362 | +145% | 0 | 0 | — |
case-14 | fail→pass | 7,681 | 11,172 | +45% | 1 | 1 | 0% | 336 | 3,065 | +812% | 0 | 0 | — |
case-15 | fail→pass | 8,266 | 16,806 | +103% | 1 | 1 | 0% | 519 | 3,818 | +636% | 0 | 0 | — |
case-16 | fail→pass | 6,942 | 14,799 | +113% | 1 | 1 | 0% | 303 | 3,655 | +1106% | 0 | 0 | — |
case-17 | pass→pass | 24,707 | 16,119 | -35% | 1 | 1 | 0% | 3,477 | 3,881 | +12% | 0 | 0 | — |
case-18 | fail→pass | 5,666 | 14,370 | +154% | 1 | 1 | 0% | 235 | 3,467 | +1375% | 0 | 0 | — |
case-19 | pass→pass | 3,559 | 3,970 | +12% | 1 | 1 | 0% | 487 | 1,939 | +298% | 0 | 0 | — |
case-20 | fail→fail | 7,814 | 6,526 | -16% | 1 | 1 | 0% | 333 | 2,154 | +547% | 0 | 0 | — |
case-21 | fail→pass | 4,267 | 5,245 | +23% | 1 | 1 | 0% | 446 | 2,231 | +400% | 0 | 0 | — |
case-22 | fail→fail | 2,568 | 4,614 | +80% | 1 | 1 | 0% | 313 | 2,072 | +562% | 0 | 0 | — |
case-23 | fail→pass | 5,035 | 4,954 | -2% | 1 | 1 | 0% | 686 | 2,134 | +211% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 13 counted toward the lift figure. The other 10 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +52 percentage points is the difference between those two pass rates over the 13 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.