apply-chestertons-fence

apply-chestertons-fence is a skill for Claude Code from jeffreytse/grimoire-core. It costs 45 tokens per session (1,926 once invoked), scanned A, original, MIT.

A decision guide for changing an inherited system, process, or organisation after understanding why each part exists.

In plain words
What is it for?
Use it before modifying legacy code, established workflows, or organisational practices to investigate their purpose and decide what should remain.
Why use it?
It reduces the risk of removing a working safeguard whose original purpose is no longer obvious.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the grimoire-business plugin — 156 skills shipped together

Good fit Use it before modifying legacy code, established workflows, or organisational practices to investigate their purpose and decide what should remain.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jeffreytse/grimoire-core/apply-chestertons-fence
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jeffreytse/grimoire-core --skill apply-chestertons-fence
Clone the repo
git clone --depth 1 https://github.com/jeffreytse/grimoire-core

Made for: Claude Code.

Or install grimoire-business, the plugin that ships this one along with the rest of its 156 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for apply-chestertons-fence

README.md
[![agentmods](https://agentmods.dev/badge/skills/jeffreytse/grimoire-core/apply-chestertons-fence/github.svg)](https://agentmods.dev/skills/jeffreytse/grimoire-core/apply-chestertons-fence)
Your own site
<a href="https://agentmods.dev/skills/jeffreytse/grimoire-core/apply-chestertons-fence"><img src="https://agentmods.dev/badge/skills/jeffreytse/grimoire-core/apply-chestertons-fence/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for apply-chestertons-fence

Your own site · 80×15
<a href="https://agentmods.dev/skills/jeffreytse/grimoire-core/apply-chestertons-fence"><img src="https://agentmods.dev/badge/skills/jeffreytse/grimoire-core/apply-chestertons-fence.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,926 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01926
Opus 5.5 $0.00018 $0.00770
Sonnet 5.5 $0.00009 $0.00385
Haiku 4.5 $0.00005 $0.00193

Measured 1mo ago against content hash 090448feb67d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

apply-chestertons-fence scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/business/strategy/skills/apply-chestertons-fence/SKILL.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Apply Chesterton's Fence

Before modifying any element of an inherited working system, establish why that element exists — because systems that work encode solutions to problems no longer visible, and removing elements without that understanding destroys the solution along with the evidence of the problem.

Why This Is Best Practice

When Cao Can (曹参) became prime minister of Han (~188 BC), succeeding the legendary Xiao He, officials expected active reform. He changed nothing. When Emperor Hui pressed him on this "laziness," Cao Can asked two questions: Could the Emperor surpass Emperor Gaozu in wisdom? No. Could Cao Can surpass Xiao He? No. "Then," he said, "their laws and institutions are already clear. We have only to maintain them faithfully." 资治通鉴 records the era that followed as one of the most stable in Han history. Sima Guang cited this as evidence that maintaining a working system faithfully outperforms well-intentioned reform of a system you don't fully understand.

G.K. Chesterton articulated the same principle in "The Thing" (1929): "Don't ever take a fence down until you know the reason it was put up." The reformer who removes a fence without understanding it has not improved the system — they have removed a constraint whose purpose they couldn't see.

Adopted by: Amazon (two-way door vs. one-way door framework — one-way-door decisions, which are hard to reverse, require deep understanding of why the current state exists before reversal); Google, Netflix, Stripe (engineering principle: "don't refactor code you don't understand" — standard software engineering practice); McKinsey, BCG, Bain (diagnostic before solution is foundational methodology — understand current state thoroughly before prescribing change).

Impact: Deming "Out of the Crisis" (1986) mathematically demonstrated that "tampering" — adjusting a stable system without a model of why it works — consistently makes the system perform worse. His funnel experiment is a standard illustration in statistical process control education. Organizations that change working systems without understanding them routinely break what worked and then struggle to diagnose why, because the problem the system was solving is no longer visible once the solution is gone.

Read the full file on GitHub · 67 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 67 lines · 45 tokens per session scan A 090448feb67d

Subscribe to this mod's changes

apply-chestertons-fence is a skill published in the GitHub repository jeffreytse/grimoire-core (5 stars, last pushed 5d ago), licensed MIT. It adds 45 tokens to every session and 1,926 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.