How this skill is triggered — by the user, by Claude, or both
Slash command
/soda-gql-skills:gql-codegenThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill generates the GraphQL system files from your schema using the `soda-gql codegen schema` command.
This skill generates the GraphQL system files from your schema using the soda-gql codegen schema command.
First, detect the soda-gql project configuration to understand the schema setup:
!bun ${CLAUDE_PLUGIN_ROOT}/scripts/detect-project.ts
The output will include:
found: Whether a soda-gql project was detectedconfigPath: Path to the config fileschemas: Schema names and their file pathsoutdir: Output directory for generated fileshasLsp: Whether LSP is availableIf found: false, inform the user:
No soda-gql project detected in the current directory. Make sure you have a
soda-gql.config.{ts,js,mjs}file and have runbun installto install dependencies.
Exit the skill.
Execute the schema codegen command:
bun run soda-gql codegen schema
Expected output:
If codegen fails, analyze the error and provide guidance:
Schema Parse Error:
Error: GraphQL syntax error in schema file
→ Check the schema file for GraphQL syntax errors. Use the Read tool to examine the schema file path from the project detection output.
Config Validation Error:
Error: Invalid config: ...
→ Check the config file structure. Common issues:
Type System Error:
Error: Unknown type referenced: ...
→ The schema references a type that doesn't exist. Check schema file for missing type definitions.
After successful schema codegen, run typegen to validate any existing templates:
bun run soda-gql typegen
This step validates that existing GraphQL tagged templates are compatible with the generated schema system.
Expected output:
Verify the generated types are correct:
bun typecheck
Expected output:
Provide a summary to the user:
On Success:
✅ GraphQL schema codegen completed successfully!
Generated files:
- Schema system:
<outdir>(from project detection)Next steps:
- Your schema types are now available for use in fragments and operations
- Use
gql:scaffoldto generate new queries or mutations- Use
gql:doctorto run comprehensive diagnostics
On Failure:
❌ Codegen failed with errors.
Error details: [Show error message and analysis]
Suggested fixes: [Provide specific fix suggestions based on error type]
If you can identify a fixable issue (e.g., schema syntax error), offer to fix it:
Use AskUserQuestion to ask:
Error: Schema file not found: ./schema.graphql
Analysis:
Fix suggestion:
**/*.graphqlSyntax Error: Unexpected Name "fieldd"
Analysis:
Fix suggestion:
After codegen, typegen shows template errors:
Error: Field 'oldField' does not exist on type 'Query'
Analysis:
Fix suggestion:
If the project has multiple schemas (detected via schemas object), inform the user:
This project has multiple schemas:
default: ./schema.graphqladmin: ./admin-schema.graphqlRunning
bun run soda-gql codegen schemawill generate types for all schemas.
Inform the user about watch mode for development:
Tip: For continuous development, you can run codegen in watch mode:
bun run soda-gql codegen schema --watchThis will automatically regenerate types when schema files change.
(Note: Check if watch mode is actually supported by running bun run soda-gql codegen schema --help first)
Before completing this skill, ensure:
bun run soda-gql codegen schema executednpx claudepluginhub whatasoda/soda-gql-skills --plugin soda-gql-skillsGuides GraphQL schema design with best practices for types, nullability, pagination, errors, and security. Use when designing or reviewing schemas.
Builds production-ready GraphQL servers with schema design, DataLoader resolvers, WebSocket subscriptions, and field-level authorization for Node.js and Python.
Designs GraphQL schemas with type system, SDL patterns, field design, pagination, directives, and versioning for scalable APIs.