GraphQL Schema Architect skill for Claude and Codex
A production-shaped GraphQL schema designed from your domain: entity types with deliberate nullability, relationships modelled as fields, paginated lists…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a new GraphQL API needs its schema designed from a domain description and entity relationships, with pagination, mutation payloads, and auth decisions made up front. Do not use for auditing or refactoring a schema that already exists, or generating resolver code. Related topics: coding, graphql.
What it will ask you for
- Domain description (longer free text)
- Primary entities (choose any: User, Product, Order, Category, Review, Payment, Subscription, Notification)
- Other entities (free text, e.g. "Any entity not listed above")
- Relationships (longer free text)
- Authentication method (choose one: JWT, API Key, Session Cookie, None)
- Include pagination (choose one: Yes, No)
- Maximum depth for nested queries (number from 1 to 10)
How it works
- Translate each entity into an object type with an ID and the fields the domain implies, choosing non-null only where the server can always supply the value.
- Model every relationship as fields on the relevant types, using connection types for lists that can grow when pagination is on.
- Design root Query fields around how clients fetch and root Mutation fields around user intents, each mutation with one input type and a payload type carrying user errors.
- Add enums for closed sets, interfaces for shared behaviour, and custom scalars with their format described.
- Mark operations requiring authentication, state where the depth limit applies, and put a description on every type and field.
What you get
One fenced graphql block containing the complete SDL with descriptions on every type and field, followed by a short list of the design decisions and the trade-off each one makes.
What it watches out for
- Mirroring database tables one to one, so the schema exposes join tables and foreign keys instead of the domain clients think in.
- Returning a bare object from mutations, which leaves no place for validation errors other than the top-level errors array.
- Making every field non-null for convenience, so one failed sub-resolver nulls out the whole response.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.