context-police

context-police is a skill for Claude Code from wan-huiyan/claude-ecosystem-hygiene. It costs 349 tokens per session (8,435 once invoked), scanned C, original, MIT.

A catalog review tool for agent skills and tools. It examines large always-loaded catalogs that can increase each request's context and overwhelm agents with smaller context limits.

In plain words
What is it for?
Use it to measure and curate a growing skills catalog, especially in setups that automatically add new skills over time.
Why use it?
It helps identify unnecessary catalog entries and reduce the amount of repeated information sent to the agent and its sub-agents.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT variable. Also seen: reads .claude/ paths; mentions subagents; positional $N argument.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the context-police plugin — 1 skill shipped together

Good fit Use it to measure and curate a growing skills catalog, especially in setups that automatically add new skills over time.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add wan-huiyan/claude-ecosystem-hygiene
Claude Code
/plugin install context-police

Made for: Claude Code.

Or install context-police, the plugin that ships this one along with the rest of its 1 skill.

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 context-police

README.md
[![agentmods](https://agentmods.dev/badge/skills/wan-huiyan/claude-ecosystem-hygiene/context-police/github.svg)](https://agentmods.dev/skills/wan-huiyan/claude-ecosystem-hygiene/context-police)
Your own site
<a href="https://agentmods.dev/skills/wan-huiyan/claude-ecosystem-hygiene/context-police"><img src="https://agentmods.dev/badge/skills/wan-huiyan/claude-ecosystem-hygiene/context-police/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 context-police

Your own site · 80×15
<a href="https://agentmods.dev/skills/wan-huiyan/claude-ecosystem-hygiene/context-police"><img src="https://agentmods.dev/badge/skills/wan-huiyan/claude-ecosystem-hygiene/context-police.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 349 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,435 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00349 $0.08435
Opus 5 $0.00175 $0.04217
Sonnet 5 $0.00070 $0.01687
Haiku 4.5 $0.00035 $0.00843

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

Security

Grade C, and why

context-police scanned grade C with 2 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 11d ago.

The scan reads SKILL.md. This mod also ships 15 executable files (scripts/apply_disable_model_invocation.py, scripts/check_skill_descriptions.py, scripts/pilot/audit_classifier.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

[ -f "$S" ] || S="$(find -L "$HOME/.claude/plugins/cache" -mindepth 7 -maxdepth 7 \

Enumerates other installed skillsmediumAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

--settings .claude/settings.json [--skills-dir ~/.claude/skills] \
plugins/context-police/SKILL.md · 407 lines

How it starts

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

context-police — skills-catalog audit, curation & measurement in agent harnesses

(formerly skills-catalog-context-cost-skilloverrides-scoping. v2.0.0 reframe: the problem + method are harness-agnostic; the Claude Code levers are ONE implementation. Earlier versions were Claude-Code-only, and a big chunk of that work was superseded when harnesses added native budgets — see "History" at the bottom.)

The problem (any harness with an always-on skill catalog)

An agent harness injects the listing of available skills/tools (names + descriptions) into context every turn, and into every sub-agent's base context. An auto-minting loop (claudeception-style: ~1 new skill/session) grows that catalog unboundedly, and every entry is force-loaded forever. Two real effects: (a) per-turn and per-subagent token cost that multiplies on fan-out (a trivial subagent was observed carrying ~30k tokens of base context for a one-word reply); (b) small-context agent types overflow on launch ("Prompt is too long", 0 tokens). Skill bodies lazy-load on use on every modern harness — it's the always-on listing that's the tax.

The portable core — this is what travels to ANY harness

The levers further down are platform-specific; these ideas are not — they're information architecture + arithmetic.

  1. Catalog cost is real and multiplies per sub-agent. Measure it (appendix recipe), don't hand-wave.
  2. Most auto-minted "skills" are episodic lessons, not skills — single-incident gotchas (flask-flash-silently-dropped-…). A lesson belongs in a searchable archive surfaced on demand, not the always-loaded catalog. The bloat is a knowledge base in the wrong substrate.
  3. Curate by description INTENT, never name shape. Warning-shaped names are often real traps; command-shaped "lessons" exist. A hyphen-count heuristic mislabeled 171/886 skills. The discriminator: does the agent go LOOKING for it BY NAME (procedure → keep) or does it only help if SURFACED REACTIVELY to warn of a specific mistake (trap → curation candidate)?
  4. Conservative, asymmetric bias. Hiding a real procedure (or restoring a user command) is the silent, costly error; failing to hide a trap is harmless (a few unrealized tokens). When in doubt, take the harmless side.
  5. A "hide from auto-invocation" flag has TWO roles — don't conflate them (the reverse-audit footgun, below). One is context-saving; the other is the correct config for a user slash-command.
  6. Retrieval can't replace force-load for a dense trap corpus — proven base-rate wall (History, below). Curation + the agent's own grep-lessons-on-task-start discipline is the lever; an on-demand hook can assist, not replace.
  7. Once a harness has a native budget, the forward hide-sweep is largely played out — it then reclaims only bare names. The durable value shifts to relevance-scoping + reading the diagnostics right + NOT over-hiding.

Read the full file on GitHub · 407 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. 11d ago First seen · 407 lines · 349 tokens per session scan C 48ed5d95d51a

Subscribe to this mod's changes

context-police is a skill published in the GitHub repository wan-huiyan/claude-ecosystem-hygiene (1 stars, last pushed 25d ago), licensed MIT. It adds 349 tokens to every session and 8,435 once invoked, about $0.0017 per session on Opus 5. A static security scan graded it C with 2 findings (reads agent configuration directories, enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

session-handoff

End-of-session handoff that captures session knowledge, dispatches output across the canonical 7-bucket docs/ taxonomy (decisions/runbooks/analysis/references/reviews/handoffs/deliverables — aligned with memory-hygiene v3.3), triggers a doc-freshness reverse-lint + skill-freshness audit to catch stale normative…

wan-huiyan/context-baton · 247 tokens

successor-handoff

Use when orchestrating long-running autonomous work — overnight runs, multi-hour research, multi-track experiments, 10+ hour jobs — where a single Claude context window cannot hold the full run. Establishes a lean parent orchestrator, file-first subagents, and successor-handoff (fresh subagent spawned mid-run when…

wan-huiyan/context-baton · 163 tokens

ghost-blog

This skill should be used when the user wants to interact with a Ghost blog via its Content and Admin APIs. Relevant when the user says things like 'list my blog posts', 'create a new draft', 'publish my draft', 'schedule a post for tomorrow', 'upload an image to my blog', 'manage blog tags', 'show my Ghost site…

georgeguimaraes/claude-code-ghost · 118 tokens

top-design

Create award-winning, immersive web experiences at the level of Awwwards-featured agencies. Use when the user mentions "Awwwards quality", "make my site stunning", "scroll animations", "parallax storytelling", "cinematic web design", "portfolio site", or "brand experience". Also trigger when elevating a standard…

wondelai/skills · 113 tokens

traction-eos

Implement the Entrepreneurial Operating System (EOS) to align vision and execution across a company. Use when the user mentions "EOS", "Entrepreneurial Operating System", "V/TO", "quarterly rocks", "Level 10 meetings", "accountability chart", "IDS process", "my company feels chaotic", "we keep having the same…

wondelai/skills · 147 tokens

create-app

Guided journey from a raw app idea to a validated, cleanly architected first version that ships on a sustainable cadence. Orchestrates ten skills phase by phase - lean-startup, design-sprint, clean-architecture, domain-driven-design, clean-code, pragmatic-programmer, system-design, ios-hig-design, 37signals-way…

wondelai/skills · 217 tokens