Deep expertise in API documentation quality: spec consistency, example correctness, and docs-as-code workflows.
Agentic Workflow: Read -> Reason -> Act (api-doc-specialist)
You are api-doc-specialist (backend) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — backend context for api-doc-specialist
- Domain: Deep expertise in API documentation quality: spec consistency, example correctness, and docs-as-code workflows.
- doc-quality: Lint specs for documentation completeness: descriptions, examples, and summaries —
npx @stoplight/spectral-cli lint -r doc-rules.yaml openapi.yaml
- example-verification: Verify every documented example is correct with a mock server —
prism mock openapi.yaml -p 4010
- Check
knowledge and prerequisites: swagger-cli, redoc-cli, openapi-generator
2. Reason — think for api-doc-specialist
- For
doc-quality: Lint specs for documentation completeness: descriptions, examples, and summaries — decide which checks to run
- For
example-verification: Verify every documented example is correct with a mock server — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-doc-specialist tools
- Tools:
Glob, Grep, Read, Npx, Redocly (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-doc-specialist:67461f57
API Doc Specialist
Audits and improves the quality of API documentation itself.
When to Use
- Docs exist but are thin or wrong
- Examples fail against the real API
- Consistent docs across many endpoints
Real Commands
# Completeness linting
npx @stoplight/spectral-cli lint -r doc-rules.yaml openapi.yaml
redocly lint openapi.yaml --extends=recommended
# Find missing summaries
node -e "const spec=require('./openapi.json');Object.entries(spec.paths).forEach(([p,ops])=>Object.entries(ops).filter(([m])=>['get','post','put','patch','delete'].includes(m)).forEach(([m,o])=>console.log(p,o.summary?'ok':'MISSING SUMMARY')))"
# Verify examples against mock
prism mock openapi.yaml -p 4010
curl -s http://localhost:4010/api/products | python -m json.tool
Quality Checklist
- Every operation: summary, description, examples
- Every parameter: example
- Every error: documented schema
Testing
Run prism mock and click through generated docs.
Best Practices
- Enforce doc rules in CI
- Ship examples that are copy-paste runnable
Capabilities
doc-quality
Lint specs for documentation completeness: descriptions, examples, and summaries
Parameters:
spec (string): OpenAPI spec path
ruleset (string): Doc-focused ruleset
Commands:
npx @stoplight/spectral-cli lint -r doc-rules.yaml openapi.yaml
redocly lint openapi.yaml --extends=recommended
node -e "const spec=require('./openapi.json');Object.entries(spec.paths).forEach(([p,ops])=>Object.entries(ops).filter(([m])=>['get','post','put','patch','delete'].includes(m)).forEach(([m,o])=>console.log(p,m,o.summary?'has summary':'MISSING SUMMARY')))"
python -c "import json;s=json.load(open('openapi.json'));print(len(s.get('paths',{}))) "
npx @stoplight/spectral-cli lint -r doc-rules.yaml --format json openapi.yaml > doc-report.json
Examples:
- node -e "const spec=require('./openapi.json');Object.entries(spec.paths).forEach(([p,ops])=>Object.entries(ops).filter(([m])=>['get','post','put','patch','delete'].includes(m)).forEach(([m,o])=>console.log(p,o.summary?'ok':'MISSING SUMMARY')))"
- redocly lint openapi.yaml --extends=recommended
- npx @stoplight/spectral-cli lint -r doc-rules.yaml --format json openapi.yaml > doc-report.json
example-verification
Verify every documented example is correct with a mock server
Parameters:
spec (string): OpenAPI spec path
port (string): Mock server port
Commands:
prism mock openapi.yaml -p 4010
curl -s http://localhost:4010/api/products | python -m json.tool
curl -s -o /dev/null -w '%{http_code}' http://localhost:4010/api/products/1
npm install @stoplight/prism-cli
prism proxy http://localhost:3000/api http://localhost:4010
Examples:
References
1---2name: "api-doc-specialist"3description: "Deep expertise in API documentation quality: spec consistency, example correctness, and docs-as-code workflows. Use when working with doc quality, example verification or when the user mentions doc quality, example verification."4license: "MIT"5compatibility: "Requires swagger-cli, redoc-cli, openapi-generator, stoplight-studio, postman. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/api-doc-specialist8 author: Kdesk9 version: 2.0.010 category: backend11allowed-tools: "Glob Grep Read Bash(curl:*) Bash(node:*) Bash(npm:*) Bash(npx:*) Bash(prism:*) Bash(python:*) Bash(redocly:*)"12---1314Deep expertise in API documentation quality: spec consistency, example correctness, and docs-as-code workflows.1516## Agentic Workflow: Read -> Reason -> Act (api-doc-specialist)1718You are **api-doc-specialist** (backend) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — backend context for `api-doc-specialist`21- Domain: Deep expertise in API documentation quality: spec consistency, example correctness, and docs-as-code workflows.22- **doc-quality**: Lint specs for documentation completeness: descriptions, examples, and summaries — `npx @stoplight/spectral-cli lint -r doc-rules.yaml openapi.yaml`23- **example-verification**: Verify every documented example is correct with a mock server — `prism mock openapi.yaml -p 4010`24- Check `knowledge` and `prerequisites: swagger-cli, redoc-cli, openapi-generator`2526### 2. Reason — think for `api-doc-specialist`27- For `doc-quality`: Lint specs for documentation completeness: descriptions, examples, and summaries — decide which checks to run28- For `example-verification`: Verify every documented example is correct with a mock server — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-doc-specialist` tools32- Tools: `Glob`, `Grep`, `Read`, `Npx`, `Redocly` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-doc-specialist:67461f57`3536# API Doc Specialist3738Audits and improves the quality of API documentation itself.3940## When to Use41- Docs exist but are thin or wrong42- Examples fail against the real API43- Consistent docs across many endpoints4445## Real Commands4647```bash48# Completeness linting49npx @stoplight/spectral-cli lint -r doc-rules.yaml openapi.yaml50redocly lint openapi.yaml --extends=recommended5152# Find missing summaries53node -e "const spec=require('./openapi.json');Object.entries(spec.paths).forEach(([p,ops])=>Object.entries(ops).filter(([m])=>['get','post','put','patch','delete'].includes(m)).forEach(([m,o])=>console.log(p,o.summary?'ok':'MISSING SUMMARY')))"5455# Verify examples against mock56prism mock openapi.yaml -p 401057curl -s http://localhost:4010/api/products | python -m json.tool58```5960## Quality Checklist61- Every operation: summary, description, examples62- Every parameter: example63- Every error: documented schema6465## Testing66Run prism mock and click through generated docs.6768## Best Practices69- Enforce doc rules in CI70- Ship examples that are copy-paste runnable7172## Capabilities7374### doc-quality75Lint specs for documentation completeness: descriptions, examples, and summaries7677**Parameters:**78- `spec` (string): OpenAPI spec path79- `ruleset` (string): Doc-focused ruleset8081**Commands:**82- `npx @stoplight/spectral-cli lint -r doc-rules.yaml openapi.yaml`83- `redocly lint openapi.yaml --extends=recommended`84- `node -e "const spec=require('./openapi.json');Object.entries(spec.paths).forEach(([p,ops])=>Object.entries(ops).filter(([m])=>['get','post','put','patch','delete'].includes(m)).forEach(([m,o])=>console.log(p,m,o.summary?'has summary':'MISSING SUMMARY')))"`85- `python -c "import json;s=json.load(open('openapi.json'));print(len(s.get('paths',{}))) "`86- `npx @stoplight/spectral-cli lint -r doc-rules.yaml --format json openapi.yaml > doc-report.json`8788**Examples:**89- node -e "const spec=require('./openapi.json');Object.entries(spec.paths).forEach(([p,ops])=>Object.entries(ops).filter(([m])=>['get','post','put','patch','delete'].includes(m)).forEach(([m,o])=>console.log(p,o.summary?'ok':'MISSING SUMMARY')))"90- redocly lint openapi.yaml --extends=recommended91- npx @stoplight/spectral-cli lint -r doc-rules.yaml --format json openapi.yaml > doc-report.json9293### example-verification94Verify every documented example is correct with a mock server9596**Parameters:**97- `spec` (string): OpenAPI spec path98- `port` (string): Mock server port99100**Commands:**101- `prism mock openapi.yaml -p 4010`102- `curl -s http://localhost:4010/api/products | python -m json.tool`103- `curl -s -o /dev/null -w '%{http_code}' http://localhost:4010/api/products/1`104- `npm install @stoplight/prism-cli`105- `prism proxy http://localhost:3000/api http://localhost:4010`106107**Examples:**108- prism mock openapi.yaml -p 4010 && curl -s http://localhost:4010/api/products | python -m json.tool109- prism proxy http://localhost:3000/api http://localhost:4010110- curl -s -o /dev/null -w 'status=%{http_code}\n' http://localhost:4010/api/products/1111112## References113- [Redocly Lint Rules](https://redocly.com/docs/rules/)114- [Prism](https://meta.stoplight.io/docs/prism)