[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75AP75TVWA70TSEDXAACGPP":3,"skill-same:01M75AP75TVWA70TSEDXAACGPP":46},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":16,"publishedAt":17,"linkOnly":18,"markdownContent":19,"markdownBody":20,"frontMatter":21,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M75AP75TVWA70TSEDXAACGPP","react-patterns",null,"0xRayAI\u002Fxray","0xRayAI","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F274879952?v=4","01M75AEEVWK4S4G4N25HAYGB9V","01M75AEEWMHN7H4PQVCJS2938J",2,"MIT","https:\u002F\u002Fgithub.com\u002F0xRayAI\u002Fxray\u002Fblob\u002Fmain\u002Fdocs\u002Farchive\u002Fintegrations-costume\u002Freact-patterns\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: react-patterns\nsource: antigravity-awesome-skills\nattribution: |\n  Originally from https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills\n  License: MIT (see LICENSE.antigravity)\nconverted: 2026-03-23T22:47:59.349Z\n---\n\n---\nname: react-patterns\ndescription: \"Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.\"\nrisk: unknown\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# React Patterns\n\n> Principles for building production-ready React applications.\n\n---\n\n## 1. Component Design Principles\n\n### Component Types\n\n| Type | Use | State |\n|------|-----|-------|\n| **Server** | Data fetching, static | None |\n| **Client** | Interactivity | useState, effects |\n| **Presentational** | UI display | Props only |\n| **Container** | Logic\u002Fstate | Heavy state |\n\n### Design Rules\n\n- One responsibility per component\n- Props down, events up\n- Composition over inheritance\n- Prefer small, focused components\n\n---\n\n## 2. Hook Patterns\n\n### When to Extract Hooks\n\n| Pattern | Extract When |\n|---------|-------------|\n| **useLocalStorage** | Same storage logic needed |\n| **useDebounce** | Multiple debounced values |\n| **useFetch** | Repeated fetch patterns |\n| **useForm** | Complex form state |\n\n### Hook Rules\n\n- Hooks at top level only\n- Same order every render\n- Custom hooks start with \"use\"\n- Clean up effects on unmount\n\n---\n\n## 3. State Management Selection\n\n| Complexity | Solution |\n|------------|----------|\n| Simple | useState, useReducer |\n| Shared local | Context |\n| Server state | React Query, SWR |\n| Complex global | Zustand, Redux Toolkit |\n\n### State Placement\n\n| Scope | Where |\n|-------|-------|\n| Single component | useState |\n| Parent-child | Lift state up |\n| Subtree | Context |\n| App-wide | Global store |\n\n---\n\n## 4. React 19 Patterns\n\n### New Hooks\n\n| Hook | Purpose |\n|------|---------|\n| **useActionState** | Form submission state |\n| **useOptimistic** | Optimistic UI updates |\n| **use** | Read resources in render |\n\n### Compiler Benefits\n\n- Automatic memoization\n- Less manual useMemo\u002FuseCallback\n- Focus on pure components\n\n---\n\n## 5. Composition Patterns\n\n### Compound Components\n\n- Parent provides context\n- Children consume context\n- Flexible slot-based composition\n- Example: Tabs, Accordion, Dropdown\n\n### Render Props vs Hooks\n\n| Use Case | Prefer |\n|----------|--------|\n| Reusable logic | Custom hook |\n| Render flexibility | Render props |\n| Cross-cutting | Higher-order component |\n\n---\n\n## 6. Performance Principles\n\n### When to Optimize\n\n| Signal | Action |\n|--------|--------|\n| Slow renders | Profile first |\n| Large lists | Virtualize |\n| Expensive calc | useMemo |\n| Stable callbacks | useCallback |\n\n### Optimization Order\n\n1. Check if actually slow\n2. Profile with DevTools\n3. Identify bottleneck\n4. Apply targeted fix\n\n---\n\n## 7. Error Handling\n\n### Error Boundary Usage\n\n| Scope | Placement |\n|-------|-----------|\n| App-wide | Root level |\n| Feature | Route\u002Ffeature level |\n| Component | Around risky component |\n\n### Error Recovery\n\n- Show fallback UI\n- Log error\n- Offer retry option\n- Preserve user data\n\n---\n\n## 8. TypeScript Patterns\n\n### Props Typing\n\n| Pattern | Use |\n|---------|-----|\n| Interface | Component props |\n| Type | Unions, complex |\n| Generic | Reusable components |\n\n### Common Types\n\n| Need | Type |\n|------|------|\n| Children | ReactNode |\n| Event handler | MouseEventHandler |\n| Ref | RefObject\u003CElement> |\n\n---\n\n## 9. Testing Principles\n\n| Level | Focus |\n|-------|-------|\n| Unit | Pure functions, hooks |\n| Integration | Component behavior |\n| E2E | User flows |\n\n### Test Priorities\n\n- User-visible behavior\n- Edge cases\n- Error states\n- Accessibility\n\n---\n\n## 10. Anti-Patterns\n\n| ❌ Don't | ✅ Do |\n|----------|-------|\n| Prop drilling deep | Use context |\n| Giant components | Split smaller |\n| useEffect for everything | Server components |\n| Premature optimization | Profile first |\n| Index as key | Stable unique ID |\n\n---\n\n> **Remember:** React is about composition. Build small, combine thoughtfully.\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n","---\nname: react-patterns\ndescription: \"Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.\"\nrisk: unknown\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# React Patterns\n\n> Principles for building production-ready React applications.\n\n---\n\n## 1. Component Design Principles\n\n### Component Types\n\n| Type | Use | State |\n|------|-----|-------|\n| **Server** | Data fetching, static | None |\n| **Client** | Interactivity | useState, effects |\n| **Presentational** | UI display | Props only |\n| **Container** | Logic\u002Fstate | Heavy state |\n\n### Design Rules\n\n- One responsibility per component\n- Props down, events up\n- Composition over inheritance\n- Prefer small, focused components\n\n---\n\n## 2. Hook Patterns\n\n### When to Extract Hooks\n\n| Pattern | Extract When |\n|---------|-------------|\n| **useLocalStorage** | Same storage logic needed |\n| **useDebounce** | Multiple debounced values |\n| **useFetch** | Repeated fetch patterns |\n| **useForm** | Complex form state |\n\n### Hook Rules\n\n- Hooks at top level only\n- Same order every render\n- Custom hooks start with \"use\"\n- Clean up effects on unmount\n\n---\n\n## 3. State Management Selection\n\n| Complexity | Solution |\n|------------|----------|\n| Simple | useState, useReducer |\n| Shared local | Context |\n| Server state | React Query, SWR |\n| Complex global | Zustand, Redux Toolkit |\n\n### State Placement\n\n| Scope | Where |\n|-------|-------|\n| Single component | useState |\n| Parent-child | Lift state up |\n| Subtree | Context |\n| App-wide | Global store |\n\n---\n\n## 4. React 19 Patterns\n\n### New Hooks\n\n| Hook | Purpose |\n|------|---------|\n| **useActionState** | Form submission state |\n| **useOptimistic** | Optimistic UI updates |\n| **use** | Read resources in render |\n\n### Compiler Benefits\n\n- Automatic memoization\n- Less manual useMemo\u002FuseCallback\n- Focus on pure components\n\n---\n\n## 5. Composition Patterns\n\n### Compound Components\n\n- Parent provides context\n- Children consume context\n- Flexible slot-based composition\n- Example: Tabs, Accordion, Dropdown\n\n### Render Props vs Hooks\n\n| Use Case | Prefer |\n|----------|--------|\n| Reusable logic | Custom hook |\n| Render flexibility | Render props |\n| Cross-cutting | Higher-order component |\n\n---\n\n## 6. Performance Principles\n\n### When to Optimize\n\n| Signal | Action |\n|--------|--------|\n| Slow renders | Profile first |\n| Large lists | Virtualize |\n| Expensive calc | useMemo |\n| Stable callbacks | useCallback |\n\n### Optimization Order\n\n1. Check if actually slow\n2. Profile with DevTools\n3. Identify bottleneck\n4. Apply targeted fix\n\n---\n\n## 7. Error Handling\n\n### Error Boundary Usage\n\n| Scope | Placement |\n|-------|-----------|\n| App-wide | Root level |\n| Feature | Route\u002Ffeature level |\n| Component | Around risky component |\n\n### Error Recovery\n\n- Show fallback UI\n- Log error\n- Offer retry option\n- Preserve user data\n\n---\n\n## 8. TypeScript Patterns\n\n### Props Typing\n\n| Pattern | Use |\n|---------|-----|\n| Interface | Component props |\n| Type | Unions, complex |\n| Generic | Reusable components |\n\n### Common Types\n\n| Need | Type |\n|------|------|\n| Children | ReactNode |\n| Event handler | MouseEventHandler |\n| Ref | RefObject\u003CElement> |\n\n---\n\n## 9. Testing Principles\n\n| Level | Focus |\n|-------|-------|\n| Unit | Pure functions, hooks |\n| Integration | Component behavior |\n| E2E | User flows |\n\n### Test Priorities\n\n- User-visible behavior\n- Edge cases\n- Error states\n- Accessibility\n\n---\n\n## 10. Anti-Patterns\n\n| ❌ Don't | ✅ Do |\n|----------|-------|\n| Prop drilling deep | Use context |\n| Giant components | Split smaller |\n| useEffect for everything | Server components |\n| Premature optimization | Profile first |\n| Index as key | Stable unique ID |\n\n---\n\n> **Remember:** React is about composition. Build small, combine thoughtfully.\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n",{"name":5,"source":22,"converted":23,"attribution":24},"antigravity-awesome-skills",1774306079349,"Originally from https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills\nLicense: MIT (see LICENSE.antigravity)\n","main","232f39ec089591afb70f9327b481e7428162a97e","docs\u002Farchive\u002Fintegrations-costume\u002Freact-patterns",3,"https:\u002F\u002Fgithub.com\u002F0xRayAI\u002Fxray","https:\u002F\u002Fgithub.com\u002F0xRayAI","2026-11-13 22:20:55",{"source":7,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add 0xRayAI\u002Fxray --skill react-patterns",{"tool":38,"command":39},"bunx","bunx skills add 0xRayAI\u002Fxray --skill react-patterns",{"tool":41,"command":42},"pnpm","pnpm dlx skills add 0xRayAI\u002Fxray --skill react-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F0xRayAI\u002Fxray\u002Fblob\u002Fmain\u002Fdocs\u002Farchive\u002Fintegrations-costume\u002Freact-patterns\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":17},"01M75AXZY4TX8Z6WF2G4EKYMAA","xray-orchestrator","Main orchestration skill for xray agents.\nProvides commands to coordinate agent work and invoke xray APIs\nthrough the local HTTP API server.","https:\u002F\u002Fgithub.com\u002F0xRayAI\u002Fxray\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Fxray-orchestrator\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":17},"01M75AXT1TB9SX9JVSP16C85BP","ui-ux-design","User interface and user experience design with mobile-first approach, cognitive simplicity, and accessibility-first principles","https:\u002F\u002Fgithub.com\u002F0xRayAI\u002Fxray\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Fui-ux-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":17},"01M75AXQERT17BTCCY7Y1HPXTA","testing-strategy","Design comprehensive testing strategies and optimize test coverage","https:\u002F\u002Fgithub.com\u002F0xRayAI\u002Fxray\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Ftesting-strategy\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":17},"01M75AXM7TRVQXXKT0C287VWN7","testing-best-practices","Testing best practices and quality assurance","https:\u002F\u002Fgithub.com\u002F0xRayAI\u002Fxray\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Ftesting-best-practices\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":17},"01M75AXHAJZK2JBVG638K3RZ5F","tech-writer","Documentation writer for API docs, READMEs, ADRs, changelogs, and developer experience","https:\u002F\u002Fgithub.com\u002F0xRayAI\u002Fxray\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Ftech-writer\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":17},"01M75AXE7P5MX15WA16TGFKJQG","strategist","Strategic guidance and complex problem-solving with architectural decision-making and risk analysis","https:\u002F\u002Fgithub.com\u002F0xRayAI\u002Fxray\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Fstrategist\u002FSKILL.md",[],[]]