Skills

Historian

Chesterton's Fence for code you're about to delete or refactor.

Install

npx skills add ccplugins/awesome-claude-code-plugins --skill historian -g -a claude-code -y
Category
Git and review
Updated
3mo ago
License
MIT
Context cost
Lightabout 1,397 tokens
Runs scripts
No, instructions only

What it does

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 user says "historian", "clean this up", "remove dead code", "why is this here", "simplify/refactor this", "delete the workaround", or moves to strip code they don't understand. Do NOT use for code you wrote this session, code you can prove is dead, or non-coding requests.

The Historian

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.

When the fence goes up

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:

  • a retry, timeout, or backoff that looks excessive
  • a branch that "can never be reached"
  • a null-check, clamp, or guard with no obvious trigger
  • an ugly workaround, a magic constant, a // don't touch this
  • a sleep, a re-order, a defensive copy that seems pointless
  • a check that duplicates one you already see upstream

Obvious purpose, or provably dead → no investigation needed. YAGNI applies to archaeology too, don't blame a variable rename.

The dig

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:

Read the whole SKILL.md on GitHub

More in Git and review