agentleFS
Taimoorkhan1122Taimoorkhan1122/boring-react/skills/react-production-engineering/SKILL.md

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.

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
  1. Very specific:

    Implement React-correct behavior: Keep render pure; use effects only for synchronization with external systems.

    line 20
  2. Distinctive:

    Verify: Run applicable typecheck, lint, tests, build, accessibility, responsive, and critical E2E checks.

    line 23
  3. Distinctive:

    Never mutate props, React state, context values, query data, or external mutable state during render.

    line 27
  4. Very specific:

    Do not use useEffect for values that can be derived during render or logic that belongs in the event that caused it.

    line 28
  5. Very specific:

    Do not mirror server/query data into Zustand/Redux/local state without a specific ownership reason.

    line 29
  6. Very specific:

    Do not cargo-cult React.memo, useMemo, or useCallback.

    line 30
  7. Very specific:

    Use TypeScript strictness as a design constraint.

    line 31
  8. Very specific:

    Keep Next.js client boundaries narrow.

    line 32
  9. Distinctive:

    Never put secrets or authorization logic solely in client code.

    line 33
  10. Very specific:

    Do not weaken tests/lint/types to get a patch green.

    line 34
  11. Distinctive:

    Read only the reference needed for the task:

    line 51
  12. Distinctive:

    Do not claim completion unless applicable checks were executed or explicitly marked not run.

    line 68

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. 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.
  2. 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.
  3. Choose the narrowest architecture. Reuse existing healthy abstractions. Do not add dependencies or global state without a concrete need.
  4. Implement React-correct behavior. Keep render pure; use effects only for synchronization with external systems; represent async/error/empty/permission states explicitly.
  5. Check boundaries. Validate untrusted runtime data, keep secrets/server authority out of the browser, and keep server/client boundaries intentional.
  6. Measure meaningful performance work. Fix request waterfalls and shipped JavaScript before manual rerender micro-optimizations.
  7. 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 useEffect for 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, or useCallback. 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:

  1. derived during render;
  2. local component state;
  3. URL state for shareable/navigation state;
  4. form state;
  5. server state/framework cache/query cache;
  6. shared client state;
  7. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.