static-export
Use when the user works on demo personas, localStorage persistence, or GitHub Pages static-export behaviour.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when the user works on demo personas, localStorage persistence, or GitHub Pages static-export behaviour.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | static-export |
| description | Use when the user works on demo personas, localStorage persistence, or GitHub Pages static-export behaviour. |
Sources: ui/src/lib/use-demo-persona.ts, ui/src/lib/auth.ts (DEMO_PERSONAS),
.claude/rules/code-style.md (static export guards), CLAUDE.md gotcha #3.
IS_STATIC = process.env.NEXT_PUBLIC_STATIC_EXPORT === "true" as a module-top
constant; in static mode fetchApi() serves /mock/*.json for GET and a
synthetic { ok: true } for mutations.useDemoPersona() unconditionally (hooks rule).ui/src/components/Navigation.tsx nav groups.patient_profile_patient1.json for ?patientId=P1).ui/__tests__/e2e/journeys/19-static-github-pages.spec.ts
via the setPersona(page, username) localStorage helper — never mock
next-auth/react in E2E (.claude/rules/testing.md).Page works in BOTH modes: live (API route) and static (mock fixture). If it only works in one, the task is not done.
Use when the user adds or modifies a Next.js API route under ui/src/app/api/.
Use when the user works on EHDS articles, DSP protocol, DCP credentials, ODRL policies, or the audit trail.
Use when the user works on the force-directed graph explorer, layer colours, persona views, or node filtering.
Use when the user works on authentication, Keycloak configuration, OIDC, roles, or JWT claims.
Use when the user adds nodes, relationships, constraints, or indexes to the Neo4j knowledge graph, or edits any *.cypher file.
Use when the user adds E2E tests, Playwright specs, or journey coverage.