docstring-generator-skill

docstring-generator-skill is a skill for Claude Code, Codex from darellchua2/opencode-config-template. It costs 40 tokens per session (393 once invoked), scanned A, original, Apache-2.0.

A generator for standard documentation comments, called docstrings, in C#, Java, Python, and TypeScript. It detects the code language and existing style, then writes comments for functions, classes, methods, and other public code.

In plain words
What is it for?
Use it when adding or updating public code documentation, creating APIs, refactoring, or preparing code for review.
Why use it?
It reduces the manual work of documenting APIs and helps keep comments consistent with language conventions such as Javadoc, JSDoc, XML documentation, and PEP 257.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it when adding or updating public code documentation, creating APIs, refactoring, or preparing code for review.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darellchua2/opencode-config-template/docstring-generator-skill
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 darellchua2/opencode-config-template --skill docstring-generator-skill
Clone the repo
git clone --depth 1 https://github.com/darellchua2/opencode-config-template

Made for: Claude Code, Codex.

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-generator-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/docstring-generator-skill/github.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/docstring-generator-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/docstring-generator-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/docstring-generator-skill/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 docstring-generator-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/docstring-generator-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/docstring-generator-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 393 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00040 $0.00393
Opus 5.5 $0.00016 $0.00157
Sonnet 5.5 $0.00008 $0.00079
Haiku 4.5 $0.00004 $0.00039

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

Security

Grade A, and why

docstring-generator-skill 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 2mo 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.

skills/docstring-generator-skill/SKILL.md · 25 lines

What it actually says

What I do

Generate per-language docstrings: Python (PEP 257 + Google/NumPy styles), Java (Javadoc), TypeScript/JavaScript (JSDoc), C# (XML /// docs). Match each language's official conventions and the repo's existing docstring style.

When to use me

Documenting public APIs, libraries, or onboarding-heavy modules; converting docstrings between styles; satisfying doc-coverage CI (e.g. docstring lint rules).

House rules

  • Detect before generating: scan the target file/package for an existing docstring style (Google vs NumPy in Python; @param vs {param} in JS) and MATCH it — mixed styles inside one module are worse than none.
  • Public symbols get docstrings; trivial private helpers don't (PEP 257's own rule).
  • Document contracts, not implementations: parameters/returns/raises (or @throws/<exception>), side effects, and units — never restate what the signature already says.
  • House references: python-docstring-generator / typescript-jsdoc-generator / java-javadoc-generator / csharp-xml-doc-generator skills when a single-language deep pass is needed.

Removed 2026-09: per-language docstring syntax catalogs with annotated examples (PEP 257 classes/functions, Javadoc tags, JSDoc tags, XML tags), full before/after documentation sessions, common-mistake galleries — each language's docstring spec is model-known; kept the style-matching rule and the coverage discipline.

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. 2mo ago Changed · -715 lines de5e27268c05
  2. 3mo ago First seen · 740 lines · 40 tokens per session scan A 9139478ff608

Subscribe to this mod's changes

docstring-generator-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 40 tokens to every session and 393 once invoked, about $0.0002 per session on Opus 5.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-03.

Related

docstring-generator-skill compared with skills from other repositories

docstring-generator-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
docstring-generator-skilldarellchua2/opencode-config-templateSkill62mo agoApache-2.0A40Claude Code, Codex
effect-v4ComposioHQ/composioSkill31ktodayMITA159Claude Code, Codex
langgraph-docslangchain-ai/deepagentsSkill32ktodayMITA62Claude Code, Codex
stripe-projectse2b-dev/E2BSkill15kyesterdayApache-2.0A51Claude Code, Codex
migrating-vercel-ai-sdk-and-eve-to-pydantic-aipydantic/pydantic-aiSkill22ktodayMITA107Codex
migrating-pi-to-pydantic-aipydantic/pydantic-aiSkill22ktodayMITA88Codex
migrating-mastra-to-pydantic-aipydantic/pydantic-aiSkill22ktodayMITA73Codex