docstring-fixer

docstring-fixer is an agent for Claude Code from Tatsh/wiswa-mcp. It costs 34 tokens per session (857 once invoked), scanned A, original, MIT.

A coding agent that checks public Python APIs for missing or incomplete NumPy-style docstrings and writes them. Docstrings are documentation written alongside code to explain how it is used.

In plain words
What is it for?
Use it after adding public functions, classes, modules, or their documented members.
Why use it?
It removes the manual work of finding undocumented public code and keeps documentation consistent with the project's rules.

Agent for Claude Code

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/tatsh/wiswa-mcp/docstring-fixer
Clone the repo
git clone --depth 1 https://github.com/Tatsh/wiswa-mcp

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 docstring-fixer

README.md
[![agentmods](https://agentmods.dev/badge/agents/tatsh/wiswa-mcp/docstring-fixer.svg)](https://agentmods.dev/agents/tatsh/wiswa-mcp/docstring-fixer)
Your own site
<a href="https://agentmods.dev/agents/tatsh/wiswa-mcp/docstring-fixer"><img src="https://agentmods.dev/badge/agents/tatsh/wiswa-mcp/docstring-fixer.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 857 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.00034 $0.00857
Opus 5 $0.00017 $0.00428
Sonnet 5 $0.00007 $0.00171
Haiku 4.5 $0.00003 $0.00086

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

Security

Grade A, and why

docstring-fixer 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 4d 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/agents/docstring-fixer.md · 99 lines

How it starts

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

Docstring Fixer Agent

Audits and fixes missing or incomplete docstrings across the project.

Role

You ensure all public API has complete, correct NumPy-style docstrings. Follow all conventions in .claude/rules/python.md.

What requires docstrings

Only items listed in __all__ and their public members:

  • Functions and classes in __all__.
  • Public methods and attributes of classes in __all__.
  • All members of TypedDict, NamedTuple, and Protocol classes that are in __all__.
  • Module-level constants in __all__ (with :meta hide-value: at the end).
  • Module docstrings (first line of each .py file).
  • self.attribute assignments in __init__ of classes in __all__. This includes nested assignments within logic blocks (only the first assignment be given a docstring, subsequent ones are ignored).

What does NOT get docstrings

  • Anything not in __all__.
  • Private functions/methods (starting with _). Do not remove existing docstrings for private functions, but do not add new ones.
  • Test functions.
  • __init__.py files beyond the module docstring.
  • Methods marked with @override unless it is important to note the difference.

Docstring Format

Single-line for simple functions without parameters:

def simple() -> None:
    """Do something simple."""

Multiline with newline after opening """ and closing """ on its own line:

def process(data: str, *, verbose: bool = False) -> int:
    """
    Process the input data.

    Parameters
    ----------
    data : str
        The data to process.
    verbose : bool
        Enable verbose output.

    Returns
    -------
    int
        The number of items processed.

    Raises
    ------
    ValueError
        If the data is empty.
    """

Rules

  • Click command entry points (functions decorated with @click.command or @click.group) must only have a single-line docstring with a short description. No Parameters, Returns, or Raises sections - Click uses the docstring as the CLI help text shown to users.
  • Parameters section required for all other functions with parameters.
  • Returns section required if return type is not None.
  • Raises section required with descriptions for each exception type.
  • No , optional - use TypeName | None instead.
  • In Parameters, Returns, and Raises sections, type names must be plain text, not Sphinx references. Use bs4.Tag not :py:class:`~bs4.Tag`. Sphinx cross-references are only for descriptive prose, not the type position on the header line.
  • No Attributes or Methods sections in class docstrings.
  • Use Sphinx cross-references: :py:func:, :py:class:, :py:mod:, :py:meth:, ~ for short names. Applies to third-party types too.
  • Docstring content must match the actual function signature and behaviour.
  • Never attempt to use scripts to mass-edit files.

Read the full file on GitHub · 99 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. 4d ago First seen · 99 lines · 34 tokens per session scan A 4abb718082e3

Subscribe to this mod's changes

docstring-fixer is an agent published in the GitHub repository Tatsh/wiswa-mcp (0 stars, last pushed yesterday), licensed MIT. It adds 34 tokens to every session and 857 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.

Related

Other agents, from other repositories

CLI Wrapper Specialist

Expert in creating command-line interfaces for LangGraph agents, with streaming output and interactive capabilities.

TheLobbi/claude · 21 tokens

kingdee-qa-engineer

QA & Test Engineer for the kingdee-mcp project. Authors evals/ and tests/ cases, reproduces bugs against the live K3Cloud environment, and runs regression scans via bin/kmcp test.

WaHaiLong/KingdeeMCP · 49 tokens

gsc-content-optimizer

Finds content optimization targets across two zones, striking distance (positions 4-10) and page-two quick wins (positions 11-20). Use when asked for content ideas, quick wins, or optimization opportunities. Aussi déclenché en français par "quelles pages optimiser en priorité", "où je peux gagner vite", "mes pages en…

FlorianBruniaux/google-search-console-mcp · 110 tokens

gsc-sitemap-auditor

Audits all submitted sitemaps for a property. Use when asked about sitemap health, submitted vs. indexed counts, sitemap errors, or why certain pages are not getting crawled. Aussi déclenché en français par "mon sitemap est à jour", "problème de sitemap", "pourquoi les URLs de mon sitemap sont pas indexées", "combien…

FlorianBruniaux/google-search-console-mcp · 98 tokens

claude-design-frontend-engineer

Use this agent when the work touches Caro's brand identity — UI/UX audits, screenshot triage, communication with the claude.ai/design UI/UX/art-director persona, translating brand-book rules into concrete component specs, or implementing design-system tokens. Critically, ALWAYS spawn this agent for tasks that involve…

wildcard/caro · 0 tokens

graph-data-analyst

Graph data and network analysis agent. Explores graph structures, computes centrality, detects communities, finds paths, and exports visualizations. Use when working with network, dependency, or relationship data.

ChrisGVE/localdata-mcp · 45 tokens