context-audit — скилл для Claude Code: что делает и как установить
Находит противоречия, дубли и лишние правила в инструкциях агента — от CLAUDE.md до описаний MCP-инструментов. Формирует диф с кандидатами на удаление.
npx skills add Neeeophytee/finding-unknowns-skills --skill context-audit -a claude-codeЧто делает context-audit
Агент тратит бюджет рассуждений на разбор инструкций ещё до старта работы над задачей. Скилл собирает все слои контекста: файлы CLAUDE.md и AGENTS.md, тела скиллов, хуки и описания MCP-инструментов. Он читает их вместе, а не по отдельности, ведь скрытые конфликты возникают именно на стыке разных файлов.
Все найденные правила делятся на пять категорий: прямые конфликты, дубликаты, очевидные умолчания, blanket-запреты на худший случай и ключевые особенности репозитория. Первыми под нож идут противоречия и повторы. Если правило полезно лишь изредка, скилл рекомендует перенести его в отдельный скилл с загрузкой по требованию.
Скилл только предлагает изменения в виде дифа и ничего не удаляет сам. Инструкции, написанные после прошлых сбоев, требуют внимания человека. В конце отчёта агент явно показывает удаление, в котором уверен меньше всего.
Какие задачи решает
- найти противоречия между
CLAUDE.mdи описаниями инструментов - устранить дублирование инструкций на разных уровнях контекста
- подготовить диф для чистки раздутых файлов инструкций
- вынести редкие правила в отдельные скиллы с загрузкой по запросу
Примеры запросов агенту
- Проведи context-audit для файлов инструкций в этом репозитории
- Найди противоречия между CLAUDE.md и описаниями инструментов
- Проверь контекст агента и предложи список на удаление лишних правил
Как установить context-audit
1Через Skills CLI (Vercel)
npx skills add Neeeophytee/finding-unknowns-skills --skill context-audit -a claude-code2Вручную: положить файлы
~/.claude/skills/context-audit/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/context-audit/
1Через Skills CLI (Vercel)
npx skills add Neeeophytee/finding-unknowns-skills --skill context-audit -a codex2Вручную: положить файлы
.agents/skills/context-audit/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Neeeophytee/finding-unknowns-skills --skill context-audit -a cursor2Вручную: положить файлы
.cursor/skills/context-audit/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Neeeophytee/finding-unknowns-skills context-audit2Вручную: положить файлы
.github/skills/context-audit/SKILL.md1Через Skills CLI (Vercel)
npx skills add Neeeophytee/finding-unknowns-skills --skill context-audit -a gemini-cli2Командой платформы
gemini skills install https://github.com/Neeeophytee/finding-unknowns-skills --path skills/context-auditВручную: положить файлы
.devin/skills/context-audit/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Neeeophytee/finding-unknowns-skills --skill context-audit -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о context-audit
Как установить context-audit в Claude Code?
Выполните команду npx skills add Neeeophytee/finding-unknowns-skills --skill context-audit -a claude-code. Также можно вручную поместить файл скилла по пути ~/.claude/skills/context-audit/SKILL.md.
Что делает context-audit?
Он анализирует инструкции агента в проекте, находит дубликаты и противоречия между файлами. Итогом работы становится диф с кандидатами на удаление или перенос в отдельные скиллы.
Удаляет ли скилл найденные правила автоматически?
Нет, скилл только формирует предложение на удаление. Окончательное решение принимает разработчик, а самую спорную правку агент выделяет в отчёте отдельно.
Исходный текст
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