sova: Command for Claude Code

.claude/commands/update-docs.md

update-docs is a command for Claude Code from xsovad06/sova. It costs 18 tokens per session (1,008 once invoked), scanned A, original, Apache-2.0.

A procedure for bringing project documentation in line with the current code, including both committed documents and local instruction files.

In plain words
What is it for?
Use it after code changes to discover affected documentation, verify counts and conventions, and update the relevant files.
Why use it?
It finds changed areas and outdated structural details, such as documented test counts, that can otherwise mislead developers.

Command for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md; positional $N argument; mentions AGENTS.md.

This is xsovad06/sova's own configuration. It tells Claude Code how to work on sova 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 sova configures →

Reuse

Borrowing it

Nothing to install: this file belongs to xsovad06/sova. 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/xsovad06/sova/main/.claude/commands/update-docs.md
Clone the repo
git clone --depth 1 https://github.com/xsovad06/sova

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/xsovad06/sova/update-docs/github.svg)](https://agentmods.dev/commands/xsovad06/sova/update-docs)
Your own site
<a href="https://agentmods.dev/commands/xsovad06/sova/update-docs"><img src="https://agentmods.dev/badge/commands/xsovad06/sova/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/xsovad06/sova/update-docs"><img src="https://agentmods.dev/badge/commands/xsovad06/sova/update-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 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,008 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.00018 $0.01008
Opus 5.5 $0.00007 $0.00403
Sonnet 5.5 $0.00004 $0.00202
Haiku 4.5 $0.00002 $0.00101

Measured 16d ago against content hash 5552adaffdec, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

update-docs 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 16d 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-docs.md · 111 lines

How it starts

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

Update Documentation

Ensure all documentation matches the current code state. Updates both git-tracked docs (committed) and local-only docs (e.g., CLAUDE.md files if gitignored).

Context: $ARGUMENTS

Phase 1: Discover What Changed

# Find the base branch
BASE=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
BASE=${BASE:-main}

# Changed files on this branch (determines which docs to check)
CHANGED=$(git diff --name-only $(git merge-base HEAD origin/$BASE)..HEAD)
echo "$CHANGED"

Read the project's CLAUDE.md or AGENTS.md to understand documentation conventions and which files track counts.

Phase 2: Verify Structural Counts

Run the project's actual count verification commands and compare against documented values. Adapt the commands below to the project's structure.

# Tests (Python): every tracked test file, wherever the layout keeps it (top-level
# tests/, per-app tests/ packages, or test files next to the code they cover)
TEST_COUNT=$(git ls-files -z '*test_*.py' '*_test.py' | xargs -0 grep -HcE '^[[:space:]]*(async )?def test_' | awk -F: '{s+=$NF}END{print s+0}')

# Tests (JS/TS)
# TEST_COUNT=$(find src \( -name '*.test.ts' -o -name '*.spec.ts' \) -exec grep -c 'it(\|test(' {} + 2>/dev/null | awk -F: '{s+=$2}END{print s+0}')

Search documentation files for count references and compare:

for f in README.md CLAUDE.md AGENTS.md docs/*.md .claude/rules/*.md; do
  [ -f "$f" ] && grep -niE '(tests|services|routers|templates|steps|commands|pages|modules|models|subcommands)[[:space:]]*:?[[:space:]]*[0-9][0-9,]*\+?|[0-9][0-9,]*\+?[[:space:]]*(tests|services|routers|templates|steps|commands|pages|modules|models|subcommands)' "$f"
done

Also check the project's vision or roadmap doc, if AGENTS.md or README.md links one and it lives outside the paths above.

Flag any documented count that doesn't match the actual count.

Phase 3: Check Scope-Specific Docs

Based on which files changed, check related documentation:

Read the full file on GitHub · 111 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. 16d ago Changed · +4 lines 5552adaffdec
  2. 2mo ago First seen · 107 lines · 18 tokens per session scan A d36d8e26e79f

Subscribe to this mod's changes

update-docs is a command published in the GitHub repository xsovad06/sova (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 18 tokens to every session and 1,008 once invoked, about $0.0001 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-31.