Context Updater

SkillFiles & storage

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.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Context Updater skill

What this skill tells your AI

The instructions your AI receives, as published by shaharia-lab/agento in .claude/skills/context-updater/SKILL.md and read by ahel’s review.

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

  1. Parse the time scope from the task (e.g., "last 7 days", "last 3 days")
  2. Run git log --oneline --since="N days ago" to find recent commits
  3. Run git log --since="N days ago" --stat to see which files were touched
  4. Read the commit messages to understand intent of each change
  5. Check merged PRs: git log --merges --since="N days ago" --oneline
  6. Extract PR numbers from merge commit messages (e.g. (#123) or Merge pull request #123)
  7. For each PR number found, run gh pr view <number> --json number,title,body,closingIssuesReferences to fetch the full PR description and any linked issues
  8. For each linked issue found in the PR, run gh issue view <number> --json number,title,body,comments to understand the original problem and requirements
  9. Use PR descriptions and issue context to supplement commit messages — PR/issue bodies often contain design decisions, rationale, and edge cases not captured in commits

Step 2: Read all current documentation

Read every documentation and context file:

  • CLAUDE.md — primary AI agent context (cross-cutting rules only)
  • every subsystem note (docs/internal/*.md) — one per area, indexed by the root file's Where the notes live table; subsystem detail goes there, never into the root file
  • 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:

  1. Read the full skill prompt
  2. Cross-reference against recent code changes and merged PRs
  3. 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?
  4. If improvements are warranted, make surgical edits — don't rewrite the whole skill
  5. 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:

  1. Read the actual changed code to understand the new state
  2. Check if any doc references this area
  3. Determine if the doc is now inaccurate, incomplete, or missing coverage
  4. Explicitly ask: does this feature have any documentation at all? If not, it needs a new doc
  5. Note what specifically needs updating or creating

Step 3a: Identify new features that need new docs

For every significant new feature or module introduced in the scoped commits/PRs:

  1. Check if a relevant doc already exists in docs/ or docs/dev/
  2. Determine the audience and place the doc accordingly:
    • docs/ — user-facing documentation: what the feature does, how to use it, how to configure it, workflows, examples. Written for end users, not engineers. Avoid internal implementation details.
    • docs/development.md — developer documentation: architecture, package internals, data flows, interfaces, design decisions. Written for contributors and maintainers. Add new sections here rather than creating separate files.
  3. A new user doc (docs/) is warranted when the feature introduces: a new user-facing capability, new configuration options, new UI workflows, new integrations a user sets up, or new API endpoints users call
  4. New developer content belongs in docs/development.md as a new well-organized section — warranted when the feature introduces: a new internal package/subsystem, significant architectural patterns, non-obvious data flows, or design decisions future contributors need to understand
  5. User docs should cover: what it does, why it's useful, how to enable/configure it, step-by-step usage, and common examples — no internal code details
  6. Dev docs should cover: package purpose, key types/interfaces, data flow, extension points, and gotchas — link to relevant source files
  7. Follow the style and structure of existing docs in the same directory

Step 4: Apply surgical updates and create missing docs

For each documentation gap found:

  1. Make the minimum change needed — don't rewrite sections that are still accurate
  2. Keep the existing style and tone of the document
  3. Be concise and direct — no fluff, no filler
  4. Create new docs in docs/ for any significant feature with no existing coverage — do not skip this step

What to Check

CLAUDE.md

This is the most critical file — AI agents read it on every interaction.

It is split (#553), and the root file is the only CLAUDE.md (#580). The root file holds only what every session needs; each subsystem has its own docs/internal/<area>.md (the root file's Where the notes live table is the index). When a change touches one subsystem, update that file. The root file must stay under 40,000 characters — scripts/check-claude-md-size.sh enforces it and CI fails otherwise — so a note that would push a file over the limit means splitting that file, not trimming the rule. Write rule → why → where it is enforced, not a narrative of the PR.

  • Commands section — are all build/test/lint commands still accurate?
  • Architecture section — does the request flow still match?
  • Backend layers — are all packages listed? Any new ones missing?
  • Frontend section — are key files and patterns still accurate?
  • Agent configuration — any new fields or template variables?
  • MCP integration — any changes to MCP setup?
  • Linting — any new linters or config changes?
  • Environment variables — any new required/optional vars?
  • Any new architectural patterns or conventions introduced?

README.md

  • Project description still accurate?
  • Installation/setup instructions still work?
  • Feature list up to date?
  • Screenshots or demos still current? (flag if likely outdated)
  • Links still valid?
  • Badge versions correct?

docs/ directory (user-facing)

  • Each doc file — does content match current behavior from a user's perspective?
  • New user-facing features with no existing doc? → create docs/<feature>.md
  • Are docs written for users (how-to, config, workflows) — not for developers (internals, architecture)?
  • Are there docs for features that were removed or significantly changed?
  • Do cross-references between docs still hold?
  • New integrations, configuration options, or UI workflows — are they documented for users?

docs/development.md (developer-facing)

  • New internal packages/subsystems introduced? → add a well-organized section to docs/development.md
  • New packages under internal/ — are they covered with technical details (data flows, interfaces, design decisions)?
  • Are sections that were significantly refactored updated to reflect the new architecture?

Claude skills (.claude/skills/*/SKILL.md)

For each skill, check:

  • File/package paths in instructions still exist in the codebase?
  • Commands, flags, and build steps are still accurate?
  • Step-by-step logic matches current architecture and conventions?
  • allowed-tools list covers what the skill actually needs?
  • New modules, patterns, or endpoints introduced by recent PRs are reflected where relevant?
  • Any skill scope can be meaningfully expanded given new capabilities in the codebase?

Other context files

  • Any config file comments that reference outdated behavior?
  • Makefile help text matches actual targets?

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

FileStatusChanges Made
CLAUDE.mdUpdated / Current[what changed]
README.mdUpdated / Current[what changed]
docs/X.mdUpdated / Current / Created[what changed]
.claude/skills/X/SKILL.mdUpdated / 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
  • ALWAYS create a new doc in docs/ for any significant new feature/subsystem that has no existing coverage — this is not optional
  • If creating a new doc, follow the style and structure of existing docs in the same directory
  • Flag docs that need human input (e.g., screenshots, external links) rather than guessing

Signals

GitHub stars
31
Forks
2
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
context-updater
Source
github.com/shaharia-lab/agento