react-production-engineering
Skill1 starsChanged 3 months agoMITView on GitHub
Govern production-grade React and TypeScript engineering. Use when building, reviewing, refactoring, debugging, or planning React, Next.js, or Vite frontend code; deciding architecture, state/data ownership, effects, TypeScript boundaries, dependencies, performance, security-minded frontend behavior, or definition of done.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- react-component-engineeringSkill
- react-motion-engineeringSkill
- react-quality-engineeringSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Implement React-correct behavior: Keep render pure; use effects only for synchronization with external systems.
- Distinctive: line 23
Verify: Run applicable typecheck, lint, tests, build, accessibility, responsive, and critical E2E checks.
- Distinctive: line 27
Never mutate props, React state, context values, query data, or external mutable state during render.
- Very specific: line 28
Do not use useEffect for values that can be derived during render or logic that belongs in the event that caused it.
- Very specific: line 29
Do not mirror server/query data into Zustand/Redux/local state without a specific ownership reason.
- Very specific: line 30
Do not cargo-cult React.memo, useMemo, or useCallback.
- Very specific: line 31
Use TypeScript strictness as a design constraint.
- Very specific: line 32
Keep Next.js client boundaries narrow.
- Distinctive: line 33
Never put secrets or authorization logic solely in client code.
- Very specific: line 34
Do not weaken tests/lint/types to get a patch green.
- Distinctive: line 51
Read only the reference needed for the task:
- Distinctive: line 68
Do not claim completion unless applicable checks were executed or explicitly marked not run.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Production Engineering
Act as the governing senior frontend engineer. Optimize for long-term correctness, accessibility, performance, maintainability, and a small coherent diff—not novelty or cleverness.
Workflow
- Inspect before prescribing. Determine framework/router, React/TypeScript versions, package manager, design system, state/data libraries, test stack, and repository conventions. Run
scripts/detect-project.mjs <repo>when available. - Locate ownership. Decide whether each value belongs to render derivation, local state, URL state, form state, server state, shared client state, or an explicit state machine.
- Choose the narrowest architecture. Reuse existing healthy abstractions. Do not add dependencies or global state without a concrete need.
- Implement React-correct behavior. Keep render pure; use effects only for synchronization with external systems; represent async/error/empty/permission states explicitly.
- Check boundaries. Validate untrusted runtime data, keep secrets/server authority out of the browser, and keep server/client boundaries intentional.
- Measure meaningful performance work. Fix request waterfalls and shipped JavaScript before manual rerender micro-optimizations.
- Verify. Run applicable typecheck, lint, tests, build, accessibility, responsive, and critical E2E checks. State what was not run.
Non-negotiable rules
- Never mutate props, React state, context values, query data, or external mutable state during render.
- Do not use
useEffectfor values that can be derived during render or logic that belongs in the event that caused it. - Do not mirror server/query data into Zustand/Redux/local state without a specific ownership reason.
- Do not cargo-cult
React.memo,useMemo, oruseCallback. Profile first; write code compatible with modern React compiler optimizations. - Use TypeScript strictness as a design constraint. Avoid unexplained
any, unsafe assertions, and states that could be modeled as impossible. - Keep Next.js client boundaries narrow; do not force server-capable work into the browser.
- Never put secrets or authorization logic solely in client code.
- Do not weaken tests/lint/types to get a patch green.
- Preserve repository conventions unless they are the problem being fixed.
State ownership order
Choose the lowest-scope owner that satisfies the requirement:
- derived during render;
- local component state;
- URL state for shareable/navigation state;
- form state;
- server state/framework cache/query cache;
- shared client state;
- explicit reducer/state machine/event store for genuinely complex workflows.
When to load references
Read only the reference needed for the task:
- React rules/effects/memoization: references/react-rules.md
- TypeScript/API boundaries: references/typescript.md
- State ownership: references/state-management.md
- Async/server data: references/data-fetching.md
- Next.js: references/nextjs.md
- Vite/SPAs/libraries: references/vite.md
- Architecture/components: references/architecture.md
- Performance: references/performance.md
- Frontend security: references/security.md
- Completion/review severity: references/definition-of-done.md
For UI semantics/responsiveness, activate react-component-engineering. For testing strategy/E2E, activate react-quality-engineering. For non-trivial animation, activate react-motion-engineering.
Completion contract
Do not claim completion unless applicable checks were executed or explicitly marked not run. Prefer a scoped correct implementation with known verification gaps over an overconfident claim.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

