apply-goodharts-law

apply-goodharts-law is a skill for Claude Code from jeffreytse/grimoire-core. It costs 64 tokens per session (1,704 once invoked), scanned A, original, MIT.

A guide to choosing and managing metrics when people can change their behaviour to improve the number rather than the real outcome. Goodhart's Law means that a measure often becomes less useful once it becomes a target.

In plain words
What is it for?
It helps design better metrics, review misleading trends, and add checks for gaming or divergence between reported numbers and desired results.
Why use it?
It helps prevent teams from meeting KPIs, OKRs, machine-learning goals, or service targets while actual performance gets worse.

Skill for Claude Code

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

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

Good fit It helps design better metrics, review misleading trends, and add checks for gaming or divergence between reported numbers and desired results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jeffreytse/grimoire-core/apply-goodharts-law
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-goodharts-law
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 145 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-goodharts-law

README.md
[![agentmods](https://agentmods.dev/badge/skills/jeffreytse/grimoire-core/apply-goodharts-law/github.svg)](https://agentmods.dev/skills/jeffreytse/grimoire-core/apply-goodharts-law)
Your own site
<a href="https://agentmods.dev/skills/jeffreytse/grimoire-core/apply-goodharts-law"><img src="https://agentmods.dev/badge/skills/jeffreytse/grimoire-core/apply-goodharts-law/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-goodharts-law

Your own site · 80×15
<a href="https://agentmods.dev/skills/jeffreytse/grimoire-core/apply-goodharts-law"><img src="https://agentmods.dev/badge/skills/jeffreytse/grimoire-core/apply-goodharts-law.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,704 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.00064 $0.01704
Opus 5 $0.00032 $0.00852
Sonnet 5 $0.00013 $0.00341
Haiku 4.5 $0.00006 $0.00170

Measured 8d ago against content hash d5db82ea74bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

apply-goodharts-law 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 8d 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-goodharts-law/SKILL.md · 68 lines

How it starts

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

Apply Goodhart's Law

Treat any metric adopted as an optimization target as a metric that will start diverging from the outcome it was meant to represent — and design measurement systems that detect or resist that divergence instead of assuming a good proxy stays good once targeted.

Why This Is Best Practice

Origin: Charles Goodhart formulated the law in 1975 while critiquing UK monetary policy: once a central bank targets a particular measure of money supply, its statistical relationship with inflation breaks down, because people change behavior specifically to hit the targeted measure. Marilyn Strathern's 1997 generalization — "When a measure becomes a target, it ceases to be a good measure" — is the widely cited modern form and extends the mechanism far beyond monetary policy to any human system with a measured target.

Adopted by: Independently rediscovered in social science as Campbell's Law (Donald Campbell, 1976) for evaluating social programs and test-based education metrics — two separate fields converging on the same mechanism is itself evidence of how general the failure mode is. OKR literature (Doerr, Measure What Matters) explicitly warns against tying OKRs to compensation for exactly this reason, and ML engineering practice treats "reward hacking" / "specification gaming" in trained models as a direct instance of the same law applied to a training objective rather than a human incentive.

Impact: Historical instances are well documented and falsifiable: the Soviet nail-factory quota (measuring nails by weight produced a few giant useless nails; measuring by count produced huge numbers of tiny useless ones), UK police forces improving "crimes solved" rates by reclassifying or declining to record crimes rather than solving more of them, and standardized-testing "teaching to the test" narrowing actual educational outcomes while scores rise. In ML, models trained against a proxy reward metric repeatedly find degenerate policies that maximize the metric while failing the actual task (documented specification-gaming case collections from DeepMind and OpenAI).

Read the full file on GitHub · 68 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. 8d ago First seen · 68 lines · 64 tokens per session scan A d5db82ea74bb

Subscribe to this mod's changes

apply-goodharts-law is a skill published in the GitHub repository jeffreytse/grimoire-core (4 stars, last pushed 23d ago), licensed MIT. It adds 64 tokens to every session and 1,704 once invoked, about $0.0003 per session on Opus 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.