本文へ移動
cccskills
無料GitHub で公開

fec-react-project-standard

Use when designing or reviewing React + TypeScript project structure, feature/module boundaries, component architecture, hooks organization, routing composition, state/API/error/styling defaults, or repository-wide React conventions. Prefer narrower skills for forms, data fetching, tests, accessibility, virtualization, animation, or security deep dives; Chinese triggers include React project specification, React component architecture.

インストール方法を見る

含まれるファイル(5)

  • SKILL.md6.7 KB
  • references/react-performance-patterns.md1.9 KB
  • references/react-project-structure.md7.8 KB
  • references/react-quality-patterns.md6.0 KB
  • references/react-runtime-patterns.md10.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

React project specifications

Suitable for medium and large module construction, page reconstruction and engineering structure design in React + TypeScript warehouse.

Purpose

Provide engineering structure, module boundaries and default implementation conventions for React + TypeScript projects to ensure clear architecture and maintainable code.

Procedure

This skill mainly solves the problem of "how to design and implement" React engineering tasks, without repeating the basic coding bottom line. When handling React engineering tasks, perform them in the following order:

  1. Identify the warehouse and have an agreement

    • Directory organization
    • Style system
    • Status management solution
    • Request packaging method
    • Testing framework
    • UI component library/design system
  2. Determine which layer the target belongs to

    • Routing page -Page private components
    • feature business module
    • Global common components
    • hooks / services / stores / utils
  3. Design the boundaries before writing the code

    • What logic belongs to page layout
    • Which logic belongs to feature
    • Which logic should be transferred to general capabilities?
    • Which state should be managed locally and which should be handed over to store/query/URL
    • When the status ownership is complex, use the status management process to make a status list first
    • When the boundaries of DTO, public props, generic components or tsconfig are complex, first use the TypeScript project specification process to converge cross-framework type contracts
  4. Complete key quality items when outputting

    • loading / error / empty / data status
    • Error handling and retrying
    • Type constraints
    • Key test entrance
    • Diversion of necessary special skills
    • Check whether the dependency already exists in package.json. If it is missing, give the installation command first and then use it.
    • Whether heavy UI capabilities (animation, charts, 3D, editors, maps) are isolated as leaf components and loaded on demand
    • Whether images, videos, fonts and other resources are localized and cacheable, and avoid placeholder URLs from entering delivery
    • Whether page-level Error Boundary, module-level fallback, API error mapping and user-recoverable actions are consistent
    • Whether Tailwind token/variant or responsive layout requirements should be diverted to the corresponding special skill
  • Perform lightweight screening for obvious architectural performance risks, such as heavy dependency boundaries, too wide Context, high-frequency derived values and lazy loading fallback; enter the performance optimization workflow when indicator evidence is needed

Detailed reference

Load more detailed reference files as needed:

Constraints

  • Comply with the existing global rules and React rules of the warehouse by default
  • If the warehouse already has a clear directory structure, style system, status management or request encapsulation, the warehouse convention will be used first.
  • The size of the component file should be approximately 300 lines; if it exceeds 500 lines or is too complex, it must be split into sub-components, Hooks, utils, and types.
  • It is forbidden to add new class components (Error Boundary uses libraries such as react-error-boundary)
  • Disable bypassing module exports and importing from feature deep paths
  • Do not use useEffect + setState to simulate derived values that can be calculated directly
  • Avoid prop drilling too deep without considering composition or partial encapsulation
  • Do not synchronously introduce GSAP, Three.js, Lottie, rich text editor or map SDK into common page components; use dynamic import, route-level subcontracting or leaf component isolation when necessary.
  • No bare fetch, API URL, token refresh or upload processes scattered around React components; cross-border requests should be converged to the API integration layer.
  • Do not use Error Boundary to handle normal API failures; request errors should first fall into the loading/error/empty/data state and recoverable operations.
  • Do not write React performance recommendations as global memo without evidence; first locate request waterfall, bundle boundaries, repeated rendering or effect misuse.

Expected Output

  • Component boundaries are clear, pages/features/components are clearly layered
  • The Props type is complete and clear; the narrowing of complex public types or external data has been diverted to the TypeScript project specification process
  • Reusable logic has been extracted into hooks, and the loading/error/empty/data status is complete
  • The API layer has type constraints and unified error handling, and status management conforms to the proximity principle
  • URL status, server status, form status and global client status have clear boundaries
  • Key behaviors are covered by tests, and key modules have been wrapped with react-error-boundary
  • The long list has been evaluated for virtualization, and pop-up/composite components have keyboard and focus support
  • Respect the current situation of the warehouse first, and then recommend the structure
  • Give necessary suggestions for file division
  • Explain why this is layered if necessary
  • For new modules, give priority to outputting the smallest floor-mountable structure rather than over-designing it all at once
  • For reconstruction tasks, give priority to ensuring portability and risk controllability
  • For performance-related React changes, describe the triggered risk categories, evidence sources, and verification commands

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

用于审查或改进前端无障碍、语义结构、键盘支持、焦点管理、ARIA 标签、屏幕阅读器行为、WCAG 2.2 问题、触控无障碍或辅助技术回归;中文触发词包括 无障碍、accessibility、a11y、WCAG、屏幕阅读器。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when reviewing or improving frontend accessibility, semantic structure, keyboard support, focus management, ARIA labels, screen reader behavior, WCAG 2.2 issues, touch accessibility, or assistive-technology regressions; Chinese triggers include accessibility, accessibility, a11y, WCAG, screen reader.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

用于从参考系统中吸收想法、能力、工作流、架构、质量体系、生态扩展或工程实践,并通过原创的项目内重设计转化为当前项目能力,而不是复制原实现。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when absorbing ideas, capabilities, workflows, architecture, quality systems, ecosystem extensions, or engineering practices from any reference system into the current project through original, project-native redesign rather than copying.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when designing, implementing, or reviewing frontend-to-backend API integration, typed API clients, REST/tRPC/OpenAPI client choices, auth refresh, API error mapping, upload flows, SSE/WebSocket/polling choices, CORS-facing frontend behavior, or cross-boundary loading/error states. Do not use for backend-only service architecture or TanStack Query cache policy alone; Chinese triggers include API integration, front-end and back-end joint debugging, typed API client, Interface error handling, SSE, WebSocket.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

用于设计、实现或审查前后端 API 集成、类型化 API client、REST/tRPC/OpenAPI 客户端选型、认证刷新、API 错误映射、上传流程、SSE/WebSocket/轮询选择、CORS 相关前端行为或跨边界 loading/error 状态。不要用于纯后端服务架构或仅 TanStack Query 缓存策略;中文触发词包括 API 集成、前后端联调、typed API client、接口错误处理、SSE、WebSocket。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

bovinphang のスキルをすべて見る

このスキルの問題を報告する