Agent Skills
› authgear/authgear-server
› add-portal-admin-api-query
add-portal-admin-api-query
GitHub指导在 Portal Admin 中添加 GraphQL 查询的技能。包括读取现有 schema、创建查询文件、处理分页字段、遵循命名规范及运行代码生成脚本,确保新增查询符合项目规范。
Trigger Scenarios
需要添加新的 Portal Admin GraphQL 查询
修改或扩展前端管理界面的数据获取逻辑
Install
npx skills add authgear/authgear-server --skill add-portal-admin-api-query -g -y
SKILL.md
Frontmatter
{
"name": "add-portal-admin-api-query",
"description": "Add a Portal Admin GraphQL query under portal\/src\/graphql\/adminapi\/query.",
"argument-hint": "<query name>"
}
Follow this skill when adding a Portal Admin GraphQL query.
Workflow
- Read
./portal/src/graphql/adminapi/schema.graphqlfirst. - Create the
.graphqlfile under./portal/src/graphql/adminapi/query. - Include
cursor,pageInfo, andtotalCountwhen the query supports pagination and the user did not ask to omit them. - Query the fields of the entity itself, but avoid nested entities unless the user asked for them.
- Run
cd ./portal && npm run gentypeafter adding the file.
Notes
- Keep the operation name consistent with existing Portal GraphQL naming.
- Do not invent schema fields; use only what exists in the schema file.
Version History
- 2dd6d88 Current 2026-07-24 16:30


