ctxkeep: Command for Claude Code

.claude/commands/update-docs.md

update-docs is a command for Claude Code from danish-119/ctxkeep. It costs 22 tokens per session (213 once invoked), scanned C, original, MIT.

A command workflow for repairing project documentation that no longer matches the code. It refreshes generated sections, reports mismatches, and guides edits to the hand-written parts.

In plain words
What is it for?
Use it after code changes to update generated documentation, fix reported references, and confirm that the documentation matches the current project.
Why use it?
Documentation drift creates instructions and references that are no longer true. This workflow identifies those differences and checks again after they are fixed.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is danish-119/ctxkeep's own configuration. It tells Claude Code how to work on ctxkeep itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ctxkeep configures →

Reuse

Borrowing it

Nothing to install: this file belongs to danish-119/ctxkeep. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/danish-119/ctxkeep/main/.claude/commands/update-docs.md
Clone the repo
git clone --depth 1 https://github.com/danish-119/ctxkeep

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-docs

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/danish-119/ctxkeep/update-docs"><img src="https://agentmods.dev/badge/commands/danish-119/ctxkeep/update-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 213 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00022 $0.00213
Opus 5.5 $0.00009 $0.00085
Sonnet 5.5 $0.00004 $0.00043
Haiku 4.5 $0.00002 $0.00021

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

Security

Grade C, and why

update-docs scanned grade C with 1 finding 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

3. For each entry, fix the hand-written text at that location so it matches the code. Use the suggestion when it is right; read the code when unsure. If a reference is intentionally hypothetical, add `<!-- ctxkeep-ignore
.claude/commands/update-docs.md · 14 lines

What it actually says

Bring this project's documentation back in line with the code.

  1. Run npm run dev -- sync to refresh the generated sections.
  2. Run npm run dev -- check --json and read the drift list. Each entry has a file, a line, what is wrong, and sometimes a suggestion.
  3. For each entry, fix the hand-written text at that location so it matches the code. Use the suggestion when it is right; read the code when unsure. If a reference is intentionally hypothetical, add <!-- ctxkeep-ignore --> to that line instead.
  4. Never edit between ctxkeep:start / ctxkeep:end markers.
  5. Run npm run dev -- check again until it reports nothing, then summarize what you changed.
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 · 14 lines · 22 tokens per session scan C 7bc2d80f4bbe

Subscribe to this mod's changes

update-docs is a command published in the GitHub repository danish-119/ctxkeep (2 stars, last pushed 1mo ago), licensed MIT. It adds 22 tokens to every session and 213 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-04.

Related

update-docs compared with commands from other repositories

update-docs next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
update-docsdanish-119/ctxkeepCommand21mo agoMITC22Claude Code
fafWolfe-Jam/faf-cliCommand44yesterdayMITA11Claude Code
verifyalipajand/agent-context-doctorCommand1yesterdayMITA20Claude Code
audit-selfalipajand/agent-context-doctorCommand1yesterdayMITA10Claude Code
review-branchdamusix/atomic-claudeCommand1165d agoMITA35Claude Code
securityajitpratap0/GoSQLXCommand124todayApache-2.0A21Claude Code
commitechoVic/blade-codeCommand18125d agoMITA8Claude Code