document-code

document-code is a skill for Claude Code, Codex from jjmartres/ai-coding-agents. It costs 88 tokens per session (2,530 once invoked), scanned A, original, MIT.

A coding guide for writing clear, consistent documentation in Python, Go, TypeScript, and Terraform. It covers Python docstrings, Go comments, TypeScript JSDoc, and Terraform descriptions.

In plain words
What is it for?
Use it when adding or reviewing documentation, explaining functions and classes, or improving code that lacks clear comments.
Why use it?
It helps developers document public code consistently, including its inputs, outputs, errors, and usage examples.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding or reviewing documentation, explaining functions and classes, or improving code that lacks clear comments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jjmartres/ai-coding-agents/document-code
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 jjmartres/ai-coding-agents --skill document-code
Clone the repo
git clone --depth 1 https://github.com/jjmartres/ai-coding-agents

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 document-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/jjmartres/ai-coding-agents/document-code/github.svg)](https://agentmods.dev/skills/jjmartres/ai-coding-agents/document-code)
Your own site
<a href="https://agentmods.dev/skills/jjmartres/ai-coding-agents/document-code"><img src="https://agentmods.dev/badge/skills/jjmartres/ai-coding-agents/document-code/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 document-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/jjmartres/ai-coding-agents/document-code"><img src="https://agentmods.dev/badge/skills/jjmartres/ai-coding-agents/document-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,530 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.00088 $0.02530
Opus 5.5 $0.00035 $0.01012
Sonnet 5.5 $0.00018 $0.00506
Haiku 4.5 $0.00009 $0.00253

Measured 20d ago against content hash 8c05aba56476, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

document-code 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 20d 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.

shared/.ai-agents/skills/document-code/SKILL.md · 398 lines

How it starts

The opening of the file, as written. The whole thing — 398 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Documentation Standards

Apply Google Style documentation standards to Python (docstrings), Go (comments), TypeScript (JSDoc), and Terraform (descriptions). Ensures consistent, professional, and comprehensive code documentation across multiple languages.

When to Apply This Skill

Use this skill when:

  • Writing new functions, classes, or packages
  • Reviewing code for documentation quality
  • User requests "document this code" or "add docstrings"
  • User mentions "Google Style" or documentation standards
  • Refactoring code that lacks proper documentation
  • Creating code examples that should be well-documented

Core Principles

  1. Clarity: Documentation should be immediately understandable
  2. Completeness: Document all public APIs, parameters, returns, exceptions
  3. Consistency: Follow language-specific Google Style conventions
  4. Conciseness: Be thorough but avoid redundancy
  5. Examples: Include usage examples for complex functionality

Workflow

1. Detect Language

Identify the programming language:

  • Python: Look for .py files, def, class keywords, type hints
  • Go: Look for .go files, func, type, package keywords
  • TypeScript: Look for .ts / .tsx files, interface, type, export, import keywords
  • Terraform: Look for .tf files, resource, variable, module keywords

2. Apply Appropriate Standard

Read the corresponding reference file:

  • Python: Read references/python_google_style.md for complete docstring standards
  • Go: Read references/go_google_style.md for complete comment standards
  • TypeScript: Read references/typescript_google_style.md for complete JSDoc standards
  • Terraform: Read references/terraform_style.md for complete description standards

3. Document Code Elements

Apply documentation to all appropriate code elements:

Python:

  • Module-level docstrings
  • Class docstrings
  • Method/function docstrings
  • Important variables/constants

Read the full file on GitHub · 398 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. 20d ago Changed · +36 lines 8c05aba56476
  2. 1mo ago First seen · 362 lines · 88 tokens per session scan A 60bb2848f6ec

Subscribe to this mod's changes

document-code is a skill published in the GitHub repository jjmartres/ai-coding-agents (49 stars, last pushed 8d ago), licensed MIT. It adds 88 tokens to every session and 2,530 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

coding-guidance-python

Python implementation and review skill. Use when writing, modifying, refactoring, or reviewing Python code, especially production Python that needs clear contracts, type safety, testability, and maintainable module boundaries. Portable across Python repos and tooling stacks.

n-n-code/n-n-code-skills · 53 tokens

effect-v4

Write, review, or upgrade Effect v4 code in the Composio CLI, cli-keyring, and json-schema-to-effect-schema packages, all pinned exactly to [email protected] — Context.Service and explicit layers, Schema.TaggedError and typed recovery, the effect/cli command surface, and the vendored effect source oracle. Use when writing…

ComposioHQ/composio · 157 tokens

pn-python-scaffolding

Scaffolds new Python API projects (FastAPI, Flask, Django) or routes. Use when adding a new route/module; covers project layout, env/secrets, validation, error handling, and idiomatic Python patterns.

perniemann/pnCore · 51 tokens

coding-guidance-go-tui

Go terminal UI implementation and review guidance for interactive Bubble Tea state machines. Includes Huh only when embedded in Bubble Tea; use coding-guidance-go for standalone or one-shot Huh prompts and other non-TUI Go work. Covers Bubbles, Lip Gloss, key bindings, focus, and supported Charmbracelet major versions.

n-n-code/n-n-code-skills · 74 tokens

coding-guidance-go

Go implementation and review guidance for non-interactive CLIs, libraries, workers, and services; use coding-guidance-go-tui for interactive Bubble Tea and go-testing-with-testify for testify-focused test work. Covers errors, contexts, concurrency, package boundaries, standard tests, and measured performance.

n-n-code/n-n-code-skills · 68 tokens

coding-guidance-qt

Qt C++ implementation and review guidance for QObject, QWidget/model-view, signals and slots, thread affinity, .ui forms, and Qt build tooling; use coding-guidance-cpp for non-Qt C++ design. Portable across Qt5/Qt6 repositories with a QWidget desktop focus.

n-n-code/n-n-code-skills · 67 tokens