update-agent-context

update-agent-context is a skill for Claude Code from mostlyharmless-ai/watercooler. It costs 203 tokens per session (13,698 once invoked), scanned A, original, Apache-2.0.

A maintenance workflow for keeping CLAUDE.md, AGENTS.md, and skill instructions short, current, and consistent. It can refactor or audit these files without committing changes.

In plain words
What is it for?
Use it to rebuild instruction files, derive AGENTS.md from CLAUDE.md, check skill references, and produce a list of needed fixes.
Why use it?
Project instructions often become outdated, duplicated, or contradictory. This workflow helps expose and organize that drift before it causes agents to behave incorrectly.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the watercooler plugin — 7 skills, 1 MCP server shipped together

Good fit Use it to rebuild instruction files, derive AGENTS.md from CLAUDE.md, check skill references, and produce a list of needed fixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mostlyharmless-ai/watercooler/update-agent-context
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.

Any agent
npx skills add mostlyharmless-ai/watercooler --skill update-agent-context
Clone the repo
git clone --depth 1 https://github.com/mostlyharmless-ai/watercooler

Made for: Claude Code.

Or install watercooler, the plugin that ships this one along with the rest of its 7 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for update-agent-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/mostlyharmless-ai/watercooler/update-agent-context/github.svg)](https://agentmods.dev/skills/mostlyharmless-ai/watercooler/update-agent-context)
Your own site
<a href="https://agentmods.dev/skills/mostlyharmless-ai/watercooler/update-agent-context"><img src="https://agentmods.dev/badge/skills/mostlyharmless-ai/watercooler/update-agent-context/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for update-agent-context

Your own site · 80×15
<a href="https://agentmods.dev/skills/mostlyharmless-ai/watercooler/update-agent-context"><img src="https://agentmods.dev/badge/skills/mostlyharmless-ai/watercooler/update-agent-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 203 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 13,698 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00203 $0.13698
Opus 5.5 $0.00081 $0.05479
Sonnet 5.5 $0.00041 $0.02740
Haiku 4.5 $0.00020 $0.01370

Measured 1mo ago against content hash b11c2dfd508e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

update-agent-context 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 1mo ago.

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.

plugins/claude/watercooler/skills/update-agent-context/SKILL.md · 1,098 lines

How it starts

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

Update Agent Context

Overview

Keeps CLAUDE.md and AGENTS.md short, current, and auditable. CLAUDE.md is the source of truth; AGENTS.md is derived from it. The skill edits the working tree and shows a diff — it does not commit. Use /ship to commit after review.

Arguments: /update-agent-context [--phase1 | --phase2 | --phase3 | --all]

--all runs Phase 1, then Phase 2, then Phase 3 in sequence. Default when no flag is given: ask the user which phase to run.

Phase 3 is read-only — it audits the skill surface and produces a punch list. It does not edit any file. Run it after any watercooler-cloud tool-surface consolidation, or whenever a skill call unexpectedly fails because its tool name no longer exists.


Phase 1 — Structural Refactor or From-Scratch Seed

Run to (re)build CLAUDE.md on the approved structure and derive a fresh AGENTS.md. Phase 1 has two modes; Step 0 selects between them.

Step 0: Select mode

Check whether CLAUDE.md exists at the repo root.

  • Refactor mode — CLAUDE.md exists. The current file is the primary content reservoir: carry its section content forward, fact-checked against source (Step 4). This is the common case (also use it after a major tool or role refactor).
  • From-scratch seed mode — CLAUDE.md is absent. There is no reservoir; every section's content must be built from the grounding sources named in Steps 3–4 (source files, onboarding seeds, observed codebase patterns) plus the per-section content checklists in Step 5. Steps that read or diff the old file — Step 2, and the "carry forward" half of Step 4 — are skipped. Where a micro-convention has no file or seed source, infer it from the dominant pattern in the codebase and mark it inferred in the Step 8 diff so the user can confirm or correct it.

State the selected mode at the top of the run.

Step 1: Measure

Compute current sizes, measuring only files that exist (in from-scratch seed mode neither file is present, and a new repo may lack AGENTS.md even in refactor mode — a bare wc CLAUDE.md AGENTS.md would exit non-zero):

Read the full file on GitHub · 1,098 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. 1mo ago First seen · 1,098 lines · 203 tokens per session scan A b11c2dfd508e

Subscribe to this mod's changes

update-agent-context is a skill published in the GitHub repository mostlyharmless-ai/watercooler (14 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 203 tokens to every session and 13,698 once invoked, about $0.0008 per session on Opus 5.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-30.