annotate

annotate is a command for Claude Code from rohitg00/awesome-claude-code-toolkit. It costs 0 tokens per session (392 once invoked), scanned A, original, Apache-2.0.

A workflow for adding inline explanations to code, including JSDoc, docstrings, and comments. It covers public functions, complex logic, parameters, return values, and errors.

In plain words
What is it for?
Use it to document JavaScript, TypeScript, Python, Go, or Rust files, then check that the added documentation does not break the project.
Why use it?
It makes under-documented code easier to understand and maintain without changing what the code does.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the code-explainer plugin — 2 commands shipped together

Good fit Use it to document JavaScript, TypeScript, Python, Go, or Rust files, then check that the added documentation does not break the project.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/rohitg00/awesome-claude-code-toolkit/annotate
About the project

Awesome Claude Code Toolkit is a curated collection of extensions and configuration for Claude Code, including agents, skills, commands, plugins, hooks, rules, templates, MCP configurations, and companion apps. It is for Claude Code users who want ready-made workflows and integrations for different development tasks. The catalogue add-ons are selected components from this toolkit.

rohitg00/awesome-claude-code-toolkit · 2,713 stars · on GitHub

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/rohitg00/awesome-claude-code-toolkit

Made for: Claude Code.

Or install code-explainer, the plugin that ships this one along with the rest of its 2 commands.

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 annotate

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/rohitg00/awesome-claude-code-toolkit/annotate"><img src="https://agentmods.dev/badge/commands/rohitg00/awesome-claude-code-toolkit/annotate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 392 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.00000 $0.00392
Opus 5.5 $0.00000 $0.00157
Sonnet 5.5 $0.00000 $0.00078
Haiku 4.5 $0.00000 $0.00039

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

Security

Grade A, and why

annotate 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 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.

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.

plugins/code-explainer/commands/annotate.md · 47 lines

What it actually says

Add inline documentation (JSDoc, docstrings, comments) to under-documented code.

Steps

  1. Read the target file and assess current documentation level.
  2. Identify what needs documentation:
    • Public functions and methods lacking doc comments.
    • Complex logic blocks without explanatory comments.
    • Non-obvious parameter types or return values.
    • Module-level overview missing.
  3. Generate documentation in the appropriate format:
    • TypeScript/JavaScript: JSDoc with @param, @returns, @throws, @example.
    • Python: Google-style or NumPy-style docstrings.
    • Go: Godoc comments above exported functions.
    • Rust: /// doc comments with examples.
  4. For each function, document:
    • What it does (one-sentence summary).
    • Parameters with types and descriptions.
    • Return value description.
    • Thrown exceptions or error conditions.
    • Usage example for complex functions.
  5. Add a module-level doc comment explaining the file's purpose.
  6. Verify the documentation does not break the build or linter.

Format

/**
 * Creates a new user account with the given credentials.
 *
 * @param email - The user's email address (must be unique)
 * @param password - Plain text password (will be hashed)
 * @returns The created user object with generated ID
 * @throws {ConflictError} If a user with this email already exists
 * @example
 * const user = await createUser("[email protected]", "securePass123");
 */

Rules

  • Document intent and contracts, not implementation details.
  • Every public function must have at minimum a summary and parameter descriptions.
  • Do not add comments that merely restate the code.
  • Use the project's existing documentation style if one is established.
  • Include @example for functions with non-obvious usage patterns.
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 · 47 lines · 0 tokens per session scan A 7e74e318ef7e

Subscribe to this mod's changes

annotate is a command published in the GitHub repository rohitg00/awesome-claude-code-toolkit (2,713 stars, last pushed 5mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 392 tokens. 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-30.