graphql · davila7 — Claude Code skill: what it does, how to install
Guides Claude Code in designing GraphQL schemas, batching database queries with DataLoader, and preventing nested query DoS attacks.
npx claude-code-templates@latest --skill development/graphqlWhat graphql does
This skill equips Claude Code with architecture rules for GraphQL APIs and frontend data fetching. It covers schema design, federation setups, and subscriptions. For client integrations, it handles urql and Apollo Client workflows alongside automated type generation via graphql-codegen.
A central focus is query protection and database efficiency. The instructions mandate DataLoader to batch operations instead of executing individual database calls per resolver. To stop denial-of-service traffic, it introduces query cost analysis and nesting depth limits. Relying solely on schema directives for authorization leaves the API exposed.
The guidance also covers deliberate nullability design so that an error in a nested field avoids wiping out parent records. It pairs directly with backend, postgres-wizard, nextjs-app-router, and react-patterns.
What it helps with
- eliminate N+1 database bottlenecks using DataLoader batching
- restrict query depth and computational complexity
- implement field-level permissions inside resolvers
- configure normalized caching in Apollo Client using type policies
- disable schema introspection on production deployments
Example prompts for the agent
- Design a GraphQL schema for user profiles and add a DataLoader to batch post lookups.
- Set up query complexity analysis and depth limiting on this Apollo Server instance.
- Configure type policies for Apollo Client caching and generate types with graphql-codegen.
How to install graphql
1claude-code-templates
npx claude-code-templates@latest --skill development/graphql2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill graphql -a claude-code3Manually: put the files in place
~/.claude/skills/graphql/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/graphql/
Manually: put the files in place
.agents/skills/graphql/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/graphql/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates graphql2Manually: put the files in place
.github/skills/graphql/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/graphqlManually: put the files in place
.devin/skills/graphql/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about graphql
How to install graphql in Claude Code?
Run npx claude-code-templates@latest --skill development/graphql. You can also execute npx skills add davila7/claude-code-templates --skill graphql -a claude-code or save the file to ~/.claude/skills/graphql/SKILL.md.
What does the graphql skill do?
It gives the coding assistant guidelines for building GraphQL APIs, federation architectures, DataLoader caching, and frontend client setups.
How does it handle server security?
It enforces resolver authorization checks, turns off production introspection, and rejects queries that exceed depth or cost limits.
Similar skills
All skills for Backend and APIs →graphql by other authors comes first.