GraphQL Schema Builder skill for Claude and Codex
A complete GraphQL schema package for your data model: type definitions plus whichever pieces you tick (input types, enums, Relay connections, directives…
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 data model needs turning into a runnable GraphQL schema with the extras ticked: input and enum types, Relay connections, directives, subscriptions, and resolver stubs with mock data. Do not use for making design decisions about a domain you have not modelled yet, or reviewing an existing schema. Related topics: coding, api, graphql.
What it will ask you for
- Project domain (free text, e.g. "E-commerce or Blog platform or Social network")
- Main entity types (longer free text)
- Authentication model (choose one: JWT, API Key, Session-based, None)
- Server library (choose one: Apollo Server, GraphQL Yoga, graphql-js, Mercurius, Other)
- Components (choose any: Type definitions, Input types, Enum types, Query resolvers, Mutation resolvers, Subscription resolvers, Pagination types (Connection/Edge pattern))
- Relay-style pagination (choose one: Yes, No)
- Add schema directives (choose one: Yes, No)
- Include mock resolver examples (choose one: Yes, No)
- Strict nullability (choose one: All required by default, Allow nulls, Mixed (explained in comments))
How it works
- Emit the ticked components in dependency order: scalars and enums, object types, inputs, connections, then the Query, Mutation, and Subscription roots.
- Apply the chosen nullability policy to every field, commenting the reason on each nullable field when the policy is Mixed.
- Add Relay connection types with first and after arguments and pageInfo to every list field when Relay pagination is on.
- Declare and apply directives in the SDL when enabled, placing auth directives on the operations the authentication model protects.
- Write resolver stubs for the chosen server library with typed mock data when requested, and the entry file that starts the server.
What you get
A fenced graphql block with the SDL, then a fenced code block per resolver file and the server entry file, each preceded by its path, and a one-line start command.
What it watches out for
- Generating subscriptions without a pub/sub source, so the stubs compile but never emit an event.
- Returning mock data whose shape drifts from the type definitions, which fails the first real query with a null on a non-null field.
- Applying Relay connections to short fixed lists like a set of statuses, which adds cursor plumbing for nothing.
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.