Agent Skills
› authgear/authgear-server
› generate-schemas-and-gentype
generate-schemas-and-gentype
GitHub指导在更新 authgear-server GraphQL schema 或前端类型时,通过 make export-schemas 和 npm run gentype 命令重新生成文件,禁止手动编辑。
Trigger Scenarios
修改了 GraphQL schema 文件
需要更新生成的前端 TypeScript 类型
Install
npx skills add authgear/authgear-server --skill generate-schemas-and-gentype -g -y
SKILL.md
Frontmatter
{
"name": "generate-schemas-and-gentype",
"description": "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."
}
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
Version History
- 2dd6d88 Current 2026-07-24 16:30


