Generate Schemas And Gentype
Developmentgenerate-schemas-and-gentypeGenerate 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.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- 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
- Make the source change in Go or GraphQL documents first.
- Regenerate backend schema artifacts with
make export-schemas. - Only after the schema files have been updated, regenerate portal GraphQL types with
cd portal && npm run gentype. - 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-schemasbeforenpm run gentypefor schema-related changes. - If the generator rewrites more files than expected, inspect the diff before proceeding.
Typical outputs
portal/src/graphql/adminapi/schema.graphqlportal/src/graphql/adminapi/globalTypes.generated.tsportal/src/graphql/adminapi/query/*.generated.ts