AgentSkillsCN

frontend-react

为本项目构建 React 18+ 与 TypeScript UI——包括组件、Material-UI、Zustand、React Query,以及 REST API 集成。当您需要创建或修改页面、组件、表单,或进行前端测试时,此技能都能派上大用场。

SKILL.md
--- frontmatter
name: frontend-react
description: Builds React 18+ and TypeScript UI for this project—components, Material-UI, Zustand, React Query, and REST API integration. Use when creating or changing pages, components, forms, or frontend tests.
version: 1.0

Frontend React Skill

When to use

  • Creating or changing pages, components, or forms (React, TypeScript, MUI)
  • Integrating with the REST API (see project context for API base URL), auth, or state (Zustand, React Query)
  • Writing or adjusting frontend tests (Vitest, React Testing Library)
  • Verifying build (npm run build) or fixing TypeScript/unused-import issues

For testing focus (TDD, mocks, coverage), use the testing skill and .cursor/rules/frontend-testing-practices.mdc.

References

FilePurpose
.cursor/rules/frontend-patterns.mdcTypeScript (no any, braces, unused imports), state (Zustand, React Query, local), API and auth, MUI, forms (RHF+Zod), routing, loading/error, performance, pre-commit checklist, file layout
docs/frontend/Architecture, API integration, UI/UX