Use cases

Engineering

Write and review technical docs

Generate API references, architecture docs, runbooks, and onboarding guides from your codebase. Grok reads the source, understands the patterns, and produces docs that stay accurate and useful.

Powered by Build and Chat

Point Grok at your code

Share the module, service, or API you need documented. Grok reads the source files, infers the architecture, identifies public interfaces, and understands the relationships between components — so the docs reflect what the code actually does, not what you hope it does.

Example prompt

Write API reference documentation for our payments service. Cover all public endpoints in /src/api/payments/, include request/response schemas from the TypeScript types, and document the error codes from /src/errors.ts.

Auto-generates endpoint docs with method, path, params, and response shapes
Includes real request/response examples derived from types
Documents error codes with descriptions and troubleshooting steps

Generate runbooks and guides

Beyond API references, Grok can produce operational runbooks, architecture decision records, and onboarding guides. It understands the deployment pipeline, infrastructure dependencies, and failure modes from the code and config files in your repo.

Example prompt

Write an on-call runbook for the payments service. Include common alert scenarios, how to check service health, how to manually retry failed transactions, and the escalation path. Pull the alert definitions from our Terraform configs.

Review and maintain existing docs

Paste existing documentation and ask Grok to review it against the current codebase. It identifies stale sections, missing endpoints, incorrect parameter descriptions, and gaps — then proposes specific updates.

Example prompt

Here's our current payments API doc (last updated 6 months ago). Compare it against the current codebase and give me a list of everything that's outdated, missing, or incorrect. Then generate the updated version.

Diff-style report of what changed since the doc was written
Flagged sections that no longer match the code
Updated doc with changes highlighted

Try it yourself

Get started with Grok and explore this workflow firsthand.