SkilVaultSign inStart free

Catalogue / code-verified-api-reference-authoring

code-verified-api-reference-authoring

Older skill: source not recordedSignedBuilds API references from actual routes, schemas, authentication, and errors with validated examples and optional machine-readable artifacts. Use for REST, GraphQL, or WebSocket documentation. Not for inventing endpoints or calling live APIs without approval.
---
name: code-verified-api-reference-authoring
description: Builds API references from actual routes, schemas, authentication, and errors with validated examples and optional machine-readable artifacts. Use for REST, GraphQL, or WebSocket documentation. Not for inventing endpoints or calling live APIs without approval.
---

Document the actual API

Collect evidence and choose deliverables

Inspect route registration, handlers, schemas, middleware, authorization, errors, existing specs, and tests. Record implementation/version and review date. Obtain explicit human confirmation before writing files, generating/exporting artifacts, installing tools, starting servers, executing requests, or publishing/uploading docs. Use approved local sandboxes and fictional data; never read/include credentials.

Identify base URL, audience, owner-supplied support contact, supported SDKs, and documentation scope. Separate current behavior from intended features. URL version prefixes are one strategy, not a reason to change the API.

Build consistent operation references

For each REST operation record method/path, purpose, authentication, role/object permission, rate limit, and idempotency. Document path/query/header/body parameters with required status, type, format, bounds, defaults, nullability, and examples. Include success/error status, schema, headers, and implemented validation/auth/conflict/quota/server cases. Do not promise exhaustive unknown errors.

Organize by resource and link related actions. Include introduction, quick start, auth/token lifecycle, data models, common workflows, pagination, filtering/sorting, rate limits/retry headers, errors/troubleshooting, changes/deprecations, and SDK/tools. Mark absent features instead of inventing conventional behavior.

GraphQL documentation derives queries/mutations/subscriptions, variables, inputs, field nullability, nested selections, authentication, partial data/errors, and extension codes from schema/resolvers. WebSocket documentation covers handshake/auth, message/event schemas, subscriptions, acknowledgement, ordering/replay, heartbeat, close/error codes, and reconnection. Do not apply REST status semantics universally.

Create complete new examples

Use meaningful fictional data with no secrets. Explain setup/placeholders and show important failures as well as success. An inventory-device scenario can demonstrate ID, availability, and revision rather than a reused account/password example.

A hypothetical unauthenticated local fixture might use:

curl --fail-with-body 'http://127.0.0.1:8087/v2/equipment/demo-27'

Replace it with the actual approved sandbox route before execution; it is not a real service claim. Auth examples let the owner supply credentials through an approved client mechanism without displaying values or saving them in history.

JavaScript/TypeScript fetch or axios examples need complete imports/setup, HTTP status checks, response parsing, cancellation/timeouts as appropriate, and useful error handling. Python requests examples need imports, explicit timeout, status/error checks, and approved auth integration. Include other languages when useful and verifiable. Avoid printing private full responses.

Generate validated interactive artifacts

OpenAPI must match its declared version and include info, relevant servers, operations, parameters, request/responses, security schemes, and resolved component schemas. Validate with installed compatible tooling; undefined references do not make a working spec. OpenAPI does not fully describe arbitrary GraphQL/WebSocket protocols.

Postman collections need valid metadata, actual request URLs/variables, secret-free auth setup, headers/body, examples, and safe test expectations. Export only after approval. Interactive code/viewers default to an approved sandbox and require confirmation before live calls. Do not publish internal endpoints accidentally.

Verify and maintain

Parse JSON/YAML examples, syntax/type-check language examples when tools exist, and run only separately approved sandbox requests. Compare examples to actual schemas/statuses. Check negative input, auth/permission, pagination, rate limits, and protocol failures where scoped. Generated comments may be stale: keep documentation verification in API-change review and CI only after approval.

Record version history, breaking behavior, deprecations, and compatibility from evidence. Missing constraints/error details are gaps to investigate, not fill with guesses. Deliver page/artifact inventory, endpoint/model coverage, tested examples, unresolved discrepancies, evidence version/date, and remaining publishing approvals.

Never

  • Invent endpoints, roles, token lifetimes, password policy, quotas, or SDK endorsement.
  • Execute requests, start servers, write/export/publish artifacts, or contact services without explicit human confirmation.
  • Include secrets, private responses, invalid JSON comments, broken schemas, or undefined code variables.
  • Claim examples work or docs are current without reporting actual verification.