skills/devtool-documentation/SKILL.md
Expert in developer tool documentation as a product. Activate on: docs site, getting started guide, API reference, developer documentation, Docusaurus, Mintlify, Nextra, ReadMe, migration guide, troubleshooting page, docs information architecture, documentation testing, llms.txt. NOT for: marketing copy (use seo-content-blogging), API design itself (use api-architect), general technical writing (use technical-writer).
npx skillsauth add curiositech/windags-skills devtool-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.
Expert in the specific art of documenting developer tools — the "documentation as product" philosophy where docs are the UI of your API.
Activate on: "docs site", "getting started guide", "API reference", "developer documentation", "Docusaurus", "Mintlify", "Nextra", "ReadMe", "migration guide", "troubleshooting page", "docs information architecture", "documentation testing", "llms.txt", "docs-as-code", "quickstart"
NOT for: Marketing copy -> seo-content-blogging | API design itself -> api-architect | General technical writing -> technical-writer
Every developer docs site organizes content into four quadrants. Mixing them is the #1 cause of bad docs.
PRACTICAL THEORETICAL
┌─────────────────┬─────────────────┐
LEARNING │ TUTORIALS │ EXPLANATION │
(acquiring) │ "Learning" │ "Understanding" │
│ by doing │ why it works │
├─────────────────┼─────────────────┤
WORKING │ HOW-TO GUIDES │ REFERENCE │
(applying) │ "Achieving" │ "Information" │
│ a goal │ lookup │
└─────────────────┴─────────────────┘
| Type | Reader State | Structure | Example | |------|-------------|-----------|---------| | Tutorial | "I'm learning" | Step-by-step, controlled, no choices | "Build your first app in 5 minutes" | | How-To | "I need to do X" | Goal-oriented, assumes knowledge | "How to deploy to Kubernetes" | | Reference | "I need the specifics" | Exhaustive, structured, no narrative | API method signatures, config options | | Explanation | "I want to understand" | Discursive, contextual, conceptual | "How authentication works under the hood" |
A tutorial that stops to explain theory loses the learner. A reference page with narrative loses the person who just needs the method signature. Keep them separate; link between them.
| Platform | Best For | Cost | Setup | AI Features | |----------|----------|------|-------|-------------| | Docusaurus | Open-source projects, full control | Free (MIT) | Medium (React) | Plugin ecosystem | | Mintlify | Startups wanting Stripe-quality docs fast | $150-$500/mo | Low (MDX, Git) | AI search, llms.txt | | Nextra | Next.js projects, content-heavy docs | Free (MIT) | Low (Next.js) | Via plugins | | ReadMe | API-first companies, interactive docs | $99-$399/mo | Low (dashboard) | AI chat, auto-gen | | GitBook | Team wikis, knowledge bases | Free-$199/mo | Very low | AI search | | Starlight (Astro) | Performance-critical, static sites | Free (MIT) | Medium (Astro) | Plugin ecosystem |
The getting started page has the highest bounce rate and the highest conversion potential. It must be flawless.
# Getting Started
<Prerequisites callout>
- Node.js 18+
- A Supabase account (free tier works)
</Prerequisites>
## 1. Install
\`\`\`bash
npm install @your-tool/cli
\`\`\`
## 2. Initialize
\`\`\`bash
npx your-tool init
\`\`\`
<Expected output>
✓ Created config file at ./your-tool.config.ts
✓ Connected to your-tool cloud
</Expected output>
## 3. Your First [Thing]
\`\`\`typescript
import { YourTool } from '@your-tool/sdk'
const client = new YourTool({ apiKey: process.env.YOUR_TOOL_KEY })
const result = await client.doTheThing({ input: "hello" })
console.log(result)
// => { output: "Hello, world!", latency: 42 }
\`\`\`
## What Just Happened?
[2-3 sentences explaining the mental model. Link to Explanation page.]
## Next Steps
- **[Build a real app](/tutorials/build-a-chat-app)** — 15 min tutorial
- **[API Reference](/reference/client)** — All available methods
- **[How auth works](/explanation/authentication)** — Under the hood
"hello" is fine. "sk_test_abc123" is better than "YOUR_API_KEY".Stripe's API reference is the gold standard because of:
"cus_NffrFeUfNV2Hib" not "CUSTOMER_ID".# create(params)
Creates a new [resource].
## Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | `string` | Yes | Display name (1-100 chars) |
| `email` | `string` | Yes | Must be valid email format |
| `metadata` | `Record<string, string>` | No | Up to 50 key-value pairs |
## Returns
A `Resource` object on success. Throws `ValidationError` if params invalid.
## Example
\`\`\`typescript
const user = await client.users.create({
name: "Ada Lovelace",
email: "[email protected]",
metadata: { role: "engineer" }
})
// => { id: "usr_abc123", name: "Ada Lovelace", ... }
\`\`\`
## Errors
| Code | Meaning |
|------|---------|
| `validation_error` | Invalid parameters (see `details` array) |
| `conflict` | Email already exists |
| `rate_limited` | Too many requests (retry after `Retry-After` header) |
Author (MDX/MD) → Git Commit → PR Review → CI Checks → Deploy
# .github/workflows/docs-ci.yml
name: Docs CI
on: [pull_request]
jobs:
docs-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint prose
run: npx vale docs/ # Prose linting (style guide)
- name: Check links
run: npx linkinator docs/ # Dead link detection
- name: Validate code blocks
run: npx ts-check-md docs/ # TypeScript code blocks compile
- name: Spell check
run: npx cspell docs/**/*.md
- name: Build docs
run: npm run docs:build # Catch build errors
| Tool | Purpose | Command |
|------|---------|---------|
| Vale | Prose linting (Microsoft, Google style) | vale docs/ |
| linkinator | Dead link detection | linkinator docs/ --recurse |
| cspell | Spell checking with tech dictionaries | cspell "docs/**/*.md" |
| ts-check-md | Validate TypeScript code blocks compile | ts-check-md docs/ |
| remark-lint | Markdown formatting consistency | remark docs/ --use preset-lint-recommended |
| Algolia DocSearch | Docs search (free for OSS) | Apply at docsearch.algolia.com |
docs/
├── index.md # Landing → quickstart CTA
├── getting-started/
│ ├── quickstart.md # 5-min tutorial (THE most important page)
│ ├── installation.md # All platforms, all package managers
│ └── key-concepts.md # Mental model before diving in
├── tutorials/
│ ├── build-a-chat-app.md # End-to-end, 15-30 min each
│ ├── real-time-dashboard.md
│ └── deploy-to-production.md
├── guides/ # How-to guides (goal-oriented)
│ ├── authentication.md
│ ├── error-handling.md
│ ├── testing.md
│ ├── migration-from-v1.md
│ └── performance-tuning.md
├── reference/ # API reference (exhaustive)
│ ├── client.md
│ ├── config.md
│ ├── cli.md
│ └── errors.md
├── explanation/ # Conceptual docs
│ ├── architecture.md
│ ├── how-auth-works.md
│ └── data-model.md
└── resources/
├── troubleshooting.md # Common errors + solutions
├── faq.md
├── changelog.md
└── community.md
Migration guides are the most underinvested doc type. They determine whether users upgrade or leave.
# Migrating from v2 to v3
**Estimated time**: 15-30 minutes for most projects
**Breaking changes**: 3 (listed below)
## Before You Start
- [ ] You're on v2.8+ (run `your-tool --version`)
- [ ] Your tests pass on v2
- [ ] You've read the [v3 announcement blog post](/blog/v3)
## Step 1: Update Dependencies
\`\`\`bash
npm install @your-tool/sdk@3
\`\`\`
## Step 2: Breaking Change — `createClient()` signature
**Before (v2):**
\`\`\`typescript
const client = createClient("your-api-key")
\`\`\`
**After (v3):**
\`\`\`typescript
const client = createClient({ apiKey: "your-api-key" })
\`\`\`
**Why**: Object params are extensible. We need to add `region` and `timeout`.
**Codemod**: `npx @your-tool/codemod v2-to-v3`
## Step 3: [Next Breaking Change]
[Same pattern: before/after/why/codemod]
## Deprecations (Non-Breaking)
| Deprecated | Replacement | Removal |
|-----------|-------------|---------|
| `client.query()` | `client.sql()` | v4 |
| `Config.debug` | `Config.logLevel` | v4 |
## Verification
Run your test suite. If you see these specific errors, here's what they mean:
- `TypeError: createClient is not a function` → You imported from the wrong path
- `AuthError: invalid key format` → Wrap your key in the object param
## Need Help?
- [Discord #migration channel](https://discord.gg/...)
- [GitHub Discussion](https://github.com/...)
Structure every troubleshooting entry as: exact error message (H2, so search engines and users find it) -> When (context) -> Why (builds trust) -> Fix (copy-pasteable commands, not "adjust your configuration"). Users paste error messages into search. Make your H2 headings match what they paste.
Modern docs need to serve both humans and LLMs. Mintlify, Vercel, and Supabase lead here.
# Your Tool Name
> One-line description of what it does.
## Docs
- [Getting Started](https://docs.your-tool.com/quickstart): Install and run your first query
- [Authentication](https://docs.your-tool.com/auth): API keys, OAuth, service accounts
- [API Reference](https://docs.your-tool.com/reference): All endpoints and methods
## Optional
- [GitHub](https://github.com/your-tool)
- [Status](https://status.your-tool.com)
Symptom: Getting started page is 2000 words before the first code block. Fix: First code block within 30 seconds of scrolling. Move context to Explanation pages.
Symptom: Examples use deprecated APIs, wrong import paths, old syntax.
Fix: Test code examples in CI. Use ts-check-md or pytest-codeblocks.
Symptom: Users get Error: E4012 with no explanation anywhere in docs.
Fix: Every error code gets a troubleshooting entry. Link from error messages to docs.
Symptom: Pages end with 15 "See also" links, none obviously relevant. Fix: Max 3 next steps, each with a clear reason why the reader would go there.
Symptom: Method signature documented, but no usage example. Fix: Every method gets at least one example with realistic data and expected output.
Symptom: Page titled "Tutorial" but is really a concept explanation or a how-to guide. Fix: Tutorials are step-by-step, start-to-finish, and the reader makes no decisions.
[ ] Diataxis quadrants are separated — tutorials, how-tos, reference, explanation
[ ] Getting started guide tested by a newcomer (not the author)
[ ] Time-to-hello-world measured and under 5 minutes
[ ] Every API method has at least one working example
[ ] Code examples tested in CI pipeline
[ ] Prose linted with Vale or equivalent
[ ] Dead links checked automatically
[ ] Search implemented and failed searches tracked
[ ] llms.txt deployed for AI discoverability
[ ] Migration guide exists for every breaking version
[ ] Troubleshooting covers top 10 error messages
[ ] Feedback mechanism on every page
[ ] Mobile and dark mode tested
tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.