- Home
- Skills
- Technical Documentation
- Docstring and Code Comment Writer with Coverage Check
Works with the AI Agents you already use
Docstring and Code Comment Writer with Coverage Check
Writes docstrings and comments in your repo's existing style, fixes misleading ones, measures coverage, proves only comments changed. Verdict DOCUMENTED / PARTIAL / MISLEADING.
$5
Docstring and Code Comment Writer with Coverage Check
Example session with this skill installed
Add docstrings to everything public in src/billing/ and clean up the comments. We use ruff. Tell me our doc coverage before and after.
- Read your context and instructions
- Compiled the docstring and code
Doc pass: src/billing/ (4 files)
Verdict: MISLEADING
Convention detected: Google style (source: [tool.ruff.lint.pydocstyle] convention = "google" in pyproject.toml; 9 of 9 sampled docstrings use Args:/Returns:)
Coverage
| Language | Command | Before | After |
|---|---|---|---|
| Python | interrogate -v -i src/billing/ | 40.9% (9/22) | 95.5% (21/22) |
Misleading comments fixed
| File:line | Old comment said | Code actually does |
|---|---|---|
invoices.py:48 | "Returns None if the invoice is not found." | Raises KeyError from self._store[invoice_id] |
tax.py:17 | "rate is a percentage (e.g. 8.5)" | Multiplies by rate directly, so it expects a fraction (0.085) |
Changes
invoices.py: documentedInvoiceService,create,void,get; removed 4 comments that repeated the codetax.py: documentedapply_tax,round_cents; changed "# round here" to explain why rounding happens before the discount (matches the ledger's rounding order)retry.py: documentedwith_backoff, including the side effect (sleeps and logs a warning on each retry)- Left undocumented:
_legacy_map, reason: unclear from code what the magic keys mean
Example of an added docstring
def get(self, invoice_id: str) -> Invoice:
"""Return the stored invoice with the given ID.
Args:
invoice_id: Invoice identifier, e.g. "INV-2041".
Returns:
The matching Invoice.
Raises:
KeyError: If no invoice with that ID exists.
"""
Comments-only check
python3 doccheck.py (vs HEAD) -> AST identical: 4/4 files
git diff filter -> 0 non-comment lines
pytest -q -> 58 passed
Follow-ups
tax.py:17: callers incheckout.pypass8.5. That looks like a real bug. Code left unchanged, please confirm.
Connects securely to your tools. The creator never sees your data.
About this skill
Asking an AI to "add docstrings" usually gets you a style the repo doesn't use, comments that repeat the code line by line, documented exceptions the function never raises, and sometimes a quietly reformatted function body. Old comments that no longer match the code stay in place.
This skill gives your coding agent a fixed routine for documentation passes:
- Detects the convention from linter config (ruff/pydocstyle, eslint-plugin-jsdoc, TSDoc, C# GenerateDocumentationFile, rustdoc lints) and from existing docstrings, then matches it
- Covers Python (Google, NumPy, reST/Sphinx), JSDoc/TSDoc, Javadoc, Go doc comments, Rust /// and //! with # Examples, # Errors and # Panics, C# XML docs and PHPDoc
- Reads each function body before writing, so params, returns, raises and side effects reflect what the code actually does
- Documents public API first, then complex private code. Inline comments explain why, not what
- Flags comments that contradict the code and corrects the comment, never the code
- Measures coverage before and after with real commands (interrogate, eslint require-jsdoc, missing_docs, CS1591 and others)
- Proves the diff is comments-only with an included Python AST compare script, a minify compare for JS/TS, and a git diff filter
Who it's for: developers and maintainers preparing a library release, a code review or onboarding docs, and teams with docstring lint rules they keep failing.
Honesty note: coverage numbers come only from commands the agent ran. Where a tool flag was not re-checked against current docs, the reference file says so. The skill describes behavior it can see in the code. When intent is unclear, it says so instead of guessing.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Technical Documentation.
Strong comments-only verification exists for Python and JS/TS runtime code. Other languages rely on a diff filter plus your build and tests. Coverage needs the relevant tool installed, or a labeled heuristic is used instead. Some tool flags are marked not re-verified as of October 2026. Docs describe what the code does, so design intent the code doesn't show is reported as unclear rather than written in. It does not write READMEs or docs sites.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 29 days ago
- Software
Giteslint
Node.jsesbuildtsc
- Optional
- Docs linterDocs coverage tool
For example ruff or interrogate for Python, eslint-plugin-jsdoc for JavaScript and TypeScript.