Skip to main content
skill CX Codex

context-audit — Claude Code skill: what it does, how to install

Scans agent instructions across CLAUDE.md, skills, and tools for conflicts and duplicates. Prepares a cut list as a diff to trim context size.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Neeeophytee/finding-unknowns-skills --skill context-audit -a claude-code
Open on GitHub

What context-audit does

Models spend thinking budget resolving instructions before tackling your prompt. This skill audits every directive layer reaching the agent, including root and nested CLAUDE.md, AGENTS.md, hooks, and MCP tool descriptions. Because contradictions occur between layers, it evaluates all sources together.

The audit sorts rules into five distinct buckets: conflicts, duplicates, obvious defaults, broad judgement calls, and essential repository invariants. It prioritizes direct contradictions and redundancy for removal. Anything useful but rarely triggered gets recommended for relocation into an on-demand skill.

Safety comes first. The skill proposes diffs but never deletes lines on its own. Rules addressing past incidents stay intact until verified. Each report highlights before-and-after line counts alongside the single deletion with the lowest confidence score.

What it helps with

  • identify direct contradictions between CLAUDE.md and MCP tool rules
  • remove duplicate guidance scattered across nested instruction files
  • generate a diff to rightsize bloated agent context
  • move occasional instructions into on-demand skills

Example prompts for the agent

  • Run context-audit on this repository
  • Audit CLAUDE.md and tool descriptions for contradictions
  • Rightsize agent context and propose a cut list

How to install context-audit

1Skills CLI (Vercel)

npx skills add Neeeophytee/finding-unknowns-skills --skill context-audit -a claude-code

2Manually: put the files in place

~/.claude/skills/context-audit/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/context-audit/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about context-audit

How to install context-audit in Claude Code?

Run npx skills add Neeeophytee/finding-unknowns-skills --skill context-audit -a claude-code in your terminal. You can also place the skill file directly at ~/.claude/skills/context-audit/SKILL.md.

What does context-audit do?

It reviews all instruction files and tool descriptions available to the model to uncover overlapping or contradictory rules. The output is a diff proposing specific lines to prune.

Does context-audit apply file changes automatically?

No, it strictly proposes deletions without modifying files directly. You review and approve every change, with the least certain recommendation explicitly highlighted.

Source text

SKILL.md · MIT
---
name: context-audit
description: Audit the instructions an agent already carries — CLAUDE.md, AGENTS.md, skills, tool descriptions — for contradictions, over-constraint, and duplication, then propose a cut list. Use when an agent ignores its own instructions, when a CLAUDE.md has grown bloated, or when the user asks to audit or rightsize their agent context.
---

# Context audit

A prompt is written for one task; context is reused across every task, so it can never be as specific. That gap is where instructions rot: rules written for a worst case that no longer happens, guidance duplicated across three layers, two layers quietly telling the model opposite things. The model can resolve all of it — by spending thinking budget on it before it starts your actual work. This skill finds what to delete.

## Steps

1. Inventory every layer that reaches the model: root and nested `CLAUDE.md`/`AGENTS.md`, each skill's description and body, hooks, tool and MCP server descriptions, and any harness prompt the user controls. Report each layer's size. The layer the user forgot they wrote is usually the loudest one.
2. Read them together, the way the model receives them — not one file at a time. Contradictions only exist between layers.
3. Classify every instruction as one of five things:
   - **Conflict** — two layers pulling opposite ways ("document as appropriate" against "never add comments"). Quote both sides verbatim. These are the most expensive finding and go first.
   - **Duplicate** — the same instruction in two places. Keep the copy nearest the point of use; behavior of a tool belongs in that tool's description, not in the global preamble.
   - **Obvious** — restates what the file tree, the language, or the surrounding code already shows.
   - **Judgement-now** — a blanket rule written to prevent a worst case, wrong for some real subset of requests, and the kind of call a current model makes well on its own.
   - **Gotcha** — non-obvious, specific to this repo, load-bearing. This is what should survive; most repos are mostly the other four.
4. Propose the cut as a diff: conflicts resolved first, then duplicates, then the rest. For anything that is worth keeping but only sometimes needed, propose relocating it into a skill or a linked file loaded on demand rather than deleting it.
5. Close with before/after line counts and the single deletion you are least confident about, named explicitly so a human decides that one.

## Guardrails

- Propose, don't apply. The user approves every deletion.
- A rule that reads as over-constraint is sometimes scar tissue from a real incident. Anything naming a specific failure gets asked about, not cut.
- Judge instructions by whether they change behavior, not by whether they sound wise. A line the model already follows by default costs tokens to say nothing.
- If the harness ships its own rightsizing command, this runs alongside it, not instead of it.
- An audit that deletes a real invariant costs far more than the tokens it saved. When a line's purpose is unclear, that ambiguity is the finding — report it rather than guessing.

© Neeeophytee · MIT · Neeeophytee/finding-unknowns-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set14

pitch-packager Turns a finished piece of work — spec, prototype, implementation notes — into one document a reviewer can read and approve in a single pass. CX Codex +1 ★ 355repo stars interview-me Interviews you one question at a time to clarify requirements before coding starts. It helps when brainstorming is finished but the technical spec still has open gaps. CX Codex +1 ★ 355repo stars implementation-plan This skill puts changeable decisions ahead of implementation chores in a build plan. Use it before development, especially after a brainstorm or requirements interview. CX Codex +1 ★ 355repo stars implementation-notes Keeps an implementation-notes.md file while you build, recording every departure from the plan and every edge case that turns up. CX Codex +1 ★ 355repo stars change-quiz This skill turns a work session into a change report and a merge quiz. Use it when a large diff needs review or you want to check what the change really affects. CX Codex +1 ★ 355repo stars brainstorm-prototypes A skill that produces 3–5 deliberately different throwaway variations — layouts, approaches, names — so you can react to them instead of describing what you want. CX Codex +1 ★ 355repo stars blindspot-pass Surfaces architectural traps and hidden project constraints before any code is written. It turns vague tasks in unfamiliar domains into informed prompts. CX Codex +1 ★ 355repo stars assumption-test This skill turns a consequential technical assumption into a small experiment with a clear verdict. Use it when code inspection alone cannot settle runtime, integration, or data behavior. CX Codex +1 ★ 355repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor