# Historian

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

- Repository: https://github.com/ccplugins/awesome-claude-code-plugins (991 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-08-12
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add ccplugins/awesome-claude-code-plugins --skill historian -g -a claude-code -y`
Codex: `npx skills add ccplugins/awesome-claude-code-plugins --skill historian -g -a codex -y`
Cursor: `npx skills add ccplugins/awesome-claude-code-plugins --skill historian -g -a cursor -y`
Gemini CLI: `npx skills add ccplugins/awesome-claude-code-plugins --skill historian -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add ccplugins/awesome-claude-code-plugins`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

The rest: https://github.com/ccplugins/awesome-claude-code-plugins/blob/HEAD/plugins/bullpen/skills/historian/SKILL.md
