update-claude-md

update-claude-md is a command for Claude Code from sefaertunc/Worclaude. It costs 15 tokens per session (988 once invoked), scanned A, original, MIT.

A command that reviews recent work and recurring project lessons, then suggests changes to CLAUDE.md, a file containing instructions for the coding agent.

In plain words
What is it for?
Finding repeated lessons, recent learnings, and useful additions to existing CLAUDE.md sections.
Why use it?
It helps keep project guidance up to date without changing the file automatically or without your approval.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Good fit Finding repeated lessons, recent learnings, and useful additions to existing CLAUDE.md sections.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sefaertunc/worclaude/update-claude-md
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.

Clone the repo
git clone --depth 1 https://github.com/sefaertunc/Worclaude

Made for: Claude Code.

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-claude-md

README.md
[![agentmods](https://agentmods.dev/badge/commands/sefaertunc/worclaude/update-claude-md/github.svg)](https://agentmods.dev/commands/sefaertunc/worclaude/update-claude-md)
Your own site
<a href="https://agentmods.dev/commands/sefaertunc/worclaude/update-claude-md"><img src="https://agentmods.dev/badge/commands/sefaertunc/worclaude/update-claude-md/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-claude-md

Your own site · 80×15
<a href="https://agentmods.dev/commands/sefaertunc/worclaude/update-claude-md"><img src="https://agentmods.dev/badge/commands/sefaertunc/worclaude/update-claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 988 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.00015 $0.00988
Opus 5 $0.00008 $0.00494
Sonnet 5 $0.00003 $0.00198
Haiku 4.5 $0.00002 $0.00099

Measured 8d ago against content hash fe09780b437b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

update-claude-md 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 8d 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.

.claude/commands/update-claude-md.md · 108 lines

How it starts

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

Propose updates to CLAUDE.md based on this session's work AND the project's captured learnings. Apply changes only with explicit per-change consent.

Sources of proposals

Look at three places, in priority order:

  1. .claude/learnings/ directory — surface promotion candidates.

    learn-capture.cjs writes one file per [LEARN] category and appends when the same category is captured again. The directory's index.json updates created to the latest capture date — treat it as "last touched," not "first created." See the memory-architecture skill for the full layer model.

    Concrete promotion algorithm — a learning is a candidate when at least one of these holds:

    • Recurrence: the file at .claude/learnings/<category>.md contains 3 or more **Rule:** blocks. Count by scanning the file directly (the index doesn't track count). Three independent captures of the same category is the threshold for "this isn't a fluke."
    • Recency: the index entry's created date is within the last 14 days. Recent learnings are warmer signals than old ones.
    • Drift: the learning's content is structurally relevant to an existing CLAUDE.md section (e.g., a "always do X" pattern that belongs in ## Critical Rules or ## Gotchas) but the rule is missing from CLAUDE.md.

    A candidate satisfying only recency is weak — surface it but rank it below a recurring or drift-aligned candidate. Prefer learnings that hit two or three signals at once.

    Out of scope for now: Claude Code's auto memory at ~/.claude/projects/<slug>/memory/ is NOT scanned. Auto memory is personal-scoped; promotion to CLAUDE.md (team-scoped) requires the user's explicit reasoning and is mediated through /learn. This may be revisited once Phase 6a observability ships.

  2. This session's mistakes — if Claude made the same mistake twice in this session, it's a candidate for a Gotchas entry. Once-per-session mistakes are not yet rule-worthy.

  3. This session's discoveries — non-obvious patterns the user confirmed are worth documenting (e.g., "we always do X here because Y").

Read the full file on GitHub · 108 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. 8d ago First seen · 108 lines · 15 tokens per session scan A fe09780b437b

Subscribe to this mod's changes

update-claude-md is a command published in the GitHub repository sefaertunc/Worclaude (4 stars, last pushed 29d ago), licensed MIT. It adds 15 tokens to every session and 988 once invoked, about $0.0001 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.