0xGF

API Generate — Testing skill for Claude Code

Testing community

Generate OpenAPI spec and type-safe API client.

How to install API Generate

Installs to ~/.claude/commands/0xgf-solana-fullstack-webapp-skills-api-generate.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/0xGF/solana-fullstack-webapp-skills/HEAD/.claude/commands/api-generate.md -o ~/.claude/commands/0xgf-solana-fullstack-webapp-skills-api-generate.md

Restart Claude Code, or start a new session, for it to be picked up.

What API Generate does


description: Generate OpenAPI spec and type-safe API client allowed-tools: Bash(npm:*), Bash(pnpm:*), Bash(npx:*)

API Generate Command

This command regenerates the type-safe API client from the backend OpenAPI spec.

Steps

  1. First, generate the OpenAPI spec from the backend (if applicable):
# Adjust the command based on your project structure
pnpm run generate:openapi
# or
npm run generate:openapi
  1. Then, generate the API client (React Query hooks) from the spec:

Alternatives in Testing

  • Testing Strategy — This project is small, runs in a terminal, and is mostly deterministic 10.9k ★
  • Regen API — Regenerate the OpenAPI spec and web API client after server API changes 2.5k ★
  • Inkline — by inkline - Structures development workflow using pnpm with emphasis on TypeScript and Vue 3 Composition API 1.4k ★

Full documentation available on GitHub

View Source Repository