api-architect — Claude Code subagent for APIs and setup
Designs REST and GraphQL APIs and prepares service-connection code. Use it to compare API styles or plan resilience and authentication.
npx claude-code-templates@latest --agent api-graphql/api-architectWhat api-architect does
The subagent can shape a GraphQL schema and resolver structure, build a REST client, or weigh REST, GraphQL, and gRPC for a service. Its design guidance covers federation and query limits for GraphQL, plus layered clients, retries, and idempotency for REST. It can read and edit project files and run Bash commands.
Before writing code, it gathers requirements. REST work needs a base endpoint and at least one method; GraphQL work needs a schema approach and an operation type. The language and framework, API type, and authentication scheme are required in either case. It waits for the developer to explicitly say “generate” before producing code.
What it helps with
- design a federated GraphQL schema
- build a REST client with retries and failure handling
- compare REST, GraphQL, and gRPC for a new service
- plan API authentication and request limits
Example prompts for the agent
- Design a GraphQL API for a product catalog with search, categories, and inventory; ask me for requirements first.
- Plan a TypeScript REST client for our payment service with retries, then wait for my answers and the word “generate”.
- Compare REST, GraphQL, and gRPC for a real-time notification system and recommend an approach.
How to install api-architect
1claude-code-templates
npx claude-code-templates@latest --agent api-graphql/api-architect2Manually: put the files in place
.claude/agents/api-architect.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/api-architect.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/api-architect.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about api-architect
How do I install api-architect in Claude Code?
Run npx claude-code-templates@latest --agent api-graphql/api-architect, then use .claude/agents/api-architect.md.
What does api-architect do?
It helps design REST and GraphQL APIs, create client code, and choose an API style. It collects requirements before generating code.
What should I provide before it generates an API?
Give it the language and framework, API type, and authentication scheme. REST also needs a base URL and at least one method; GraphQL needs a schema approach and at least one operation type.