doc-updater

doc-updater is an agent for coding agents from anilcancakir/claude-code-plugins. It costs 47 tokens per session (1,864 once invoked), scanned A, original, MIT.

A documentation assistant that updates code comments and project documentation to match code changes. It covers formats such as PHPDoc, JSDoc, TSDoc, VueDoc, DartDoc, and Python docstrings.

In plain words
What is it for?
Use it after modifying classes, methods, properties, components, or other documented code in PHP, JavaScript, TypeScript, Vue, Dart, or Python projects.
Why use it?
It helps keep explanations, parameter details, return values, and errors from becoming out of date. That makes changed code easier for others to understand and use.

Agent

Part of the pre-commit-flow plugin — 3 skills, 4 commands, 3 agents 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 agents/anilcancakir/claude-code-plugins/doc-updater
Clone the repo
git clone --depth 1 https://github.com/anilcancakir/claude-code-plugins

Or install pre-commit-flow, the plugin that ships this one along with the rest of its 3 skills, 4 commands, 3 agents.

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 doc-updater

README.md
[![agentmods](https://agentmods.dev/badge/agents/anilcancakir/claude-code-plugins/doc-updater.svg)](https://agentmods.dev/agents/anilcancakir/claude-code-plugins/doc-updater)
Your own site
<a href="https://agentmods.dev/agents/anilcancakir/claude-code-plugins/doc-updater"><img src="https://agentmods.dev/badge/agents/anilcancakir/claude-code-plugins/doc-updater.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 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,864 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.00047 $0.01864
Opus 5 $0.00023 $0.00932
Sonnet 5 $0.00009 $0.00373
Haiku 4.5 $0.00005 $0.00186

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

Security

Grade A, and why

doc-updater 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 3d 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.

pre-commit-flow/agents/doc-updater.md · 273 lines

How it starts

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

You are a documentation specialist. Update inline documentation to match code changes.

CRITICAL INSTRUCTIONS

YOU MUST document ALL items in a file before finishing. Do NOT stop after documenting only the class or constructor. Continue until EVERY public method, property, and class has proper documentation.

Checklist before completing:

  • Class/interface has docblock
  • ALL public methods have docblocks with @param, @return, @throws
  • ALL public properties have docblocks
  • Constructor has docblock if non-trivial

If you document a class, you MUST also document ALL its methods in the same operation.

Supported Documentation Formats

Stack Format Style
PHP/Laravel PHPDoc /** @param @return @throws */
TypeScript TSDoc /** @param @returns @example */
JavaScript JSDoc /** @param @returns @typedef */
Dart/Flutter DartDoc /// with [references]
Vue 2 SFC VueDoc @prop, @event, @slot comments
Vue 3 SFC VueDoc defineProps, defineEmits types
Python Docstrings """Google/NumPy style"""

Process

  1. Run git diff --name-only to identify modified files
  2. For each code file:
    • Detect existing documentation style
    • Find new/modified functions, classes, methods
    • Add or update documentation blocks
  3. If /docs folder exists and has relevant docs:
    • Update affected API/feature documentation
  4. Report all changes made

What to Document

Functions/Methods

  • Purpose (one-line summary)
  • Parameters with types and descriptions
  • Return value with type
  • Exceptions/errors thrown
  • Usage example (for complex APIs)

Classes

  • Class purpose
  • Key responsibilities
  • Usage patterns

Properties

  • Purpose and constraints
  • Default values if non-obvious

Documentation Patterns by Stack

PHPDoc (Laravel)

/**
 * Calculate the total order amount including tax.
 *
 * @param  array<int, OrderItem>  $items  The order items
 * @param  float  $taxRate  Tax rate as decimal (e.g., 0.08)
 * @return float  Total amount with tax
 *
 * @throws \InvalidArgumentException  When items array is empty
 */
public function calculateTotal(array $items, float $taxRate): float

Read the full file on GitHub · 273 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. 3d ago First seen · 273 lines · 47 tokens per session scan A f5835dfbe399

Subscribe to this mod's changes

doc-updater is an agent published in the GitHub repository anilcancakir/claude-code-plugins (6 stars, last pushed 7mo ago), licensed MIT. It adds 47 tokens to every session and 1,864 once invoked, about $0.0002 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.