Index of every page on this site: llms.txt
All skills
grahamcrackers avatar

/bulletproof-react-patterns

@ca83de4
Run it yourself

Bulletproof React architecture patterns for scalable, maintainable applications. Covers feature-based project structure, component patterns, state management boundaries, API layer design, error handling, security, and testing strategies. Use when structuring a React project, designing application architecture, organizing features, or when the user asks about React project structure or scalable patterns.

Use this Skill: https://skilld.dev/gh/grahamcrackers/skills/bulletproof-react-patterns

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesproject-standards.md

≈675 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Project Standards

ESLint

Configure rules in .eslintrc.js (or flat config) to identify and prevent common errors. Enforces consistency throughout the codebase and catches mistakes early.

Prettier

Enable "format on save" in your IDE. Code is automatically formatted according to .prettierrc. If auto-formatting fails, it signals a potential syntax error. Integrate with ESLint for combined formatting and linting.

TypeScript

Use TypeScript for catching issues during large refactoring that ESLint may miss. When refactoring, update type declarations first, then resolve TypeScript errors throughout the project. TypeScript checks types at build time — it does not prevent runtime failures.

Resource: React TypeScript Cheatsheet

Husky + lint-staged

Run code validations before each commit to maintain high standards:

npm install -D husky lint-staged
npx husky init
// package.json
{
    "lint-staged": {
        "*.{ts,tsx}": ["eslint --fix", "prettier --write"],
        "*.{json,md,yml}": ["prettier --write"],
    },
}

Absolute Imports

Always configure absolute imports to avoid messy relative paths like ../../../component:

// tsconfig.json
{
    "compilerOptions": {
        "baseUrl": ".",
        "paths": {
            "@/*": ["./src/*"],
        },
    },
}

Use @/* as the single alias — it's short, unambiguous, and clearly distinguishes source imports from node_modules.

// Instead of this:
import { Button } from "../../../components/ui/button";

// Use this:
import { Button } from "@/components/ui/button";

File Naming Conventions

Enforce kebab-case for files and folders using ESLint:

"check-file/filename-naming-convention": [
  "error",
  { "**/*.{ts,tsx}": "KEBAB_CASE" },
  { ignoreMiddleExtensions: true }, // supports names like babel.config.js
],
"check-file/folder-naming-convention": [
  "error",
  { "src/**/!(__tests__)": "KEBAB_CASE" },
],

Naming Conventions

Item Convention Example
Components PascalCase UserCard.tsx
Hooks camelCase, use prefix useUsers.ts
Utilities camelCase formatDate.ts
Types PascalCase User, CreateUserInput
Constants UPPER_SNAKE_CASE MAX_RETRIES
Directories kebab-case user-settings/
Files kebab-case user-card.tsx

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill is an architectural guide for React development, providing best practices for project structure, state management, and testing. It contains exclusively educational content and code examples with no executable or malicious scripts.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer9mo

    1/11 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at ca83de4. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 9 months ago

README badge

README badge for grahamcrackers/skills/bulletproof-react-patterns