update-agent-context

update-agent-context is a skill for Claude Code, Codex 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 CodeCodex

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

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 skills/mostlyharmless-ai/watercooler/update-agent-context
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. 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.00203 $0.13698
Opus 5 $0.00102 $0.06849
Sonnet 5 $0.00041 $0.02740
Haiku 4.5 $0.00020 $0.01370

Measured 4d ago against content hash b11c2dfd508e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 modeCLAUDE.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 modeCLAUDE.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. 4d 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 (13 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 203 tokens to every session and 13,698 once invoked, about $0.0010 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-30.

Related

Other skills, from other repositories

hyperbrief

Use AFTER hyperbrief-trigger-check returns FULLHYPERBRIEF, SUMMARYBRIEF, DEEPBRIEF, or MINIMALBRIEF. v0.9 adds the request tier (Hyperbrief.md §2.6) — a bare request for a brief is a SUMMARYBRIEF rather than the heaviest tier, and DEEPBRIEF (§0.6) is request-only and the only tier permitted to fan out, so an unnamed…

SoliEstre/EstreGenesis · 350 tokens

ultrasafe-crypto-reviewer

Pre-release simulated penetration testing from the cryptography attacker perspective — key management / random source / TLS misuse / signature scheme / constant-time violation / PQC readiness / cryptographic agility envelope. Triggered by Ultrasafe orchestrator (ultrasaferunfanout MCP tool) when the axis-set includes…

SoliEstre/EstreGenesis · 186 tokens

ultrasafe-methodology-compliance

Use BEFORE a publish-equivalent release (npm publish / pip upload / git push --tags to public) — Ultrasafe 8-agent fan-out 의 Methodology / Compliance attacker 시각. Test methodology gap · coverage cliff · compliance catalog (NIST 800-115 / OSSTMM / OWASP WSTG / PTES / ISO 27001:2022 / CIS v8.1) 의 16-cell 2D dispatch…

SoliEstre/EstreGenesis · 208 tokens

ultrasafe-supply-chain-auditor

Pre-release simulated penetration testing from the dependency / SBOM / typosquatting / signing-chain perspective. Invoke as Agent 3 of the Ultrasafe 8-agent fan-out (Ultrasafe.md §15.3) whenever the iteration axis-set includes usf-supply-chain, or whenever a release candidate touches dependency manifests (package.json…

SoliEstre/EstreGenesis · 228 tokens

ultrasafe-synthesizer

Pre-release security testing — retire-barrier fan-out sink. Aggregate the 7 attacker agents' findings (ai-llm / web-api / supply-chain / crypto / social-eng / methodology / threat-model) via BFT quorum 2f+1 cross-axis confirmation, diversity-enforced source independence (perspective × prompttemplatehash × seed 3-tuple…

SoliEstre/EstreGenesis · 210 tokens

ultrasafe-threat-model-lifecycle

Pre-release simulated penetration testing from the threat modeling (STRIDE/PASTA) + incident lifecycle + disclosure timing attacker perspective. Invoke as one of 8 attackers in Ultrasafe fan-out runtime when a publish-equivalent action (npm publish / pip upload / git push --tags to public / release-gate trigger) is…

SoliEstre/EstreGenesis · 199 tokens