# API Documentation Specialist

> Deep expertise in API documentation: generating multi-language SDKs, interactive reference docs, and developer portals from OpenAPI. Use when working with sdk generation, portal publishing or when the user mentions sdk generation, portal publishing.

- Skill: `opknock/api-documentation-specialist` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/api-documentation-specialist`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/api-documentation-specialist/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- License: MIT
- Author: OpKnock (https://skillmd.com/u/opknock)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/opknock/api-documentation-specialist

---


Deep expertise in API documentation: generating multi-language SDKs, interactive reference docs, and developer portals from OpenAPI.

## Agentic Workflow: Read -> Reason -> Act (api-documentation-specialist)

You are **api-documentation-specialist** (backend) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.

### 1. Read — backend context for `api-documentation-specialist`
- Domain: Deep expertise in API documentation: generating multi-language SDKs, interactive reference docs, and developer portals from OpenAPI.
- **sdk-generation**: Generate typed client SDKs in multiple languages from one OpenAPI spec — `openapi-generator generate -i openapi.yaml -g typescript-fetch -o sdk/ts`
- **portal-publishing**: Build and deploy interactive documentation sites with search and versioning — `redocly build-docs openapi.yaml -o docs/api.html`
- Check `knowledge` and `prerequisites: swagger-cli, redoc-cli, openapi-generator`

### 2. Reason — think for `api-documentation-specialist`
- For `sdk-generation`: Generate typed client SDKs in multiple languages from one OpenAPI spec — decide which checks to run
- For `portal-publishing`: Build and deploy interactive documentation sites with search and versioning — decide which checks to run
- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs

### 3. Act — execute with `api-documentation-specialist` tools
- Tools: `Glob`, `Grep`, `Read`, `Openapi-generator`, `Redocly` (see frontmatter `tools`/`allowed-tools`)
- Use `safe_path` for any write; record evidence (paths, checksums)
- Fingerprint: `api-documentation-specialist:4edbfeab`

# API Documentation Specialist

Produces documentation that developers love: interactive references, generated SDKs, and portals.

## When to Use
- Public/partner API documentation
- Multi-language SDK delivery
- Keeping docs in sync with the spec
- Versioned docs across API versions

## Real Commands

```bash
# Validate first
redocly lint openapi.yaml

# Generate SDKs
openapi-generator generate -i openapi.yaml -g typescript-fetch -o sdk/ts
openapi-generator generate -i openapi.yaml -g python --package-name myapi -o sdk/python

# Interactive reference
redocly build-docs openapi.yaml -o public/api.html

# Serve locally
redoc-cli serve openapi.yaml
```

## Portal Structure
- Quickstart and auth guide
- Interactive reference (Redocly/Swagger UI)
- SDK downloads with usage examples
- Changelog and deprecation policy

## Testing
Exercise every example in the docs against a running mock (`prism mock openapi.yaml`).

## Best Practices
- Generate docs and SDKs in CI on spec changes
- Include error responses in examples
- Version docs by API version

## Capabilities

### sdk-generation
Generate typed client SDKs in multiple languages from one OpenAPI spec

**Parameters:**
- `lang` (string): Generator name: typescript-fetch, python, go, java, ruby
- `outputDir` (string): SDK output directory

**Commands:**
- `openapi-generator generate -i openapi.yaml -g typescript-fetch -o sdk/ts`
- `openapi-generator generate -i openapi.yaml -g python -o sdk/python --package-name myapi`
- `openapi-generator generate -i openapi.yaml -g go -o sdk/go`
- `openapi-generator generate -i openapi.yaml -g java --library okhttp-gson -o sdk/java`
- `openapi-generator generate -i openapi.yaml -g ruby -o sdk/ruby`

**Examples:**
- openapi-generator generate -i openapi.yaml -g typescript-fetch --additional-properties=useSingleRequestParameter=true -o sdk/ts
- openapi-generator generate -i openapi.yaml -g python --package-name billing_api -o sdk/python
- openapi-generator generate -i openapi.yaml -g go --git-repo-id myapi --git-user-id acme -o sdk/go

### portal-publishing
Build and deploy interactive documentation sites with search and versioning

**Parameters:**
- `spec` (string): OpenAPI spec path
- `output` (string): HTML output path

**Commands:**
- `redocly build-docs openapi.yaml -o docs/api.html`
- `redoc-cli bundle openapi.yaml -o redoc.html`
- `redocly bundle openapi.yaml -o bundled.yaml`
- `npx @redocly/cli lint openapi.yaml`
- `redoc-cli serve openapi.yaml`

**Examples:**
- redocly build-docs openapi.yaml -o public/api.html
- redocly bundle openapi.yaml -o dist/bundled.yaml && redocly build-docs dist/bundled.yaml
- npx @redocly/cli lint --config redocly.yaml openapi.yaml

## References
- [OpenAPI Generator Docs](https://openapi-generator.tech/docs/)
- [Redocly Docs](https://redocly.com/docs/)
- [Swagger UI](https://swagger.io/tools/swagger-ui/)

