python-comments

python-comments is a skill for Claude Code from acaprino/daodan. It costs 52 tokens per session (2,589 once invoked), scanned A, original, MIT.

A Python code-comment and docstring guide based on a nine-type classification system mapped to PEP 257, the Python documentation conventions. It supports both rewriting comments and auditing their quality.

In plain words
What is it for?
Use it to add or improve Python comments and docstrings, classify existing comments, or produce a documentation-quality report.
Why use it?
It helps comments explain why code exists instead of merely repeating what the code says. It also finds missing or unhelpful documentation during reviews and onboarding preparation.

Skill for Claude Code

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

Part of the python-development plugin — 9 skills, 3 commands, 3 agents shipped together

Good fit Use it to add or improve Python comments and docstrings, classify existing…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/acaprino/daodan/python-comments
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.

Any agent
npx skills add acaprino/daodan --skill python-comments
Clone the repo
git clone --depth 1 https://github.com/acaprino/daodan

Made for: Claude Code.

Or install python-development, the plugin that ships this one along with the rest of its 9 skills, 3 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 python-comments

README.md
[![agentmods](https://agentmods.dev/badge/skills/acaprino/daodan/python-comments.svg)](https://agentmods.dev/skills/acaprino/daodan/python-comments)
Your own site
<a href="https://agentmods.dev/skills/acaprino/daodan/python-comments"><img src="https://agentmods.dev/badge/skills/acaprino/daodan/python-comments.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,589 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.00052 $0.02589
Opus 5 $0.00026 $0.01295
Sonnet 5 $0.00010 $0.00518
Haiku 4.5 $0.00005 $0.00259

Measured yesterday against content hash a48e4554679c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

python-comments 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 yesterday.

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.

exports/claude/plugins/python-development/skills/python-comments/SKILL.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.

Python Comments

Purpose

Two operational modes for Python code comments:

  1. Write mode - Add missing comments, improve existing ones, fix negative-type comments
  2. Audit mode - Classify all comments, identify gaps, produce structured quality report

Core principle: comments explain why, code explains what. Type hints explain types.

When to Invoke

Write mode triggers:

  • User requests "add comments", "document this", "improve comments"
  • Code review flags missing docstrings or unclear logic
  • New module/class/function lacks documentation
  • Complex algorithm or business rule needs explanation

Audit mode triggers:

  • User requests "review comments", "comment quality", "documentation audit"
  • Pre-release documentation review
  • Onboarding prep for new team members
  • Legacy code assessment

When NOT to Invoke

  • Code is scheduled for deletion
  • User wants API reference generation (use documentation tools instead)
  • User wants type stub generation (use type hint tools instead)
  • Trivial scripts or one-off scripts where comments add no value

Antirez Comment Taxonomy for Python

Nine comment types from antirez's "Writing system software: code comments". See references/taxonomy.md for full detail.

Positive Types (write these)

Type Name Python Form Purpose
1 Function Docstring What the function/class/module does
2 Design Docstring or # Architecture rationale, API design choices
3 Why Inline # Non-obvious reasoning behind code
4 Teacher Inline # Domain knowledge, algorithm explanation
5 Checklist Inline # Steps that must not be skipped or reordered
6 Guide # section headers Navigation aids in long modules

Negative Types (detect and fix these)

Type Name Detection Fix
7 Trivial Restates the code Delete
8 Debt TODO, FIXME, HACK Resolve or create issue
9 Backup Commented-out code Delete (git preserves history)

Read the full file on GitHub · 273 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 273 lines · 52 tokens per session scan A a48e4554679c

Subscribe to this mod's changes

python-comments is a skill published in the GitHub repository acaprino/daodan (8 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 2,589 once invoked, about $0.0003 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-09-05.

Related

Other skills, from other repositories

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

pennylane

Hardware-agnostic quantum ML framework with automatic differentiation. Use when training quantum circuits via gradients, building hybrid quantum-classical models, or needing device portability across IBM/Google/Rigetti/IonQ. Best for variational algorithms (VQE, QAOA), quantum neural networks, and integration with…

K-Dense-AI/scientific-agent-skills · 98 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

rocm-kernels

Provides guidance for writing and benchmarking optimized Triton kernels for AMD GPUs (MI355X, R9700) on ROCm, targeting HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers. Core kernels: RMSNorm, RoPE 3D, GEGLU, AdaLN. Includes XCD swizzle, autotune, diffusers integration patterns, and LTX-Video pipeline…

huggingface/kernels · 93 tokens

holoscan-install-wheel

Install Holoscan SDK Python wheel via pip into a venv. Use for Python installs; not for native C++/apt or Conda installs.

NVIDIA/skills · 37 tokens

typing-exclusion-worker

Python typing exclusion worker: remove assigned mypy exclusion modules in small scoped batches, fix typing issues, run validation, and produce a structured completion summary. Use when running parallel typing-debt workers or when asked to remove modules from pyproject mypy exclusion overrides.

getsentry/skills · 57 tokens