OpenParable
Skip to content
← Back to skills

Generate Schemas And Gentype

Development
generate-schemas-and-gentype

Generate Schemas And Gentype is an Agent Skill for development published in the authgear/authgear-server repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Use when updating GraphQL schema or generated frontend types in authgear-server. Always regenerate checked-in schema/type artifacts with make export-schemas and portal npm run gentype instead of editing generated files by hand.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/authgear/authgear-server/blob/HEAD/.claude/skills/generate-schemas-and-gentype/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/generate-schemas-and-gentype, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Generate Schemas and Types

Use this skill when a change touches GraphQL schema files or generated frontend types.

Workflow

  1. Make the source change in Go or GraphQL documents first.
  2. Regenerate backend schema artifacts with make export-schemas.
  3. Only after the schema files have been updated, regenerate portal GraphQL types with cd portal && npm run gentype.
  4. Verify the affected packages with the narrowest relevant tests or typecheck.

Rules

  • Do not hand-edit generated schema or type files when a generator exists.
  • Keep the generated outputs in the same commit as the source change.
  • Always run make export-schemas before npm run gentype for schema-related changes.
  • If the generator rewrites more files than expected, inspect the diff before proceeding.

Typical outputs

  • portal/src/graphql/adminapi/schema.graphql
  • portal/src/graphql/adminapi/globalTypes.generated.ts
  • portal/src/graphql/adminapi/query/*.generated.ts