/ct:documentationfrom ct
Guides writing and reviewing technical documentation using the Diátaxis framework. Covers READMEs, API reference, inline comments, architecture docs, runbooks, migration guides, changelogs, tutorials.
Ships in ct. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Language- and framework-agnostic guidelines for writing and reviewing technical documentation. Covers the reader-facing artefact only; language-specific doc tooling is out of scope.
Good docs answer the reader's question without making them read the code. Bad docs restate the code in English and rot on the next refactor. The skill leans on the Diátaxis framework (https://diataxis.fr/): every doc sits in exactly one of four quadrants. Mixing quadrants in one file is the single most common anti-pattern.
Before writing a sentence, identify the quadrant. Each has a different job, reader state, and stopping condition.
| Quadrant | Audience | Goal | Stopping condition | Common mistake |
|---|---|---|---|---|
| Tutorial | Learner, new to the thing | Acquire competence via guided exercise | Reader produced a working result | Drifting into reference lists |
| How-to guide | Practitioner with a task | Solve one specific problem | The stated problem is solved | Teaching theory instead of steps |
| Reference | Practitioner needing a fact | State API / config / behaviour exactly | Every surface described once, authoritatively | Narrative tone; examples as spec |
| Explanation | Curious reader wanting "why" | Build a mental model | Model is clear enough to reason from | Listing steps reader cannot run |
If a single file tries to do two quadrants, split it.
| Type | Quadrant | Audience | MUST have | NEVER include | Success |
|---|---|---|---|---|---|
| README | How-to + links | First-time visitor | What, who-for, quickstart, links | Full API ref, architecture essays | Newcomer unblocked in <5 min |
| API reference | Reference | Integrator | Public surfaces: inputs, outputs, errors, invariants | Tutorials, rationale, war stories | Caller writes correct code without source |
| Inline comments | Explanation | Future maintainer | WHY for non-obvious decisions, invariants, workarounds | WHAT a good name conveys; ticket refs | Code survives refactor without rot |
| Architecture | Explanation | New engineers | Boundaries, data flow, trust lines, invariants, trade-offs | Line-level walk-throughs, changelog | New engineer predicts where change belongs |
| Runbook | How-to | On-call under stress | Symptoms, diagnostics, recovery, rollback, escalation, SLO impact | Theory, design rationale | Operator at 03:00 recovers without paging author |
| Migration guide | How-to | User moving versions | Breaking changes, before/after code, deprecation timeline, rollback | Marketing, feature highlights | Users upgrade with zero surprises |
| Changelog | Reference | Users scanning impact | Date, version, grouped changes, migration links | Implementation details, refactors | User decides impact in 30s |
| Tutorial | Tutorial | Learner | Single linear path, prereqs, verifiable steps, result | Branches, reference dumps | Learner completes exercise and knows it |
Default: no comment. A comment is a liability — it drifts from the code and readers trust it anyway.
Write a comment only when the WHY is non-obvious:
Do NOT:
// for issue #123) — belongs in PR description and git blame.TODO.Every line must be YES. Any NO blocks ship.
| Check | Pass condition |
|---|---|
| Quadrant named | Exactly one of tutorial / how-to / reference / explanation |
| Audience named | Reader identifiable in first paragraph |
| TL;DR present | Anything over ~200 words opens with a summary |
| Assumptions explicit | Preconditions / prerequisites listed |
| Failure modes covered | What breaks, how it manifests, how to recover |
| Examples runnable | Every code block executed at least once |
| No duplicated facts | Cross-references, not copy-paste |
| Dates on time-bound claims | Version or as of YYYY-MM |
No TODO / tbd / "coming soon" | Ship without the stub or don't ship |
| Links resolve | No 404s, no broken anchors |
| Anti-pattern | Why it fails | Fix |
|---|---|---|
| WHAT-only comments or docs | Rot silently at next refactor | Delete, or rewrite to carry WHY |
| Quadrant mixing | Readers with different goals fight the same file | Split — one quadrant per file |
| Reference dump inside README | Drowns newcomers; duplicates API docs | README keeps pointers; reference lives separately |
| Undated "recently" claims | Unverifiable; misleads after 6 months | Add as of YYYY-MM or a version |
| Untested example code | Looks authoritative; breaks for every reader | Execute every snippet |
| Docs-as-apology | Wall of prose excusing a confusing API | Fix the API; shorten the doc |
Docstring templates full of TODO | False confidence that a thing is documented | Remove the template until real content exists |
| Copy-pasting API reference into README | Two sources of truth; they diverge | Link from README to canonical reference |
| Excuse | Reality |
|---|---|
| "It's obvious, no one will misread it." | You wrote it; readers did not. |
| "Docs slow me down." | Undocumented systems slow everyone else down, forever. |
| "We'll write docs when the API stabilises." | It never stabilises. Document the current shape; update when it moves. |
| "I'll just add a comment to explain." | If a comment is required to understand it, the code probably needs to change. |
| "The tests are the documentation." | Tests describe behaviour, not intent or rationale. |
| "Nobody reads docs anyway." | They do — usually at 3 AM, during an incident. |
| "The team already knows this." | Until the team changes. Which is always. |
| "It's in the wiki / Slack / that one Notion page." | Three sources of truth means zero. Consolidate. |
Language-specific doc tooling is deliberately out of scope — pick the idiomatic tool for the ecosystem and apply this skill's principles on top.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
documentation, technical-writing, diataxis, readme, api-reference, runbook
npx claudepluginhub pvillega/claude-templates --plugin ct38 skills in this plugin
/argocdDeep ArgoCD operational intuition — sync waves and hook lifecycle, ApplicationSet generators, Sync vs Health, drift root causes, sync options, AppProject constraints, rollback, multi-cluster. Load for sync ordering, hook design, drift diagnosis, generator selection, rollback planning, or multi-cluster registration. Skip for "what is GitOps", install walkthroughs, or basic Application YAML. Triggers on: "sync wave", "presync hook", "syncfail", "applicationset generator", "matrix generator", "hpa replicas drift", "ignoreDifferences", "ServerSideApply", "Replace=true", "self-heal", "app-of-apps cascade".
/audit-skillsAudit installed skills for redundancy with built-in model knowledge. Use when asked to "audit skills", "review my skills", "check skill redundancy", "which skills are useful", "clean up skills", or "are my skills teaching you anything new"./bash-hardeningDeep bash correctness — `set -euo pipefail` traps, IFS/word-splitting, trap inheritance, process substitution, array gotchas, version-gated features, ShellCheck "looks right but isn't" patterns. Load when writing or hardening non-trivial bash scripts (installers, CI, unattended ops). Skip for basic if/while/for, one-shot interactive commands, or zsh/fish/POSIX-sh work. Triggers on: "set -e not triggering", "pipefail", "trap ERR", "PIPESTATUS", "macOS bash 3.2", "shellcheck SC2086", "harden bash script", "robust bash".
/bugmagnetDiscover edge cases and test coverage gaps through systematic analysis. Use when analysing TEST coverage, hunting for edge cases, or when code-reviewer identifies test gaps. Triggers on "find holes in my tests", "what could go wrong", "is this well tested", "what edge cases am I missing". When to pick bugmagnet vs alternatives: - find-bugs → branch-diff bug scan (uses git diff, scoped to recent changes) - security-review → OWASP-categorised vulnerability audit - code-review → PR-style review with comment threads - ct:bugmagnet → test-gap edge-case discovery (THIS one) If the question is "are my TESTS missing cases?", use bugmagnet. Otherwise pick one of the three above.
/ci-failure-triageDiagnose a failing GitHub Actions run. Fetch the failing job's step logs, correlate with recent commits, and produce a ranked top-3 root-cause hypothesis plus a minimal fix proposal. Use when the user says "CI is failing", "why did the build break", "triage this GHA failure", "workflow failed", "what broke CI", or pastes a `gh run` URL / run ID. Read-only — does NOT apply fixes, restart the run, or tail logs. For workflow-file security audits use gha-security-review; for local test failures use fix-loop.
/c-languageDeep C operational intuition — undefined behavior, sanitizers (ASan/UBSan/TSan/MSan), hardening flags, atomics/memory ordering, fuzzing, ABI quirks. Load when diagnosing UB, configuring sanitizers or hardened builds, investigating data races, or debugging alignment/atomics. Skip for ordinary C coding, malloc/free, or syntax help. Triggers on: "undefined behavior", "strict aliasing", "AddressSanitizer", "UBSan", "Valgrind", "use-after-free", "_FORTIFY_SOURCE", "memory_order", "libFuzzer", "ABI".
Other plugins' skills for the same job