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.
/plugin marketplace add wan-huiyan/claude-ecosystem-hygiene/plugin install context-policeWrote 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.
[](https://agentmods.dev/skills/wan-huiyan/claude-ecosystem-hygiene/context-police)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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] \ 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.
- Catalog cost is real and multiplies per sub-agent. Measure it (appendix recipe), don't hand-wave.
- 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. - 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)?
- 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.
- 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.
- 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.
- 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.
What ships with it
17 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- .claude-plugin/plugin.json 848 B
- scripts/apply_disable_model_invocation.py 3.3 KB runs code
- scripts/check_skill_descriptions.py 29 KB runs code
- scripts/pilot/audit_classifier.py 1.5 KB runs code
- scripts/pilot/hook.py 3.9 KB runs code
- scripts/pilot/phase2_floor_sweep.py 5.2 KB runs code
- scripts/pilot/phase3_diagnose.py 3.8 KB runs code
- scripts/pilot/phase4_subagent_scan.py 17 KB runs code
- scripts/pilot/phase5_precision_gate.py 8.1 KB runs code
- scripts/pilot/phase6_mode_decompose.py 7.5 KB runs code
- scripts/pilot/phase7_margin_coverage.py 7.0 KB runs code
- scripts/pilot/phase8_embeddings_probe.py 9.2 KB runs code
- scripts/pilot/README.md 6.9 KB
- scripts/pilot/recompute_with_overrides.py 6.6 KB runs code
- scripts/pilot/replay_recall.py 6.2 KB runs code
- scripts/pilot/retrieve.py 7.3 KB runs code
- scripts/render_treatment_report.py 16 KB runs code
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.
- 11d ago First seen · 407 lines · 349 tokens per session scan C 48ed5d95d51a
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.
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…
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…
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…
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…
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…
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…