一键导入
migrate-api-to-tanstack-query
Migrate the current REST API usage to TanStack Query with server-state caching, invalidation, and progressive rollout.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Migrate the current REST API usage to TanStack Query with server-state caching, invalidation, and progressive rollout.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Introduce React Hook Form + Zod for form state, validation, and typed submission flows.
Add or update URL redirects in the server redirect registry, with status-code rationale and E2E coverage.
Configure the private route as a hidden admin utility. Moves credentials to env vars; operator updates .env using .envTemplate instructions. No credentials passed to the skill.
Replace GitHub Actions CI with GitLab CI/CD while preserving the same lint, typecheck, and Playwright E2E behavior and updating docs for gitlab.com settings.
Migrate the client UI layer from Chakra UI to shadcn/ui and fully remove Chakra dependencies.
Update the combined policy-writing guide page and keep linked routes, metadata, tests, and docs in sync.
| name | migrate-api-to-tanstack-query |
| description | Migrate the current REST API usage to TanStack Query with server-state caching, invalidation, and progressive rollout. |
Use this skill when the task is to introduce TanStack Query for REST data fetching/caching without rewriting the backend.
Move client-side server-state logic from ad hoc calls to TanStack Query while preserving existing API behavior and auth guarantees.
/api/* endpoints first).POST /api/session, DELETE /api/session) rather than redirect-based legacy endpoints.package.json)@tanstack/react-query.@tanstack/react-query-devtools only if requested.src/client/ (for example: src/client/data/query-client.ts).QueryClientProvider in src/client/main.tsx.src/client/utilities/ or src/client/data/ with typed fetch helpers.createSession, deleteSession, getEncryptionKey) instead of endpoint-shaped function names.useQuery / useMutation.docs/API.md when endpoint usage guidance changes.docs/TECHNOLOGY.md if TanStack Query becomes part of the default stack.CHANGELOG.md → Unreleased.npm run lintnpm run type-checkplaywright/e2e/auth/login.spec.ts)fetch for the migrated paths