skills/general/documentation/SKILL.md
Documentation standards for READMEs, code comments, and API docs. Use when writing or reviewing any project documentation.
npx skillsauth add devjarus/coding-agent documentationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A good README answers questions in this order:
Comment the WHY, not the WHAT.
// Bad: increment the counter
counter++;
// Good: the counter tracks retries so we can back off after MAX_RETRIES
counter++;
Rules:
TODO comments with tracked issues; do not leave them in production codeEvery endpoint must document:
| Field | Description |
|---|---|
| Method + path | GET /users/{id} |
| Description | What this endpoint does |
| Path/query params | Name, type, required/optional, description |
| Request body | Schema with field descriptions and constraints |
| Success response | Status code + response schema |
| Error responses | All possible error codes and their meanings |
| Auth requirements | Which roles or scopes are required |
Always include a working curl example:
curl -X POST https://api.example.com/v1/users \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "name": "Alice"}'
testing
Multi-source research method — decompose a question, fan out parallel investigators, interleaved-think each result, verify claims adversarially, synthesize a cited answer. Use for breadth-heavy research, stack comparisons, "which approach wins" questions.
testing
Decide when to use unit vs integration vs e2e tests, and when to mock vs use the real thing per dependency. Dependency injection is the enabler — without it you end up monkey-patching imports. Apply when writing tests of any kind.
development
Test-driven development process — write failing test, implement to pass, refactor. Use when implementing any feature or fixing bugs.
development
Patterns for sharing types, API contracts, and validation schemas between frontend and backend. Use when multiple domains consume the same data shapes to prevent contract drift.