skills/react-architect-skills/SKILL.md
React and TanStack Router folder structure and feature-module architecture. Use when writing, reviewing, or refactoring React code for structure, naming, colocation, encapsulation, and layer separation. Triggers on React folder structure, naming rules, module boundaries, or architecture decisions.
npx skillsauth add tianyili/skills react-architect-skillsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guidelines for React feature-module layout, layer separation (Data / Domain / Integration / Presentational), naming, and cross-module boundaries.
Use this skill when:
When to load the full guide: For tasks that involve module boundaries, layer layout, naming conventions, or cross-module communication, read AGENTS.md in full before proceeding.
Do NOT load AGENTS.md for single-file renames, style-only changes, or when only fixing a typo or a single component’s logic.
| Layer | Folders | Purpose |
|-------|---------|---------|
| Data | api/, stores/ | API hooks, cache keys, stores for cross-component state |
| Domain | hooks/, utils/, types/, contexts/ | Business logic, pure utils, types, DI |
| Integration | containers/, pages/ | Data + UI wiring, route entry, layout |
| Presentational | components/ | Pure UI, props-down/events-up, no optional/redundant props |
-page, -container, -context, .types, .schema, use-* for hooks.user-profile, order-processing); flat structure; direct imports from source files (no barrel index.ts); enforce boundaries via ESLint rules.Full guide (principles, module structure, layer rules, naming, common module, cross-module communication, testing): AGENTS.md.
development
Use and structure Zustand stores for React and vanilla JS state management. Use when the user mentions Zustand, needs a store pattern, global state, persist state, or migrating from Redux/Context.
tools
Use when displaying token balances or token values in UI, converting user input to bigint for contract writes, or doing math with wei/token amounts in viem or wagmi apps. Web3 number formatting with formatUnits, parseUnits, BigNumber, bigint naming (`Raw`, `Formatted`, `Bn`), decimals handling, and reusable display helpers. Triggers on token balance, formatUnits, parseUnits, wei, decimals, bigint, BigNumber, number formatting, or web3 display math.
development
React performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React code to ensure optimal performance patterns. Triggers on tasks involving React components, data fetching, bundle optimization, or performance improvements.
development
Use when designing or refactoring functions with many optional params, configurable components, or when the user mentions optional params, function signatures, or API simplification. Reduces optional parameters in functions and components for cleaner APIs.