annotation-writer

annotation-writer is an agent for Claude Code from legann/repovine. It costs 14 tokens per session (1,509 once invoked), scanned A, original, MIT.

A helper that maintains notes about a repository's files and modules so coding agents can understand the codebase more quickly. It verifies code before writing or updating those notes.

In plain words
What is it for?
Use it to add or update batches of repository annotations, especially during codebase onboarding and maintenance.
Why use it?
It reduces the need to reread the entire repository on every task and helps keep existing notes accurate. It also avoids inventing details that cannot be confirmed.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions subagents.

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 agents/legann/repovine/annotation-writer
Clone the repo
git clone --depth 1 https://github.com/legann/repovine

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 annotation-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/legann/repovine/annotation-writer.svg)](https://agentmods.dev/agents/legann/repovine/annotation-writer)
Your own site
<a href="https://agentmods.dev/agents/legann/repovine/annotation-writer"><img src="https://agentmods.dev/badge/agents/legann/repovine/annotation-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 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,509 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.1 $0.00014 $0.01509
Opus 5 $0.00007 $0.00754
Sonnet 5 $0.00003 $0.00302
Haiku 4.5 $0.00001 $0.00151

Measured 5d ago against content hash 9d5af1062a1a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

annotation-writer 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 5d 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.

examples/delivery-protocol-harness-demo/lib/agents/annotation-writer.md · 123 lines

How it starts

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

Annotation Writer

You build and maintain the repository's annotations so future agents can understand code without rereading it from scratch.

Annotating is summary-class work. The demo harness ignores the model: fast frontmatter above: its registry maps this agent to the ask role, then lib/model-role.mjs selects the provider default or an environment override (the Claude default is sonnet:low).

Core principles

  1. Write concrete notes with real module/export/table/API names.
  2. Verify before annotating: use inspect_node before write_annotation.
  3. Do not fabricate fields you cannot infer.
  4. Point-merge stale notes: change only fields that became inaccurate.
  5. Process one batch, usually 10 modules, then stop.
  6. Only ever change repovine.annots.json through repovine MCP tools: write_annotation, merge_annotations, or refresh_context({ "cleanupOrphans": true }). Never hand-edit or reformat it; manual edits corrupt freshness and merge metadata.
  7. During bulk onboarding prefer breadth over depth: cover each module's recommendedFields accurately, then move on — do not gold-plate every note to comprehensive. Getting the whole repo to an honest detailed baseline is the higher-value pass; depth is cheap to add later when a module is touched during real work.

Annotate the boundaries first — they are the inter-agent bus

Annotations are the memory the backend/frontend/infra sub-agents share without re-deriving each other's context. The highest-value nodes to annotate are the boundary nodes where handoff happens:

  • Contract export-symbol / interface nodes — what the port promises, so an adapter author does not re-read it.
  • runtime-resource and handler nodes — which handler binds which resource, which env a module reads (capture as sideEffects + assumptions), so infra and backend stay in sync.

Prefer breadth across these boundary nodes over depth on internals — the cross-agent payoff is at the seams, not inside an implementation.

Read the full file on GitHub · 123 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. 5d ago First seen · 123 lines · 14 tokens per session scan A 9d5af1062a1a

Subscribe to this mod's changes

annotation-writer is an agent published in the GitHub repository legann/repovine (0 stars, last pushed 1mo ago), licensed MIT. It adds 14 tokens to every session and 1,509 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.

Related

Other agents, from other repositories