context-updater

An agent that keeps AI context files up to date after structural project changes. It treats `AGENTS.md` as the main shared context file, then refreshes affected bridge files such as `CLAUDE.md` or `.cursorrules`.

In plain words
What is it for?
Use it after structural changes to detect affected context files and synchronize agent instructions across supported file formats.
Why use it?
It prevents coding agents from using stale instructions after commands, skills, configuration, or project structure change. Updating only affected files keeps shared guidance focused.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/littlebearapps/contextdocs/context-updater
Clone the repo
git clone --depth 1 https://github.com/littlebearapps/contextdocs

Made for: Claude Code.

Per session 88 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,192 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00088 $0.01192
Opus 5 $0.00044 $0.00596
Sonnet 5 $0.00018 $0.00238
Haiku 4.5 $0.00009 $0.00119

Measured yesterday against content hash 547fdcd1e5b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

context-updater scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/context-updater.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context Updater Agent

You are an autonomous agent that updates AI context files after structural project changes. You apply the Signal Gate principle — only include what agents cannot discover by reading source code.

When You Are Launched

You are typically launched by Claude Code in response to:

  • A Stop hook reporting context drift before session end
  • A commit guard blocking a commit due to missing context updates
  • A PostToolUse hook reporting structural file changes after the primary task is complete

Workflow

Step 1: Detect What Changed

# Find structural files with uncommitted changes
git status --porcelain | grep -E '(commands/.*\.md|\.claude/skills/.*/SKILL\.md|\.claude/agents/.*\.md|\.claude/rules/.*\.md|package\.json|pyproject\.toml|Cargo\.toml|go\.mod|tsconfig.*\.json|wrangler\.toml|vitest\.config|jest\.config|eslint\.config|biome\.json|\.claude-plugin/plugin\.json)'

Step 2: Identify Affected Context Files

Structural Change Context Files to Update
commands/*.md added/removed/modified Update AGENTS.md first, then CLAUDE.md, llms.txt, and only the bridge files whose tool-specific examples changed
.claude/skills/*/SKILL.md added/removed/modified Update AGENTS.md first, then CLAUDE.md and llms.txt if inventories or bridge guidance changed
.claude/agents/*.md added/removed/modified AGENTS.md, llms.txt
.claude/rules/*.md added/removed/modified AGENTS.md for shared policy summaries, CLAUDE.md for Claude-specific rule references
package.json, pyproject.toml, config files Update AGENTS.md first, then only the bridge files with tool-specific command or tooling notes

Step 3: Read Current State

For each affected context file that exists on disk:

  1. Read the current content
  2. Compare against the actual project state (count skills, commands, agents, rules)
  3. Treat AGENTS.md as the canonical shared context and identify which bridge references or tool-specific sections need updating

Read the full file on GitHub · 106 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 106 lines · 88 tokens per session scan A 547fdcd1e5b9

Subscribe to this mod's changes

context-updater is an agent published in the GitHub repository littlebearapps/contextdocs (5 stars, last pushed 1mo ago), licensed MIT. It adds 88 tokens to every session and 1,192 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

software-research-assistant

Implementation research on a specific named software library, framework, package, SDK, CLI, or API: usage, current best practices, version/compatibility facts, and source-traced code. Use for "how do I implement X" or "which package for Y". Not for general web research, market comparison, conceptual explainers, or…

sammcj/agentic-coding · 120 tokens

step-back

Use when you suspect the current approach is over-engineered, over-abstracted, or solving an imagined problem rather than the real one. Invokes a sceptical mid-task design review that will return it's analysis. Read-only - won't make changes.

sammcj/agentic-coding · 53 tokens

critical-reviewer

Fresh-context critical review of recent changes (code, documentation, plans, or designs). Read-only. Finds problems and reports prioritised findings for the caller to act on. Use when a self-review or critical review of completed work is requested.

sammcj/agentic-coding · 52 tokens

compression-editor

Use when the user, task, or situation calls for making written content more concise or terse - compressing, tightening, or cutting verbosity from prose, instructions, skills or documentation without losing meaning or signal. Do NOT use on source code, or to summarise (it preserves everything; it only says it shorter).

sammcj/agentic-coding · 66 tokens

quick-researcher

Fast, read-only web research that returns the shortest sufficient answer to a factual question, with a source link per claim. Use for "what/which/when/how much/is X still..." questions answerable from the live web without bloating the main conversation context. Not for software implementation guides (use…

sammcj/agentic-coding · 129 tokens

README

Ce dossier est réservé aux vrais subagents Claude Code : fichiers Markdown avec frontmatter YAML (name, description, tools, model, memory, hooks).

GlamgarOnDiscord/claude-saas-blueprint · 0 tokens