agentleFS
superXdevsuperXdev/skills/skills/bulletproof-react/SKILL.md

bulletproof-react

Skill1 starsChanged 58 days agoMITView on GitHub

Plan, build, refactor, or review a production React or Next.js application using scalable feature boundaries, explicit state ownership, typed API layers, testing, security, error handling, and performance practices. Use when users ask for React architecture, feature-based organization, API and state boundaries, production-readiness, or a Bulletproof React-style review. Do not use for a small isolated component change unless architecture, data flow, or quality practices are in scope.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. yamcodes/arkenv★ 151same name
    2. Mlu-ctrl-alt-design/claude-skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. About 0 are common, 20 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈20

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read architecture for project boundaries, component design, state, and API-layer decisions.

    line 14
  2. Distinctive:

    Read quality when implementing or reviewing tests, security, error handling, performance, standards, or delivery.

    line 15
  3. Distinctive:

    Treat repository instructions and existing conventions as higher priority than this skill.

    line 16
  4. Distinctive:

    Keep dependencies directional: shared code can serve features, and features can serve the application layer.

    line 20
  5. Distinctive:

    Keep state local by default.

    line 24
  6. Distinctive:

    Test user-visible behavior and feature workflows.

    line 26
  7. Distinctive:

    Treat client-side authorization as UX only.

    line 27
  8. Distinctive:

    Add error handling at the API boundary and at meaningful UI boundaries.

    line 28
  9. Distinctive:

    Do not create empty folders merely to copy a template.

    line 53
  10. Distinctive:

    Add an endpoint fetcher that uses the configured API client.

    line 58
  11. Distinctive:

    Add the project's server-state hook around that fetcher, with a stable cache key and clear invalidation behavior for mutations.

    line 59
  12. Distinctive:

    Keep simple interaction state local.

    line 61
  13. Distinctive:

    Add behavior-focused integration coverage.

    line 63
  14. Distinctive:

    Run the project's relevant type check, lint, unit or integration tests, build, and E2E tests when the change affects a critical journey and …

    line 67
  15. Distinctive:

    If a check cannot run, report it accurately with the reason and the remaining risk.

    line 69
  16. Distinctive:

    Use this checklist for a focused audit.

    line 73
  17. Distinctive:

    Do not replace the project's router, package manager, styling system, state library, API client, or test stack merely to match the example …

    line 88
  18. Distinctive:

    Do not add libraries, change authentication storage, alter authorization, delete files, or run deployment commands without explicit …

    line 89
  19. Distinctive:

    Do not expose secrets, trust client-side role checks for security, or render untrusted HTML without appropriate sanitization.

    line 90
  20. Distinctive:

    Do not copy source code from Bulletproof React.

    line 91

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

Bulletproof React

Source: alan2207/bulletproof-react (MIT licensed).

Apply durable React engineering principles from Bulletproof React without treating its sample stack or directory tree as mandatory. Adapt to the project's existing router, styling, data-fetching, and test tooling unless the user asks for a migration.

Read first

  • Read architecture for project boundaries, component design, state, and API-layer decisions.
  • Read quality when implementing or reviewing tests, security, error handling, performance, standards, or delivery.
  • Treat repository instructions and existing conventions as higher priority than this skill.

Core rules

  1. Keep dependencies directional: shared code can serve features, and features can serve the application layer. Do not import implementation details directly from one feature into another.
  2. Organize by feature when code represents a product capability. Keep code close to the feature or component that owns it.
  3. Define types and validation at boundaries before relying on external data. Keep API client configuration, endpoint fetchers, and cache hooks separate.
  4. Classify state before choosing a solution: component state, cross-component application state, server cache state, form state, or URL state.
  5. Keep state local by default. Lift it only for shared ownership; use a global store only when state is genuinely cross-cutting. Do not use global client state as a server-data cache.
  6. Build small components with one clear responsibility. Prefer composition over prop drilling and oversized prop APIs. Abstract shared components only after repeated, stable use cases appear.
  7. Test user-visible behavior and feature workflows. Mock at the network boundary with the project's supported mock server rather than mocking internal implementation details or hardcoding API data.
  8. Treat client-side authorization as UX only. Authorization decisions and sensitive validation must be enforced by the server.
  9. Add error handling at the API boundary and at meaningful UI boundaries. Provide useful fallback and recovery behavior, including the product-approved response to expired authentication.
  10. Measure before optimizing. Prefer route-level splitting, state colocation, appropriate styling choices, and targeted prefetching over speculative memoization or excessive code splitting.
  11. Enforce conventions with tooling: formatter, linter, TypeScript, dependency-boundary rules, and focused Git hooks where the project supports them.

Workflow

1. Establish the scope

Identify the request as one or more of: a new feature, architecture/refactor, API work, state work, UI component work, quality review, or production readiness.

Inspect the project's current structure, TypeScript settings, aliases, linting, data layer, tests, and local instructions. Reuse established conventions when they are sound. Ask before a broad migration or a new dependency that changes the project architecture.

2. Choose boundaries

For a feature, create only the folders it needs under the project's feature location. A typical shape is:

features/<feature>/
  api/          # endpoint declarations, fetchers, query or mutation hooks
  components/   # feature-private UI
  hooks/        # feature-private behavior
  types/        # feature-specific domain types and schemas
  utils/        # feature-specific pure helpers

Do not create empty folders merely to copy a template. Promote code to a shared layer only after it is genuinely reusable across features.

3. Implement from boundaries inward

  1. Define request and response types, plus runtime validation where external input is untrusted.
  2. Add an endpoint fetcher that uses the configured API client. Do not duplicate client setup across endpoints.
  3. Add the project's server-state hook around that fetcher, with a stable cache key and clear invalidation behavior for mutations.
  4. Build feature UI around the hook's loading, success, empty, error, and mutation-feedback states.
  5. Keep simple interaction state local. Use reducers for related transitions and a global store only for cross-cutting client state. Put shareable navigation state in the URL.
  6. Wire a real route, parent, or public feature API. Do not expose another feature's private files as a shortcut.
  7. Add behavior-focused integration coverage. Use realistic network handlers for success and failure; add E2E coverage if this changes a critical user journey.

4. Verify the change

Run the project's relevant type check, lint, unit or integration tests, build, and E2E tests when the change affects a critical journey and the suite is available. Exercise error and empty paths, not just the happy path.

If a check cannot run, report it accurately with the reason and the remaining risk. Never claim a quality, security, or performance result that was not verified.

Review checklist

Use this checklist for a focused audit. Report findings with file paths, impact, and the smallest credible fix.

  • Does code flow from shared layers through features into the application layer, without cross-feature implementation imports?
  • Is the feature self-contained and are files colocated with their consumers?
  • Are API request and response boundaries typed, validated where needed, and separated into client, fetcher, and server-state hook?
  • Does each state live at the smallest appropriate scope, with server data kept out of ad hoc global state?
  • Are components cohesive, composed rather than over-configured, and accessible within the project's UI system? Were shared abstractions created only for repeated, stable use cases?
  • Are loading, empty, error, and mutation-feedback states represented where data is displayed or changed?
  • Are tests behavior-oriented, with critical user journeys covered at an appropriate integration or E2E level?
  • Are authentication storage, output rendering, and authorization decisions handled safely?
  • Are expensive changes supported by evidence, and are obvious bundle, render, image, styling-runtime, and data-fetching regressions avoided?
  • Are direct imports used where the build tool can be harmed by broad barrel exports, and can linting enforce the intended feature and dependency boundaries?

Boundaries

  • Do not replace the project's router, package manager, styling system, state library, API client, or test stack merely to match the example repository.
  • Do not add libraries, change authentication storage, alter authorization, delete files, or run deployment commands without explicit approval.
  • Do not expose secrets, trust client-side role checks for security, or render untrusted HTML without appropriate sanitization.
  • Do not copy source code from Bulletproof React. This skill captures high-level engineering guidance derived from its documentation. See ATTRIBUTION.md.

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.