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.
npx skills add espennilsen/pi --skill docstring-generatorgit clone --depth 1 https://github.com/espennilsen/piWrote 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/skills/espennilsen/pi/docstring-generator)<a href="https://agentmods.dev/skills/espennilsen/pi/docstring-generator"><img src="https://agentmods.dev/badge/skills/espennilsen/pi/docstring-generator/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.
<a href="https://agentmods.dev/skills/espennilsen/pi/docstring-generator"><img src="https://agentmods.dev/badge/skills/espennilsen/pi/docstring-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00118 | $0.01514 |
| Opus 5.5 | $0.00047 | $0.00606 |
| Sonnet 5.5 | $0.00024 | $0.00303 |
| Haiku 4.5 | $0.00012 | $0.00151 |
Grade A, and why
docstring-generator 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 1mo 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 — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Docstring Generator
Generates or updates doc comments for TypeScript and Rust source files. The skill analyzes the public API surface (functions, methods, classes/structs, traits/interfaces, enums) and produces language-idiomatic documentation.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
language |
string | yes | "typescript" or "rust" |
file_path |
string | yes | Path of the file being edited |
full_text |
string | yes | Entire contents of the file |
selection_range |
object | no | { start_line, end_line } (1-based, inclusive) |
mode |
string | no | "update_missing" (default) or "update_all" |
public_only |
boolean | no | If true (default), only document exported/public items |
Workflow
Step 1: Parse declarations
Mentally parse full_text to find all declarations relevant to the language,
public_only, and selection_range settings.
TypeScript declarations to document:
- Exported functions, async functions, and generators
- Exported classes and their public/protected methods
- Exported interfaces and type aliases
- Exported enums
- Exported const/let/var at module level (when they hold complex types)
Rust declarations to document:
pub fn(free functions and methods)pub structand itspubfieldspub enumand its variantspub traitand its method signaturespub typeandpub constitemspub mod(public modules)
Step 2: Generate doc comments
For each target declaration, follow the language-specific rules below.
Step 3: Merge into file
Insert or update the doc comment immediately before the declaration, preserving
all existing formatting, indentation, and code. Return the full updated_text
with only doc comment lines changed.
Behavior & Style Rules
General Rules (all languages)
- Preserve everything: Do not change code semantics, identifiers, formatting, or indentation. Only touch doc comment lines.
- No speculation: If unsure about behavior, write neutral high-level descriptions instead of guessing.
- Present tense, concise: Describe what the item does, not what it is. Avoid restating obvious type information unless it aids clarity.
- Idempotent: Running the skill twice on the same file should produce the same result.
- Respect developer notes: In
update_allmode, preserve explicit warnings, safety notes, panic documentation, and custom annotations.
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.
- 1mo ago First seen · 176 lines · 118 tokens per session scan A 02427e549140
docstring-generator is a skill published in the GitHub repository espennilsen/pi (122 stars, last pushed 9d ago), licensed MIT. It adds 118 tokens to every session and 1,514 once invoked, about $0.0005 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-08-30.
Other skills, from other repositories
ax-rust-signature
Use when writing Rust code with axllm for string signatures, field descriptors, JSON schema output, validation, and typed tool argument shapes.
dd-code-generation
Use pup CLI for immediate Datadog operations or generate code for integration into applications.
ax-rust-llm
Use when writing Rust code with axllm for using the generated Ax package, factory functions, package docs, examples, and API reference.
solana-toolkit-guide
Guide to the Solana Wallet Toolkit — vanity address generation with multi-threaded search, official Solana Labs libraries, Rust and TypeScript implementations. Includes wallet generation, custom address prefixes, and OG names on the blockchain.
solana
Use when working on Solana software, including one or more of: Solana client code using TypeScript, Rust libraries that use Solana crates, Anchor programs, Quasar programs, LiteSVM tests, including Rust program files, TypeScript tests, and Anchor.toml or Quasar.toml configuration. Designed to create minimal, reusable…
architecture-audit
Systematic architecture audit and refactoring methodology for Rust + TypeScript codebases. Use when performing refactoring, cleanup, unification, code review, dead code removal, module reorganization, or tech debt elimination. Ensures no naming confusion, semantic overloading, hidden defaults, duplicate logic, or…