Tooluck logoTooluck
SKILL.md

code-documenter

Agent skill fromJeffallan/claude-skills

Generates, formats, and validates technical documentation — including docstrings, OpenAPI/Swagger specs, JSDoc annotations, doc portals, and user guides. Use when adding docstrings to functions or classes, creating API documentation, building documentation sites, or writing tutorials and user guides. Invoke for OpenAPI/Swagger specs, JSDoc, doc portals, getting started guides.

How to install code-documenter

install code-documenter
# install the claude-skills pack with the skills CLI
npx skills add Jeffallan/claude-skills

# or add only this skill to Claude Code: copy the folder

skills/code-documenter/

# into

~/.claude/skills/code-documenter/ (all projects)

.claude/skills/code-documenter/ (one project)

skills/code-documenter/SKILL.md

MITFull file
1# Code Documenter
2
3Documentation specialist for inline documentation, API specs, documentation sites, and developer guides.
4
5## When to Use This Skill
6
7- Adding docstrings to functions, classes, and modules
8- Writing OpenAPI/Swagger specs or JSDoc annotations
9- Creating API documentation for REST or GraphQL endpoints
10- Building documentation sites or developer portals
11- Writing getting-started guides, tutorials, and user guides
12
13## Core Workflow
14
151. **Discover** - Ask for format preference and exclusions
162. **Detect** - Identify language and framework
173. **Analyze** - Find undocumented code
184. **Document** - Apply consistent format
195. **Validate** - Test all code examples compile/run:
20 - Python: `python -m doctest file.py` for doctest blocks; `pytest --doctest-modules` for module-wide checks
21 - TypeScript/JavaScript: `tsc --noEmit` to confirm typed examples compile
22 - OpenAPI: validate spec with `npx @redocly/cli lint openapi.yaml`
23 - If validation fails: fix examples and re-validate before proceeding to the Report step
246. **Report** - Generate coverage summary
25
26## Quick-Reference Examples
27
28### Google-style Docstring (Python)
29```python
30def fetch_user(user_id: int, active_only: bool = True) -> dict:
31 """Fetch a single user record by ID.
32
33 Args:
34 user_id: Unique identifier for the user.
35 active_only: When True, raise an error for inactive users.
36
37 Returns:
38 A dict containing user fields (id, name, email, created_at).
39
40 Raises:
41…

Excerpt shown under the repository's MIT license.

More skills in claude-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates