graphql-schema · chriswiles — Claude Code skill: features and install
The graphql-schema skill sets conventions for GraphQL queries, mutations, and type generation. It fits projects that use Apollo Client.
no license ★ 6,091 updated 2026-01-06
npx skills add ChrisWiles/claude-code-showcase --skill graphql-schema -a claude-codeWhat graphql-schema does
The skill keeps GraphQL operations in separate .gql files and routes type generation through npm run gql:typegen or npm run sync-types. Application code should use the generated hooks rather than hand-written Apollo hooks. Generated output is treated as read-only.
Mutation guidance covers error callbacks, success feedback, loading indicators, and disabling the trigger while a request is active. It also lays out fragments, cache policies, conditional queries, polling, and optimistic updates. The examples connect these rules to React-style UI states.
If npm run gql:typegen is skipped after a .gql change, the generated hooks will remain out of date.
What it helps with
- move GraphQL operations into
.gqlfiles - generate typed hooks from the schema
- handle mutation failures in the UI
- show loading and success states for submissions
- choose cache and optimistic-update behavior
Example prompts for the agent
- Create a GraphQL item-list query in a separate
.gqlfile and wire it through the generated hook. - Add a create-record mutation with failure handling, success feedback, and a loading state.
- Tell me which code generation command to run after changing a
.gqlfile, then update the generated types.
How to install graphql-schema
1Skills CLI (Vercel)
npx skills add ChrisWiles/claude-code-showcase --skill graphql-schema -a claude-code2Manually: put the files in place
~/.claude/skills/graphql-schema/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/graphql-schema/
1Skills CLI (Vercel)
npx skills add ChrisWiles/claude-code-showcase --skill graphql-schema -a codex2Manually: put the files in place
.agents/skills/graphql-schema/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ChrisWiles/claude-code-showcase --skill graphql-schema -a cursor2Manually: put the files in place
.cursor/skills/graphql-schema/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ChrisWiles/claude-code-showcase .claude/skills/graphql-schema2Manually: put the files in place
.github/skills/graphql-schema/SKILL.md1Skills CLI (Vercel)
npx skills add ChrisWiles/claude-code-showcase --skill graphql-schema -a gemini-cli2Platform CLI
gemini skills install https://github.com/ChrisWiles/claude-code-showcase --path .claude/skills/graphql-schemaManually: put the files in place
.devin/skills/graphql-schema/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-schema
How do I install graphql-schema in Claude Code?
Run npx skills add ChrisWiles/claude-code-showcase --skill graphql-schema -a claude-code, then use the skill file at ~/.claude/skills/graphql-schema/SKILL.md.
What does graphql-schema do?
It sets conventions for GraphQL operations: separate .gql files, generated types, and generated Apollo hooks. It also covers mutation errors, UI states, fragments, caching, and optimistic updates.
Which command should I run after editing a .gql file?
Run npm run gql:typegen to refresh types and hooks. If the schema must be downloaded first, use npm run sync-types.
Similar skills
All skills for Frontend and UI →graphql-schema by other authors comes first.