react

Enforce React rules for TSX files during linting and pre-commit checks.

1.2k|116|Updated Mar 22, 2025
One-click install
npx skills add https://github.com/FranciscoMoretti/sparka --skill react-franciscomoretti
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react
Source: https://github.com/FranciscoMoretti/sparka/tree/main/.skillz/react
Command: npx skills add https://github.com/FranciscoMoretti/sparka --skill react-franciscomoretti

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures consistent, high-quality React code across your project, reducing bugs and improving maintainability. It standardizes component structure, hook usage, form handling, and styling, making collaboration smoother and onboarding faster.

Core Features & Use Cases

  • Standardized Components: Enforces functional components, clear client/server separation, and named exports for enhanced clarity and modularity.
  • Optimized Hooks: Guides correct hook usage, preventing common pitfalls and promoting efficient, predictable state management.
  • Robust Forms: Mandates react-hook-form + Zod for reliable validation and shadcn primitives for consistent UI/UX.
  • Use Case: Automatically review a new React component to ensure it adheres to project standards, uses functional components, and correctly implements form validation with Zod, saving manual review time.

Quick Start

Use the react skill to review the attached 'UserProfileForm.tsx' file for adherence to project React guidelines.

Frequently Asked Questions about react

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce React best practices across my TypeScript components?

React best practices enforcement standardizes component structure, hook usage, and form handling across your project. This Skill applies rule sets to all TSX files during development and CI linting, automatically catching violations like improper hook patterns or non-functional components before code review.

What's the best way to structure React components with TypeScript?

Functional components with named exports, clear client/server separation, and proper TypeScript typing form the foundation. This Skill enforces these conventions by reviewing TSX files against a curated rule set, ensuring modularity, clarity, and consistency across your codebase.

How do I validate forms reliably in React with TypeScript?

Combine react-hook-form with Zod for robust validation and shadcn primitives for UI consistency. This Skill mandates this stack during component review, catching validation gaps and ensuring forms meet project standards automatically.

Can I use this for pre-commit checks and CI linting?

Yes. This Skill integrates with your project tooling to enforce React conventions at build and lint time, supporting both local pre-commit checks and continuous integration pipelines for consistent standards across the development workflow.

Does this work with existing linting tools in my project?

This Skill integrates with project tooling and processes TSX files matching **/*.tsx patterns during CI and linting phases. It sources rules from a centralized rule set, complementing your existing linting infrastructure without requiring standalone setup.

What React patterns does this Skill catch as violations?

Common pitfalls include class components, improper hook usage, missing form validation, inconsistent styling approaches, and unnamed exports. This Skill identifies these patterns in TSX files and surfaces them for correction before merge.