[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6H6CCBHBNHHZNBCXRZEKAC7":3,"skill-same:01M6H6CCBHBNHHZNBCXRZEKAC7":76},{"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":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":6,"updatedAt":43,"install":44,"resources":57},"01M6H6CCBHBNHHZNBCXRZEKAC7","m01-ownership",null,"CRITICAL: Use for ownership\u002Fborrow\u002Flifetime issues. Triggers: E0382, E0597, E0506, E0507, E0515, E0716, E0106, value moved, borrowed value does not live long enough, cannot move out of, use of moved value, ownership, borrow, lifetime, 'a, 'static, move, clone, Copy, 所有权, 借用, 生命周期","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\u002Fm01-ownership\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30],"m01 ownership","ownership","issues","use","live","triggers","critical","false","long","copy","move","for","2026-11-10 10:12:30",false,"---\nname: m01-ownership\ndescription: \"CRITICAL: Use for ownership\u002Fborrow\u002Flifetime issues. Triggers: E0382, E0597, E0506, E0507, E0515, E0716, E0106, value moved, borrowed value does not live long enough, cannot move out of, use of moved value, ownership, borrow, lifetime, 'a, 'static, move, clone, Copy, 所有权, 借用, 生命周期\"\nuser-invocable: false\n---\n\n# Ownership & Lifetimes\n\n> **Layer 1: Language Mechanics**\n\n## Core Question\n\n**Who should own this data, and for how long?**\n\nBefore fixing ownership errors, understand the data's role:\n- Is it shared or exclusive?\n- Is it short-lived or long-lived?\n- Is it transformed or just read?\n\n---\n\n## Error → Design Question\n\n| Error | Don't Just Say | Ask Instead |\n|-------|----------------|-------------|\n| E0382 | \"Clone it\" | Who should own this data? |\n| E0597 | \"Extend lifetime\" | Is the scope boundary correct? |\n| E0506 | \"End borrow first\" | Should mutation happen elsewhere? |\n| E0507 | \"Clone before move\" | Why are we moving from a reference? |\n| E0515 | \"Return owned\" | Should caller own the data? |\n| E0716 | \"Bind to variable\" | Why is this temporary? |\n| E0106 | \"Add 'a\" | What is the actual lifetime relationship? |\n\n---\n\n## Thinking Prompt\n\nBefore fixing an ownership error, ask:\n\n1. **What is this data's domain role?**\n   - Entity (unique identity) → owned\n   - Value Object (interchangeable) → clone\u002Fcopy OK\n   - Temporary (computation result) → maybe restructure\n\n2. **Is the ownership design intentional?**\n   - By design → work within constraints\n   - Accidental → consider redesign\n\n3. **Fix symptom or redesign?**\n   - If Strike 3 (3rd attempt) → escalate to Layer 2\n\n---\n\n## Trace Up ↑\n\nWhen errors persist, trace to design layer:\n\n```\nE0382 (moved value)\n    ↑ Ask: What design choice led to this ownership pattern?\n    ↑ Check: m09-domain (is this Entity or Value Object?)\n    ↑ Check: domain-* (what constraints apply?)\n```\n\n| Persistent Error | Trace To | Question |\n|-----------------|----------|----------|\n| E0382 repeated | m02-resource | Should use Arc\u002FRc for sharing? |\n| E0597 repeated | m09-domain | Is scope boundary at right place? |\n| E0506\u002FE0507 | m03-mutability | Should use interior mutability? |\n\n---\n\n## Trace Down ↓\n\nFrom design decisions to implementation:\n\n```\n\"Data needs to be shared immutably\"\n    ↓ Use: Arc\u003CT> (multi-thread) or Rc\u003CT> (single-thread)\n\n\"Data needs exclusive ownership\"\n    ↓ Use: move semantics, take ownership\n\n\"Data is read-only view\"\n    ↓ Use: &T (immutable borrow)\n```\n\n---\n\n## Quick Reference\n\n| Pattern | Ownership | Cost | Use When |\n|---------|-----------|------|----------|\n| Move | Transfer | Zero | Caller doesn't need data |\n| `&T` | Borrow | Zero | Read-only access |\n| `&mut T` | Exclusive borrow | Zero | Need to modify |\n| `clone()` | Duplicate | Alloc + copy | Actually need a copy |\n| `Rc\u003CT>` | Shared (single) | Ref count | Single-thread sharing |\n| `Arc\u003CT>` | Shared (multi) | Atomic ref count | Multi-thread sharing |\n| `Cow\u003CT>` | Clone-on-write | Alloc if mutated | Might modify |\n\n## Error Code Reference\n\n| Error | Cause | Quick Fix |\n|-------|-------|-----------|\n| E0382 | Value moved | Clone, reference, or redesign ownership |\n| E0597 | Reference outlives owner | Extend owner scope or restructure |\n| E0506 | Assign while borrowed | End borrow before mutation |\n| E0507 | Move out of borrowed | Clone or use reference |\n| E0515 | Return local reference | Return owned value |\n| E0716 | Temporary dropped | Bind to variable |\n| E0106 | Missing lifetime | Add `'a` annotation |\n\n---\n\n## Anti-Patterns\n\n| Anti-Pattern | Why Bad | Better |\n|--------------|---------|--------|\n| `.clone()` everywhere | Hides design issues | Design ownership properly |\n| Fight borrow checker | Increases complexity | Work with the compiler |\n| `'static` for everything | Restricts flexibility | Use appropriate lifetimes |\n| Leak with `Box::leak` | Memory leak | Proper lifetime design |\n\n---\n\n## Related Skills\n\n| When | See |\n|------|-----|\n| Need smart pointers | m02-resource |\n| Need interior mutability | m03-mutability |\n| Data is domain entity | m09-domain |\n| Learning ownership concepts | m14-mental-model |\n","# Ownership & Lifetimes\n\n> **Layer 1: Language Mechanics**\n\n## Core Question\n\n**Who should own this data, and for how long?**\n\nBefore fixing ownership errors, understand the data's role:\n- Is it shared or exclusive?\n- Is it short-lived or long-lived?\n- Is it transformed or just read?\n\n---\n\n## Error → Design Question\n\n| Error | Don't Just Say | Ask Instead |\n|-------|----------------|-------------|\n| E0382 | \"Clone it\" | Who should own this data? |\n| E0597 | \"Extend lifetime\" | Is the scope boundary correct? |\n| E0506 | \"End borrow first\" | Should mutation happen elsewhere? |\n| E0507 | \"Clone before move\" | Why are we moving from a reference? |\n| E0515 | \"Return owned\" | Should caller own the data? |\n| E0716 | \"Bind to variable\" | Why is this temporary? |\n| E0106 | \"Add 'a\" | What is the actual lifetime relationship? |\n\n---\n\n## Thinking Prompt\n\nBefore fixing an ownership error, ask:\n\n1. **What is this data's domain role?**\n   - Entity (unique identity) → owned\n   - Value Object (interchangeable) → clone\u002Fcopy OK\n   - Temporary (computation result) → maybe restructure\n\n2. **Is the ownership design intentional?**\n   - By design → work within constraints\n   - Accidental → consider redesign\n\n3. **Fix symptom or redesign?**\n   - If Strike 3 (3rd attempt) → escalate to Layer 2\n\n---\n\n## Trace Up ↑\n\nWhen errors persist, trace to design layer:\n\n```\nE0382 (moved value)\n    ↑ Ask: What design choice led to this ownership pattern?\n    ↑ Check: m09-domain (is this Entity or Value Object?)\n    ↑ Check: domain-* (what constraints apply?)\n```\n\n| Persistent Error | Trace To | Question |\n|-----------------|----------|----------|\n| E0382 repeated | m02-resource | Should use Arc\u002FRc for sharing? |\n| E0597 repeated | m09-domain | Is scope boundary at right place? |\n| E0506\u002FE0507 | m03-mutability | Should use interior mutability? |\n\n---\n\n## Trace Down ↓\n\nFrom design decisions to implementation:\n\n```\n\"Data needs to be shared immutably\"\n    ↓ Use: Arc\u003CT> (multi-thread) or Rc\u003CT> (single-thread)\n\n\"Data needs exclusive ownership\"\n    ↓ Use: move semantics, take ownership\n\n\"Data is read-only view\"\n    ↓ Use: &T (immutable borrow)\n```\n\n---\n\n## Quick Reference\n\n| Pattern | Ownership | Cost | Use When |\n|---------|-----------|------|----------|\n| Move | Transfer | Zero | Caller doesn't need data |\n| `&T` | Borrow | Zero | Read-only access |\n| `&mut T` | Exclusive borrow | Zero | Need to modify |\n| `clone()` | Duplicate | Alloc + copy | Actually need a copy |\n| `Rc\u003CT>` | Shared (single) | Ref count | Single-thread sharing |\n| `Arc\u003CT>` | Shared (multi) | Atomic ref count | Multi-thread sharing |\n| `Cow\u003CT>` | Clone-on-write | Alloc if mutated | Might modify |\n\n## Error Code Reference\n\n| Error | Cause | Quick Fix |\n|-------|-------|-----------|\n| E0382 | Value moved | Clone, reference, or redesign ownership |\n| E0597 | Reference outlives owner | Extend owner scope or restructure |\n| E0506 | Assign while borrowed | End borrow before mutation |\n| E0507 | Move out of borrowed | Clone or use reference |\n| E0515 | Return local reference | Return owned value |\n| E0716 | Temporary dropped | Bind to variable |\n| E0106 | Missing lifetime | Add `'a` annotation |\n\n---\n\n## Anti-Patterns\n\n| Anti-Pattern | Why Bad | Better |\n|--------------|---------|--------|\n| `.clone()` everywhere | Hides design issues | Design ownership properly |\n| Fight borrow checker | Increases complexity | Work with the compiler |\n| `'static` for everything | Restricts flexibility | Use appropriate lifetimes |\n| Leak with `Box::leak` | Memory leak | Proper lifetime design |\n\n---\n\n## Related Skills\n\n| When | See |\n|------|-----|\n| Need smart pointers | m02-resource |\n| Need interior mutability | m03-mutability |\n| Data is domain entity | m09-domain |\n| Learning ownership concepts | m14-mental-model |\n",{"name":5,"description":7,"user-invocable":32},"main","6c13f6f4ac5a3bc1e6b78cd2bb1704f122c4a73e","archive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm01-ownership",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":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add 0xharryriddle\u002Fcodex-field-kit --skill m01-ownership",{"tool":50,"command":51},"bunx","bunx skills add 0xharryriddle\u002Fcodex-field-kit --skill m01-ownership",{"tool":53,"command":54},"pnpm","pnpm dlx skills add 0xharryriddle\u002Fcodex-field-kit --skill m01-ownership","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Farchive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm01-ownership\u002FSKILL.md",true,[58,64,68,72],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"comparison.md","REFERENCE","参考文档",5712,"https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Farchive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm01-ownership\u002Fcomparison.md",{"path":65,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":66,"sourceHtmlUrl":67},"examples\u002Fbest-practices.md",6681,"https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Farchive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm01-ownership\u002Fexamples\u002Fbest-practices.md",{"path":69,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":70,"sourceHtmlUrl":71},"patterns\u002Fcommon-errors.md",5024,"https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Farchive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm01-ownership\u002Fpatterns\u002Fcommon-errors.md",{"path":73,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":74,"sourceHtmlUrl":75},"patterns\u002Flifetime-patterns.md",4508,"https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Farchive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm01-ownership\u002Fpatterns\u002Flifetime-patterns.md",[77,108,126,136,162,189],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":88,"publishedAt":31},"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",[83],{"categoryNo":84,"categoryName":85,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",[89,90,91,92,93,94,95,24,96,97,98,99,100,101,102,103,104,105,106,107],"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":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":31},"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",[],[115,116,117,118,119,120,121,122,123,30,124,125],"swarm","swarm planner","planner","parallel","multi-agent","only","execution","plans","dependency","multi","implementation",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":31},"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",[],[133,115,134,120,135],"super swarm spark","spark","commands",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":31},"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",[],[143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161],"role","creator","role creator","keys","users","roles","toml","enforce","install","guide","instructions","model","developer","reasoning","generate","create","config","codex","files",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":171,"publishedAt":31},"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",[168],{"categoryNo":169,"categoryName":170,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000023","Skill与智能体开发",[172,173,174,102,175,176,177,178,30,179,180,181,182,183,184,22,185,186,187,188],"github","read github","read","documentation","docs","MCP","search","when to use","URL","via","io","service","do","user","repo","format","repository",{"skillNo":190,"name":117,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":192,"categories":193,"keywords":194,"publishedAt":31},"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",[],[117,195,30,196,197,198,24,122,135,199,200,22,201,202,203,204,205,158,94,206],"outline","atomic","with","sprints","draft","me","write","phased implementation","plan","help","planning","design"]