Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.
.claude/skills/kunanonj-react-patterns/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-15 | ✓→✗ | ▼ Worse | 55% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 20% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 61% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 47% | 0% |
> Principles for building production-ready React applications.
| Type | Use | State | |------|-----|-------| | Server | Data fetching, static | None | | Client | Interactivity | useState, effects | | Presentational | UI display | Props only | | Container | Logic/state | Heavy state |
| Pattern | Extract When | |---------|-------------| | useLocalStorage | Same storage logic needed | | useDebounce | Multiple debounced values | | useFetch | Repeated fetch patterns | | useForm | Complex form state |
| Complexity | Solution | |------------|----------| | Simple | useState, useReducer | | Shared local | Context | | Server state | React Query, SWR | | Complex global | Zustand, Redux Toolkit |
| Scope | Where | |-------|-------| | Single component | useState | | Parent-child | Lift state up | | Subtree | Context | | App-wide | Global store |
| Hook | Purpose | |------|---------| | useActionState | Form submission state | | useOptimistic | Optimistic UI updates | | use | Read resources in render |
| Use Case | Prefer | |----------|--------| | Reusable logic | Custom hook | | Render flexibility | Render props | | Cross-cutting | Higher-order component |
| Signal | Action | |--------|--------| | Slow renders | Profile first | | Large lists | Virtualize | | Expensive calc | useMemo | | Stable callbacks | useCallback |
| Scope | Placement | |-------|-----------| | App-wide | Root level | | Feature | Route/feature level | | Component | Around risky component |
| Pattern | Use | |---------|-----| | Interface | Component props | | Type | Unions, complex | | Generic | Reusable components |
| Need | Type | |------|------| | Children | ReactNode | | Event handler | MouseEventHandler | | Ref | RefObject<Element> |
| Level | Focus | |-------|-------| | Unit | Pure functions, hooks | | Integration | Component behavior | | E2E | User flows |
| ❌ Don't | ✅ Do | |----------|-------| | Prop drilling deep | Use context | | Giant components | Split smaller | | useEffect for everything | Server components | | Premature optimization | Profile first | | Index as key | Stable unique ID |
<img width="1150" height="1438" alt="image" src="https://github.com/user-attachments/assets/10369698-472c-4695-a494-2c0672103aa1" />
Use this image as a reference for a better file structure of the project
> Remember: React is about composition. Build small, combine thoughtfully.
This skill is applicable to execute the workflow or actions described in the overview.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 11,103 | 7,938 | -29% | 1 | 1 | 0% | 2,044 | 2,448 | +20% | 0 | 0 | — |
case-02 | pass→pass | 6,059 | 4,056 | -33% | 1 | 1 | 0% | 1,217 | 1,955 | +61% | 0 | 0 | — |
case-03 | pass→pass | 6,297 | 3,476 | -45% | 1 | 1 | 0% | 1,201 | 1,767 | +47% | 0 | 0 | — |
case-04 | pass→pass | 10,951 | 5,833 | -47% | 1 | 1 | 0% | 1,873 | 2,232 | +19% | 0 | 0 | — |
case-05 | pass→pass | 10,668 | 10,478 | -2% | 1 | 1 | 0% | 1,792 | 2,750 | +53% | 0 | 0 | — |
case-06 | pass→pass | 12,977 | 6,800 | -48% | 1 | 1 | 0% | 2,027 | 2,312 | +14% | 0 | 0 | — |
case-11 | pass→pass | 15,637 | 11,595 | -26% | 1 | 1 | 0% | 2,760 | 3,253 | +18% | 0 | 0 | — |
case-07 | pass→pass | 7,899 | 2,805 | -64% | 1 | 1 | 0% | 1,260 | 1,611 | +28% | 0 | 0 | — |
case-08 | fail→pass | 13,499 | 11,554 | -14% | 1 | 1 | 0% | 2,479 | 3,394 | +37% | 0 | 0 | — |
case-09 | pass→pass | 11,082 | 3,237 | -71% | 1 | 1 | 0% | 1,989 | 1,730 | -13% | 0 | 0 | — |
case-10 | pass→pass | 11,413 | 6,689 | -41% | 1 | 1 | 0% | 2,063 | 2,493 | +21% | 0 | 0 | — |
case-12 | pass→pass | 3,720 | 3,213 | -14% | 1 | 1 | 0% | 667 | 1,674 | +151% | 0 | 0 | — |
case-13 | pass→pass | 8,576 | 7,355 | -14% | 1 | 1 | 0% | 1,621 | 2,446 | +51% | 0 | 0 | — |
case-14 | pass→pass | 8,863 | 6,867 | -23% | 1 | 1 | 0% | 1,699 | 2,353 | +38% | 0 | 0 | — |
case-15 | pass→fail | 7,607 | 6,360 | -16% | 1 | 1 | 0% | 1,541 | 2,384 | +55% | 0 | 0 | — |
case-16 | pass→pass | 9,786 | 6,220 | -36% | 1 | 1 | 0% | 1,676 | 2,121 | +27% | 0 | 0 | — |
case-17 | pass→pass | 7,910 | 7,806 | -1% | 1 | 1 | 0% | 1,372 | 2,472 | +80% | 0 | 0 | — |
case-18 | pass→pass | 9,651 | 6,762 | -30% | 1 | 1 | 0% | 1,725 | 2,413 | +40% | 0 | 0 | — |
case-19 | pass→pass | 10,533 | 8,535 | -19% | 1 | 1 | 0% | 1,925 | 2,588 | +34% | 0 | 0 | — |
case-20 | pass→pass | 11,513 | 7,804 | -32% | 1 | 1 | 0% | 2,001 | 2,551 | +27% | 0 | 0 | — |
case-21 | pass→pass | 7,280 | 6,617 | -9% | 1 | 1 | 0% | 1,488 | 2,399 | +61% | 0 | 0 | — |
case-22 | pass→pass | 10,091 | 8,071 | -20% | 1 | 1 | 0% | 2,116 | 2,758 | +30% | 0 | 0 | — |
case-23 | pass→pass | 12,236 | 7,920 | -35% | 1 | 1 | 0% | 2,369 | 2,652 | +12% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of 0 percentage points is the difference between those two pass rates over the 23 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.