Borrowing it
Nothing to install: this file belongs to Insight-Services-APAC/ingenious. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Insight-Services-APAC/ingenious/main/.claude/commands/quality/py-quality/docstrings.mdgit clone --depth 1 https://github.com/Insight-Services-APAC/ingeniousWrote 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.
[](https://agentmods.dev/commands/insight-services-apac/ingenious/docstrings)<a href="https://agentmods.dev/commands/insight-services-apac/ingenious/docstrings"><img src="https://agentmods.dev/badge/commands/insight-services-apac/ingenious/docstrings.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01003 |
| Opus 5 | $0.00000 | $0.00502 |
| Sonnet 5 | $0.00000 | $0.00201 |
| Haiku 4.5 | $0.00000 | $0.00100 |
Grade A, and why
docstrings 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Verify and Fix Docstrings with Interrogate and Pydocstyle
Use static analysis tools to ensure all functions, classes, and modules have proper, consistent docstrings.
CRITICAL: Persistence Requirement
DO NOT STOP until ALL docstring issues are resolved. This task requires complete coverage:
- Process every single file reported by the tools
- Fix every missing or malformed docstring
- Continue working through all modules systematically
- Re-run the analysis tools after each batch of fixes to confirm progress
- Only consider this task complete when both
interrogateandpydocstylereport zero issues
If context window limits approach, document remaining files in the todo list and continue in the next session. Do not leave the codebase in a partially documented state.
1. Run Docstring Coverage Analysis
uv run interrogate -v . --fail-under 100 --ignore-init-method --ignore-init-module --exclude .venv --exclude venv --exclude .git --exclude __pycache__ --exclude node_modules
This shows which modules, classes, and functions are missing docstrings. The -v flag provides detailed output. The --fail-under 100 ensures nothing is missed.
For a summary report:
uv run interrogate . --generate-badge /tmp/docstring-badge --exclude .venv --exclude venv
2. Run Docstring Style Check
uv run pydocstyle . --convention=google --match='(?!test_).*\.py' --ignore=D100,D104
This validates docstrings follow Google style conventions (D100 and D104 are ignored for module-level docstrings which are often unnecessary).
For specific error codes only:
uv run pydocstyle . --select=D101,D102,D103,D107
Key codes:
- D100: Missing docstring in public module
- D101: Missing docstring in public class
- D102: Missing docstring in public method
- D103: Missing docstring in public function
- D107: Missing docstring in init
3. Processing Order
Work through files systematically:
- Start with public API functions and classes
- Then complex functions with cyclomatic complexity >= B
- Then entry points and orchestration code
- Then utility functions and helpers
- Finally, private methods and internal functions
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.
- 2d ago First seen · 139 lines · 0 tokens per session scan A a8a0f3dab43d
docstrings is a command published in the GitHub repository Insight-Services-APAC/ingenious (24 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,003 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-09-04.
Other commands, from other repositories
implement-python
Senior Python engineer implementation command. Launches a background agent with full Python development capabilities and access to the mastering-python-skill reference materials.
setup-project
Initialize a new Python project with proper structure, configuration, and tooling.
python-review
Comprehensive Python code review for PEP 8 compliance, type hints, security, and Pythonic idioms. Invokes the python-reviewer agent.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.