From context-file-linter
Analyzes CLAUDE.md, AGENTS.md, and similar repository context files for effectiveness based on peer-reviewed research. Identifies instructions that hurt agent performance, redundant content, and unnecessary requirements. Use when reviewing a CLAUDE.md, auditing an AGENTS.md, optimizing context files, or when the user says "lint my CLAUDE.md", "review my AGENTS.md", "is my context file good", "optimize my context file", or "check my CLAUDE.md".
How this skill is triggered — by the user, by Claude, or both
Slash command
/context-file-linter:context-file-lintThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyze repository context files (CLAUDE.md, AGENTS.md, etc.) against findings from peer-reviewed research on context file effectiveness. This analysis is based on "Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?" (Gloaguen, Mundler, Muller, Raychev, Vechev — ETH Zurich / LogicStar.ai, 2026).
Analyze repository context files (CLAUDE.md, AGENTS.md, etc.) against findings from peer-reviewed research on context file effectiveness. This analysis is based on "Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?" (Gloaguen, Mundler, Muller, Raychev, Vechev — ETH Zurich / LogicStar.ai, 2026).
For the full research summary, see RESEARCH-FINDINGS.md.
Analyze every section of the context file using these 7 research-backed checks. Each check produces PASS, WARN, or FAIL.
Research finding: Codebase overviews (directory listings, component descriptions) do NOT help agents find relevant files faster. In 100% of tested LLM-generated files, overviews were present. They provided zero measurable benefit.
FAIL if the section:
PASS if:
Recommendation: Remove codebase overviews entirely. Agents discover structure faster on their own through file exploration tools.
Research finding: LLM-generated context files are highly redundant with existing documentation. When all other docs were removed, context files actually helped (+2.7%). This proves context files duplicate existing docs, and that duplication hurts.
FAIL if the section:
PASS if:
Recommendation: Before adding any instruction, check: "Can the agent discover this from existing files?" If yes, don't add it.
Research finding: Context file instructions ARE followed by agents. This means unnecessary requirements actively make tasks harder. Every followed instruction costs extra steps, tokens, and reasoning. Across all models and agents, context files increased steps by 2-4 per task and cost by 20-23%.
FAIL if the section:
WARN if the section:
PASS if:
Recommendation: For each instruction, ask: "If I remove this, will the agent produce meaningfully worse results?" If the answer is unclear, remove it.
Research finding: Agents follow instructions, so generic advice (code quality, security, testing) causes agents to spend more tokens reasoning about compliance rather than solving the task. Reasoning token usage increased 10-22% with context files.
FAIL if the section:
PASS if:
db.query() instead of raw SQL because it handles connection pooling"Recommendation: Remove all generic advice. Only keep project-specific rules that an agent couldn't infer from the code.
Research finding: LLM-generated context files have a negative effect on task success (average -0.5% to -3%) compared to no context file at all. Auto-generated files via /init commands consistently performed worse than having no context file.
WARN if the file:
/init)/init output or Codex's initRecommendation: If the file was auto-generated, consider deleting it entirely and writing only the 3-5 instructions that actually matter.
Research finding: Developer-written context files provided marginal improvement (+4%) when they contained minimal, specific requirements — particularly non-obvious tooling choices (e.g., "use uv instead of pip", "run tests with pdm run pytest").
PASS if the section contains:
These are the ONLY types of instructions research shows are helpful.
Research finding: Every instruction in a context file increases the agent's step count and inference cost. Files should be as short as possible.
FAIL if:
WARN if:
PASS if:
Present the analysis as:
## Context File Lint Report: [filename]
### Summary
- Total sections analyzed: [N]
- PASS: [N] | WARN: [N] | FAIL: [N]
- Estimated token overhead: [low/medium/high]
- Overall verdict: [EFFECTIVE / NEEDS WORK / COUNTERPRODUCTIVE]
### Section-by-Section Analysis
#### Section: "[section heading]"
[Quote the section or summarize it]
| Check | Result | Detail |
|-------|--------|--------|
| Codebase Overview | PASS/WARN/FAIL | [why] |
| Redundancy | PASS/WARN/FAIL | [why] |
| Unnecessary Requirements | PASS/WARN/FAIL | [why] |
| Generic Best Practices | PASS/WARN/FAIL | [why] |
| LLM-Generated | PASS/WARN/FAIL | [why] |
| Minimal Requirements | PASS/WARN/FAIL | [why] |
(repeat for each section)
### Token Cost Analysis
| Check | Result | Detail |
|-------|--------|--------|
| Size | PASS/WARN/FAIL | [word count, assessment] |
### Recommended Actions
1. **REMOVE:** [sections/instructions to delete entirely]
2. **KEEP:** [sections/instructions that are research-backed effective]
3. **REWRITE:** [sections that have useful content but need to be shortened/focused]
### Suggested Minimal Version
[Write a concise replacement that keeps only research-backed effective content]
When writing the suggested minimal version:
uv run pytest for tests" beats "make sure to test your changes"npx claudepluginhub ilyagulya/claude-marketplace --plugin context-file-linterCreates minimal, high-signal CLAUDE.md and AGENTS.md context files for repos using empirical best practices. Triggers on /init, create/update requests, or missing context during brainstorming.
Validates and evolves AGENTS.md to ensure AI agents have accurate project context. Use after code changes, onboarding, or periodically.
Generates or updates CLAUDE.md context files from a codebase scan, producing focused files under 100 lines with build commands, conventions, and gotchas. Supports create, update, and audit modes.