skills/documentation/SKILL.md
How to create, update, and manage documentation for any software project. Use this skill whenever asked to add documentation, update docs, create a runbook, write an ADR, document a feature, add a product spec, write onboarding guides, or any documentation-related task. Also trigger when making behavior-changing code changes (features, fixes, refactors, integrations, infra changes) that require accompanying documentation updates — even if the user doesn't explicitly mention "docs".
npx skillsauth add cmglezpdev/custom-skills 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.
Universal guide for creating and maintaining project documentation. Works with any project type, docs tooling, and team structure.
Read these as needed — don't load everything upfront:
| File | When to read |
| ---- | ------------ |
| references/templates.md | Index of all templates — points to individual files in references/templates/ |
| references/templates/<type>.md | When creating a new doc (Feature, ADR, Workflow, Runbook, Postmortem, Product/PRD, Onboarding) |
| references/folder-structure.md | When unsure where a doc goes or when creating a new section |
| references/decision-guide.md | When deciding which section and template to use (includes flowchart) |
| references/project-types/*.md | When adapting the standard structure for a specific project type |
| references/tooling/*.md | When the project uses a docs site tool (VitePress, Docusaurus, etc.) |
Follow these principles when writing or updating documentation:
Follow these steps in order for every documentation change.
Before creating anything new, search the docs/ directory (and the registry/index if the project has one). Check if a doc already covers the topic. Prefer updating existing docs over creating new ones.
Use the decision guide (references/decision-guide.md) to find the right section. The two-step filter:
modules/<module>/ subtree| Purpose | Location | Template |
|---------|----------|----------|
| New developer guide | onboarding/ | Onboarding Guide |
| Product spec / glossary | product/ | Product/PRD |
| Coding convention | conventions/backend/ or conventions/frontend/ | None (reference doc) |
| Architecture decision | adr/ | ADR |
| System design | architecture/ | None |
| Engineering process | workflows/ | Workflow |
| Operations / incidents | operations/ | Runbook or Postmortem |
| Security posture | security/ | None or Runbook |
| Module feature | modules/<m>/features/ | Feature |
| Module domain logic | modules/<m>/domain/ | Feature |
| Module runbook | modules/<m>/runbooks/ | Runbook |
For the full flowchart with boundary cases, read references/decision-guide.md.
Every doc file must include this frontmatter:
---
title: '<doc title>'
summary: '<one-line purpose>'
status: active
owner: '<team-or-role>'
last_reviewed: YYYY-MM-DD
source_paths:
- '<repo/path/used/as/source>'
replaces: '<old doc path, if replacing>'
replaced_by: '<new doc path, if being replaced>'
---
status: draft | active | superseded | archivedlast_reviewed: always set to today's datereplaces / replaced_by: only when superseding another docFor the document body, read references/templates.md to get the right template for your doc type.
If the project uses a registry file or docs index (registry.md, docs/README.md):
last_reviewed dateIf the project uses a docs site tool (VitePress, Docusaurus, etc.), new pages must be added to the site configuration. Read the matching adapter in references/tooling/ for details.
legacy/superseded/ (or archive/delete if no historical value)status: superseded and add replaced_by in old doc's frontmatterreplaces in new doc's frontmatterThe standard folder structure works for any project, but different project types emphasize different sections. Read the matching reference file for specific guidance:
| Project Type | Reference | Key Emphasis |
|-------------|-----------|--------------|
| Monorepo | references/project-types/monorepo.md | modules/ directory, registry, cross-module architecture |
| Monolith | references/project-types/monolith.md | Simpler structure, operations, architecture overview |
| Frontend-only | references/project-types/frontend-only.md | conventions/frontend/, product specs, UI architecture |
| Backend-only | references/project-types/backend-only.md | conventions/backend/, operations, security, API design |
Not everything needs a doc. Document when:
These are the signals that a topic deserves documentation.
Before submitting any documentation change:
last_revieweddevelopment
Implement structured, wide-event logging in NestJS applications following the canonical log line / wide event pattern. Use this skill whenever the user asks about logging, observability, debugging, or tracing in a NestJS app. Also trigger when the user mentions log lines, structured logging, canonical log lines, wide events, request context, observability, or asks how to improve their NestJS logging setup. Use this even if the user just says "add logging" to a NestJS project, since the wide event pattern should be the default, not scattered console.log calls.
development
Add application-level Prometheus metrics to a NestJS app using the OpenTelemetry SDK and an OTel Collector. Covers HTTP RED metrics, Node.js runtime metrics, business metrics, and advanced observability patterns. Use this skill whenever the user wants to add metrics, dashboards, or monitoring to a NestJS application, mentions Prometheus, Grafana metrics, OpenTelemetry metrics, OTel Collector, or asks about SLIs/SLOs, or application-level monitoring in a NestJS context. Also trigger when the user wants custom counters, histograms, gauges, or summaries in NestJS. This skill focuses exclusively on metrics the APPLICATION must emit. It does not cover logging, tracing, infra-level metrics from cAdvisor, node-exporter, postgres-exporter, or redis-exporter.
development
Perform a comprehensive security and code quality audit on web-based projects (React, Next.js, NestJS). Uses the OWASP Top 10:2025 standard as the primary security framework. Generates a detailed Markdown report with findings categorized by severity (CRITICAL, HIGH, MEDIUM, LOW). Use this skill whenever the user asks to audit, review, scan, or analyze their codebase for vulnerabilities, security issues, code quality problems, bad patterns, or potential bugs. Also trigger when the user mentions "OWASP", "security review", "vulnerability scan", "code audit", "pentest review", "security assessment", "code health check", or asks "is my code secure?" or "find bugs in my project". Trigger even if the user just says "audit this" or "check my code" pointing at a web project. This skill supports React, Next.js, and NestJS projects, including monorepos containing multiple project types.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.