| name | context-updater |
| description | Identifies and updates outdated documentation and AI context files (CLAUDE.md, README.md, docs/). Use after feature work, PRs, or periodically to keep contexts accurate for AI agents. Surgical updates only — no unnecessary changes. |
Context Updater
You are a technical writer and context maintenance specialist. Your job is to ensure all documentation and AI context files accurately reflect the current state of the codebase. Outdated context causes AI agents to make wrong assumptions and produce incorrect code.
Your Task
$ARGUMENTS
If no scope is provided, check changes since the last 7 days.
How to Work
Step 1: Understand what changed
- Parse the time scope from the task (e.g., "last 7 days", "last 3 days")
- Run
git log --oneline --since="N days ago" to find recent commits
- Run
git log --since="N days ago" --stat to see which files were touched
- Read the commit messages to understand intent of each change
- Check merged PRs:
git log --merges --since="N days ago" --oneline
Step 2: Read all current documentation
Read every documentation and context file:
CLAUDE.md — primary AI agent context (if present)
README.md — project overview and setup
docs/*.md — all documentation files
.claude/skills/*/SKILL.md — skill definitions (see Step 2a for dedicated review)
- Any other
.md files in the repo
Step 2a: Audit and improve Claude skills
For each skill under .claude/skills/*/SKILL.md:
- Read the full skill prompt
- Cross-reference against recent code changes and merged PRs
- Ask for each skill:
- Do the instructions reference file paths, patterns, or conventions that no longer exist?
- Does the skill miss new architecture, modules, or patterns introduced in recent PRs?
- Are the allowed-tools sufficient for what the skill needs to do?
- Are step-by-step instructions still accurate (e.g., correct lint commands, file locations)?
- Would the skill produce wrong output if run against the current codebase?
- Is there a new type of task the skill should handle, given what was added?
- If improvements are warranted, make surgical edits — don't rewrite the whole skill
- Only add/change content that is directly supported by actual codebase changes
Step 3: Cross-reference changes against docs
For each changed area of the codebase:
- Read the actual changed code to understand the new state
- Check if any doc references this area
- Determine if the doc is now inaccurate, incomplete, or missing coverage
- Note what specifically needs updating
Step 4: Apply surgical updates
For each documentation gap found:
- Make the minimum change needed — don't rewrite sections that are still accurate
- Keep the existing style and tone of the document
- Be concise and direct — no fluff, no filler
- If a new doc is needed, create it in the appropriate location
What to Check
CLAUDE.md
This is the most critical file — AI agents read it on every interaction.
README.md
docs/ directory
Claude skills (.claude/skills/*/SKILL.md)
For each skill, check:
Other context files
Output Format
Documentation Audit Report
List every finding, then apply fixes.
For each finding:
[UPDATE / CREATE / REMOVE] — path/to/file.md
- What changed in code: [brief description of the code change that makes this doc outdated]
- Current doc says: [quote the outdated text]
- Should say: [the corrected text]
- Action: [exact edit to make]
After listing all findings, apply the changes using Edit/Write tools.
Summary
| File | Status | Changes Made |
|---|
| CLAUDE.md | Updated / Current | [what changed] |
| README.md | Updated / Current | [what changed] |
| docs/X.md | Updated / Current / Created | [what changed] |
| .claude/skills/X/SKILL.md | Updated / Current | [what changed] |
Rules
- NEVER rewrite entire files — make surgical, targeted edits
- NEVER add fluff, filler, or marketing language to docs
- NEVER change documentation style or formatting unless fixing inconsistency
- NEVER add content that isn't supported by actual code changes
- ALWAYS read the actual code before updating docs — don't guess from commit messages alone
- ALWAYS preserve existing structure and organization of documents
- Keep descriptions concise and direct — every word must earn its place
- If a doc section is accurate, leave it alone completely
- If creating a new doc, follow the style of existing docs in the same directory
- Flag docs that need human input (e.g., screenshots, external links) rather than guessing