From claude-resources
Chesterton's Fence, dead-code removal, YAGNI discipline. Use when proposing to delete code, extract a function/class/interface, or introduce a new abstraction. Trigger on phrases like "do we need this?", "can we remove?", "should we extract?", "let me refactor this", "clean this up", or "simplify this" — and proactively whenever reviewing a PR that adds indirection, wrapper layers, or single-caller helpers. Pair with core/code-review and core/style.
npx claudepluginhub deandum/claude-resources --plugin go-skillsThis skill uses the workspace's default tool permissions.
The best code is code you don't write. The second best is code you deleted. Simpler code has fewer bugs, is faster to read, and is cheaper to change.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
The best code is code you don't write. The second best is code you deleted. Simpler code has fewer bugs, is faster to read, and is cheaper to change.
Before removing any code, branch, or abstraction, answer three questions:
If you can't answer all three, the fence stays.
YAGNI — You Aren't Gonna Need It. The rule:
Abstractions are inventory. Each one has a carrying cost: someone must read it, understand it, and route around it when it does not fit their case. The third coupled duplication tells you the real shape of the abstraction — wait for it.
Commented-out code is worse than deleted code:
If you hesitate to delete, you probably shouldn't be deleting yet. Confirm Chesterton's Fence first, then commit the delete.
A simpler codebase is one a new reader can navigate. The writer sees simplicity through their own context; that doesn't count. Ask: would someone new to this file, with no git history, understand what it does and why?
| Shortcut | Reality |
|---|---|
| "We might need it later." | You won't. And if you do, git log remembers. Delete it. |
| "It's harmless to leave it." | It isn't. It costs attention every time someone reads the file. |
| "Let me abstract this early so we don't duplicate later." | Premature abstraction locks in the wrong shape. Wait for three coupled duplications. |
| "I'll comment it out in case we need to restore it." | That's what version control is for. Delete it. |
| "It took me hours to write — I don't want to throw it away." | Sunk cost. If it's not used, it's not code. |
FooService → FooServiceImpl → FooServiceBase → …)