[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6H6CFFYJM56FCVMMEYFCV65":3,"skill-same:01M6H6CFFYJM56FCVMMEYFCV65":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":6,"updatedAt":50,"install":51,"resources":64},"01M6H6CFFYJM56FCVMMEYFCV65","m02-resource",null,"CRITICAL: Use for smart pointers and resource management. Triggers: Box, Rc, Arc, Weak, RefCell, Cell, smart pointer, heap allocation, reference counting, RAII, Drop, should I use Box or Rc, when to use Arc vs Rc, 智能指针, 引用计数, 堆分配","0xharryriddle\u002Fcodex-field-kit","0xharryriddle","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F100945007?v=4","01M6H686JV0QKZYP2RWG6B2B8T","harryriddle","01M6H686PVZ8JGKWEG7B3GM5PD",3,"MIT","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Farchive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm02-resource\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"m02 resource","false","when to use","use arc","for","allocation","resource management","heap","arc","raii","counting","box","critical","triggers","cell","drop","reference","use","management","2026-11-10 10:12:30",false,"---\nname: m02-resource\ndescription: \"CRITICAL: Use for smart pointers and resource management. Triggers: Box, Rc, Arc, Weak, RefCell, Cell, smart pointer, heap allocation, reference counting, RAII, Drop, should I use Box or Rc, when to use Arc vs Rc, 智能指针, 引用计数, 堆分配\"\nuser-invocable: false\n---\n\n# Resource Management\n\n> **Layer 1: Language Mechanics**\n\n## Core Question\n\n**What ownership pattern does this resource need?**\n\nBefore choosing a smart pointer, understand:\n- Is ownership single or shared?\n- Is access single-threaded or multi-threaded?\n- Are there potential cycles?\n\n---\n\n## Error → Design Question\n\n| Error | Don't Just Say | Ask Instead |\n|-------|----------------|-------------|\n| \"Need heap allocation\" | \"Use Box\" | Why can't this be on stack? |\n| Rc memory leak | \"Use Weak\" | Is the cycle necessary in design? |\n| RefCell panic | \"Use try_borrow\" | Is runtime check the right approach? |\n| Arc overhead complaint | \"Accept it\" | Is multi-thread access actually needed? |\n\n---\n\n## Thinking Prompt\n\nBefore choosing a smart pointer:\n\n1. **What's the ownership model?**\n   - Single owner → Box or owned value\n   - Shared ownership → Rc\u002FArc\n   - Weak reference → Weak\n\n2. **What's the thread context?**\n   - Single-thread → Rc, Cell, RefCell\n   - Multi-thread → Arc, Mutex, RwLock\n\n3. **Are there cycles?**\n   - Yes → One direction must be Weak\n   - No → Regular Rc\u002FArc is fine\n\n---\n\n## Trace Up ↑\n\nWhen pointer choice is unclear, trace to design:\n\n```\n\"Should I use Arc or Rc?\"\n    ↑ Ask: Is this data shared across threads?\n    ↑ Check: m07-concurrency (thread model)\n    ↑ Check: domain-* (performance constraints)\n```\n\n| Situation | Trace To | Question |\n|-----------|----------|----------|\n| Rc vs Arc confusion | m07-concurrency | What's the concurrency model? |\n| RefCell panics | m03-mutability | Is interior mutability right here? |\n| Memory leaks | m12-lifecycle | Where should cleanup happen? |\n\n---\n\n## Trace Down ↓\n\nFrom design to implementation:\n\n```\n\"Need single-owner heap data\"\n    ↓ Use: Box\u003CT>\n\n\"Need shared immutable data (single-thread)\"\n    ↓ Use: Rc\u003CT>\n\n\"Need shared immutable data (multi-thread)\"\n    ↓ Use: Arc\u003CT>\n\n\"Need to break reference cycle\"\n    ↓ Use: Weak\u003CT>\n\n\"Need shared mutable data\"\n    ↓ Single-thread: Rc\u003CRefCell\u003CT>>\n    ↓ Multi-thread: Arc\u003CMutex\u003CT>> or Arc\u003CRwLock\u003CT>>\n```\n\n---\n\n## Quick Reference\n\n| Type | Ownership | Thread-Safe | Use When |\n|------|-----------|-------------|----------|\n| `Box\u003CT>` | Single | Yes | Heap allocation, recursive types |\n| `Rc\u003CT>` | Shared | No | Single-thread shared ownership |\n| `Arc\u003CT>` | Shared | Yes | Multi-thread shared ownership |\n| `Weak\u003CT>` | Weak ref | Same as Rc\u002FArc | Break reference cycles |\n| `Cell\u003CT>` | Single | No | Interior mutability (Copy types) |\n| `RefCell\u003CT>` | Single | No | Interior mutability (runtime check) |\n\n## Decision Flowchart\n\n```\nNeed heap allocation?\n├─ Yes → Single owner?\n│        ├─ Yes → Box\u003CT>\n│        └─ No → Multi-thread?\n│                ├─ Yes → Arc\u003CT>\n│                └─ No → Rc\u003CT>\n└─ No → Stack allocation (default)\n\nHave reference cycles?\n├─ Yes → Use Weak for one direction\n└─ No → Regular Rc\u002FArc\n\nNeed interior mutability?\n├─ Yes → Thread-safe needed?\n│        ├─ Yes → Mutex\u003CT> or RwLock\u003CT>\n│        └─ No → T: Copy? → Cell\u003CT> : RefCell\u003CT>\n└─ No → Use &mut T\n```\n\n---\n\n## Common Errors\n\n| Problem | Cause | Fix |\n|---------|-------|-----|\n| Rc cycle leak | Mutual strong refs | Use Weak for one direction |\n| RefCell panic | Borrow conflict at runtime | Use try_borrow or restructure |\n| Arc overhead | Atomic ops in hot path | Consider Rc if single-threaded |\n| Box unnecessary | Data fits on stack | Remove Box |\n\n---\n\n## Anti-Patterns\n\n| Anti-Pattern | Why Bad | Better |\n|--------------|---------|--------|\n| Arc everywhere | Unnecessary atomic overhead | Use Rc for single-thread |\n| RefCell everywhere | Runtime panics | Design clear ownership |\n| Box for small types | Unnecessary allocation | Stack allocation |\n| Ignore Weak for cycles | Memory leaks | Design parent-child with Weak |\n\n---\n\n## Related Skills\n\n| When | See |\n|------|-----|\n| Ownership errors | m01-ownership |\n| Interior mutability details | m03-mutability |\n| Multi-thread context | m07-concurrency |\n| Resource lifecycle | m12-lifecycle |\n","# Resource Management\n\n> **Layer 1: Language Mechanics**\n\n## Core Question\n\n**What ownership pattern does this resource need?**\n\nBefore choosing a smart pointer, understand:\n- Is ownership single or shared?\n- Is access single-threaded or multi-threaded?\n- Are there potential cycles?\n\n---\n\n## Error → Design Question\n\n| Error | Don't Just Say | Ask Instead |\n|-------|----------------|-------------|\n| \"Need heap allocation\" | \"Use Box\" | Why can't this be on stack? |\n| Rc memory leak | \"Use Weak\" | Is the cycle necessary in design? |\n| RefCell panic | \"Use try_borrow\" | Is runtime check the right approach? |\n| Arc overhead complaint | \"Accept it\" | Is multi-thread access actually needed? |\n\n---\n\n## Thinking Prompt\n\nBefore choosing a smart pointer:\n\n1. **What's the ownership model?**\n   - Single owner → Box or owned value\n   - Shared ownership → Rc\u002FArc\n   - Weak reference → Weak\n\n2. **What's the thread context?**\n   - Single-thread → Rc, Cell, RefCell\n   - Multi-thread → Arc, Mutex, RwLock\n\n3. **Are there cycles?**\n   - Yes → One direction must be Weak\n   - No → Regular Rc\u002FArc is fine\n\n---\n\n## Trace Up ↑\n\nWhen pointer choice is unclear, trace to design:\n\n```\n\"Should I use Arc or Rc?\"\n    ↑ Ask: Is this data shared across threads?\n    ↑ Check: m07-concurrency (thread model)\n    ↑ Check: domain-* (performance constraints)\n```\n\n| Situation | Trace To | Question |\n|-----------|----------|----------|\n| Rc vs Arc confusion | m07-concurrency | What's the concurrency model? |\n| RefCell panics | m03-mutability | Is interior mutability right here? |\n| Memory leaks | m12-lifecycle | Where should cleanup happen? |\n\n---\n\n## Trace Down ↓\n\nFrom design to implementation:\n\n```\n\"Need single-owner heap data\"\n    ↓ Use: Box\u003CT>\n\n\"Need shared immutable data (single-thread)\"\n    ↓ Use: Rc\u003CT>\n\n\"Need shared immutable data (multi-thread)\"\n    ↓ Use: Arc\u003CT>\n\n\"Need to break reference cycle\"\n    ↓ Use: Weak\u003CT>\n\n\"Need shared mutable data\"\n    ↓ Single-thread: Rc\u003CRefCell\u003CT>>\n    ↓ Multi-thread: Arc\u003CMutex\u003CT>> or Arc\u003CRwLock\u003CT>>\n```\n\n---\n\n## Quick Reference\n\n| Type | Ownership | Thread-Safe | Use When |\n|------|-----------|-------------|----------|\n| `Box\u003CT>` | Single | Yes | Heap allocation, recursive types |\n| `Rc\u003CT>` | Shared | No | Single-thread shared ownership |\n| `Arc\u003CT>` | Shared | Yes | Multi-thread shared ownership |\n| `Weak\u003CT>` | Weak ref | Same as Rc\u002FArc | Break reference cycles |\n| `Cell\u003CT>` | Single | No | Interior mutability (Copy types) |\n| `RefCell\u003CT>` | Single | No | Interior mutability (runtime check) |\n\n## Decision Flowchart\n\n```\nNeed heap allocation?\n├─ Yes → Single owner?\n│        ├─ Yes → Box\u003CT>\n│        └─ No → Multi-thread?\n│                ├─ Yes → Arc\u003CT>\n│                └─ No → Rc\u003CT>\n└─ No → Stack allocation (default)\n\nHave reference cycles?\n├─ Yes → Use Weak for one direction\n└─ No → Regular Rc\u002FArc\n\nNeed interior mutability?\n├─ Yes → Thread-safe needed?\n│        ├─ Yes → Mutex\u003CT> or RwLock\u003CT>\n│        └─ No → T: Copy? → Cell\u003CT> : RefCell\u003CT>\n└─ No → Use &mut T\n```\n\n---\n\n## Common Errors\n\n| Problem | Cause | Fix |\n|---------|-------|-----|\n| Rc cycle leak | Mutual strong refs | Use Weak for one direction |\n| RefCell panic | Borrow conflict at runtime | Use try_borrow or restructure |\n| Arc overhead | Atomic ops in hot path | Consider Rc if single-threaded |\n| Box unnecessary | Data fits on stack | Remove Box |\n\n---\n\n## Anti-Patterns\n\n| Anti-Pattern | Why Bad | Better |\n|--------------|---------|--------|\n| Arc everywhere | Unnecessary atomic overhead | Use Rc for single-thread |\n| RefCell everywhere | Runtime panics | Design clear ownership |\n| Box for small types | Unnecessary allocation | Stack allocation |\n| Ignore Weak for cycles | Memory leaks | Design parent-child with Weak |\n\n---\n\n## Related Skills\n\n| When | See |\n|------|-----|\n| Ownership errors | m01-ownership |\n| Interior mutability details | m03-mutability |\n| Multi-thread context | m07-concurrency |\n| Resource lifecycle | m12-lifecycle |\n",{"name":5,"description":7,"user-invocable":39},"main","6c13f6f4ac5a3bc1e6b78cd2bb1704f122c4a73e","archive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm02-resource",0,"https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit","https:\u002F\u002Fgithub.com\u002F0xharryriddle","https:\u002F\u002Fharryriddle.vercel.app","2026-04-11 11:49:51",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add 0xharryriddle\u002Fcodex-field-kit --skill m02-resource",{"tool":57,"command":58},"bunx","bunx skills add 0xharryriddle\u002Fcodex-field-kit --skill m02-resource",{"tool":60,"command":61},"pnpm","pnpm dlx skills add 0xharryriddle\u002Fcodex-field-kit --skill m02-resource","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Farchive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm02-resource\u002FSKILL.md",true,[],[66,97,115,125,151,177],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":77,"publishedAt":38},"01M6H7ZKE6MR33HC84QZ1TA6MV","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[72],{"categoryNo":73,"categoryName":74,"taxonomyType":75,"taxonomyTypeDesc":76},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",[78,79,80,81,82,83,84,32,85,86,87,88,89,90,91,92,93,94,95,96],"react best practices","react","vercel react best practices","best practices","vercel","tasks","data fetching","pages","next","performance optimization","refactoring","Next.js","Optimization","code","guidelines","react components","components","performance","writing",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":38},"01M6H7ZGC2WK8SEKYHWDNTMDA9","swarm-planner","[EXPLICIT INVOCATION ONLY] Creates dependency-aware implementation plans optimized for parallel multi-agent execution.","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Fswarm-planner\u002FSKILL.md",[],[104,105,106,107,108,109,110,111,112,23,113,114],"swarm","swarm planner","planner","parallel","multi-agent","only","execution","plans","dependency","multi","implementation",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":38},"01M6H7ZD93853RZCYQWH1D38TM","super-swarm-spark","Only to be triggered by explicit super-swarm-spark commands.","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Fsuper-swarm-spark\u002FSKILL.md",[],[122,104,123,109,124],"super swarm spark","spark","commands",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":38},"01M6H7Z987QBY49JCCPT953EAZ","role-creator","Create and install Codex custom agent roles in ~\u002F.codex\u002Fconfig.toml, generate role config files, enforce supported keys, and guide users through required role inputs (model, reasoning effort, developer_instructions).","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Frole-creator\u002FSKILL.md",[],[132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150],"role","creator","role creator","keys","users","roles","toml","enforce","install","guide","instructions","model","developer","reasoning","generate","create","config","codex","files",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":160,"publishedAt":38},"01M6H7Z5TRPMDQ7YSZQXPN1G60","read-github","Read and search GitHub repository documentation via gitmcp.io MCP service.\n\n**WHEN TO USE:**\n- User provides a GitHub URL\n- User mentions a specific repo in owner\u002Frepo format\n- User asks \"what does this repo do?\", \"read the docs for X repo\", or similar\n- User wants to search code or docs within a repo","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Fread-github\u002FSKILL.md",[157],{"categoryNo":158,"categoryName":159,"taxonomyType":75,"taxonomyTypeDesc":76},"01JBSEEDCAT000000000000023","Skill与智能体开发",[161,162,163,91,164,165,166,167,23,21,168,169,170,171,172,36,173,174,175,176],"github","read github","read","documentation","docs","MCP","search","URL","via","io","service","do","user","repo","format","repository",{"skillNo":178,"name":106,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":38},"01M6H7Z215CTKYJ4Y1X6EQWN6M","Create comprehensive, phased implementation plans with sprints and atomic tasks. Use when user says: \"make a plan\", \"create a plan\", \"plan this out\", \"plan the implementation\", \"help me plan\", \"design a plan\", \"draft a plan\", \"write a plan\", \"outline the steps\", \"break this down into tasks\", \"what's the plan for\", or any similar planning request. Also triggers on explicit \"\u002Fplanner\" or \"\u002Fplan\" commands.","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Fplanner\u002FSKILL.md",[],[106,183,23,184,185,186,32,111,124,187,188,36,189,190,191,192,193,147,83,194],"outline","atomic","with","sprints","draft","me","write","phased implementation","plan","help","planning","design"]