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.
npx agentmods add skills/knitli/toolshed/context-hygienenpx skills add knitli/toolshed --skill context-hygienegit clone --depth 1 https://github.com/knitli/toolshedWrote 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/knitli/toolshed/context-hygiene)<a href="https://agentmods.dev/skills/knitli/toolshed/context-hygiene"><img src="https://agentmods.dev/badge/skills/knitli/toolshed/context-hygiene.svg" alt="Measured on agentmods" 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 | $0.00036 | $0.00771 |
| Opus 5 | $0.00018 | $0.00385 |
| Sonnet 5 | $0.00007 | $0.00154 |
| Haiku 4.5 | $0.00004 | $0.00077 |
Grade A, and why
context-hygiene 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Hygiene
When working in this repository, be aware that AI context files (CLAUDE.md, AGENTS.md, Serena memories, Cursor rules, etc.) can become stale and contradictory. This skill helps you maintain context hygiene.
Known context file locations
The authoritative, plugin-wide list of known context files and locations lives at ${CLAUDE_PLUGIN_ROOT}/data/context-files.ini. Read that file when you need exact paths, globs, or to check whether a particular file is a recognized context file. It is the single source of truth and is updated as new ecosystems are added.
At a high level, the plugin recognizes these ecosystems:
- Agent memory files:
CLAUDE.md(Claude Code),AGENTS.md(universal),GEMINI.md(Gemini),CRUSH.md(Crush),.cursorrules/.cursor/rules/*.mdc(Cursor),.windsurfrules(Windsurf),.continuerules(Continue),.clinerules(Roo/Cline),.aider.conf.yml(Aider) - Tool directories:
.claude/,.gemini/,.codex/,.cursor/,.continue/,.roo/,.serena/,.specify/,.github/agents/,.github/skills/ - Planning / output:
claudedocs/,specs/,plans/,planning/,info/ - Config:
.mcp.json,.vscode/mcp.json,.vscode/settings.json
This overview is for quick orientation. Do not rely on it for exact-match scanning — use the INI.
Rules for maintaining context hygiene
When you modify code
After making significant changes (renaming files, changing versions, restructuring modules, adding/removing dependencies), check whether any context files reference the things you changed. Update them if so.
Pay special attention to:
- CLAUDE.md — often contains path references, version numbers, and structural descriptions
- AGENTS.md — if it exists, likely shares content with CLAUDE.md or should be kept in sync
- Tool-specific memories (Serena, spec-kit) — may have outdated snapshots of project state
When you read context files
Treat claims in context files with appropriate skepticism. Cross-reference against actual code before relying on:
- Specific version numbers
- File path references
- Structural counts ("N crates", "N languages")
- Architecture descriptions
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.
- 3d ago First seen · 59 lines · 36 tokens per session scan A 7672d4c6da55
context-hygiene is a skill published in the GitHub repository knitli/toolshed (1 stars, last pushed 4mo ago), licensed MIT. It adds 36 tokens to every session and 771 once invoked, about $0.0002 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-08-31.
Other skills, from other repositories
motherduck-build-cfa-app
Design a MotherDuck-backed customer-facing analytics app. Use for embedded analytics, multi-tenant SaaS reporting, or product analytics for external users -- whenever the decision depends on per-customer isolation, backend routing, service-account boundaries, read scaling, or Hypertenancy-style patterns.
motherduck-build-dashboard
Build a live MotherDuck dashboard as a Dive. Use when composing one shareable KPI, trend, and breakdown story over existing MotherDuck data, especially when the result should stay a saved workspace artifact rather than a full application.
motherduck-build-data-pipeline
Design an end-to-end MotherDuck data pipeline. Use for ETL/ELT workflows -- choosing raw, staging, and analytics boundaries, bulk ingestion paths, transformation sequencing, dlt/dbt integration, publication targets, or whether DuckLake is actually required.
motherduck-connect
Connect to MotherDuck from any application. Use when setting up database connectivity via the Postgres endpoint (recommended), pgduckdb, native DuckDB API, or JDBC. Covers connection strings, authentication, SSL, and environment variable configuration.
motherduck-create-dive
Create, edit, manage, share, or embed MotherDuck Dives — live React + SQL dashboards, charts, and data apps saved in the workspace. Use for any dashboard, chart, KPI display, or data visualization over MotherDuck data, and for Dive authoring mechanics such as getdiveguide, useSQLQuery, local preview, version history…
motherduck-create-flight
Create, schedule, run, and debug MotherDuck Flights — Python jobs that run on MotherDuck compute. Use whenever someone wants to create a flight, schedule a Python script or recurring job on MotherDuck, set up scheduled ingestion from Postgres, dlt sources, S3, BigQuery, Snowflake, or APIs, refresh aggregates or…