[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6H6DGXYVGVHVXPJ4EHEAB3B":3,"skill-same:01M6H6DGXYVGVHVXPJ4EHEAB3B":72},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M6H6DGXYVGVHVXPJ4EHEAB3B","m14-mental-model",null,"Use when learning Rust concepts. Keywords: mental model, how to think about ownership, understanding borrow checker, visualizing memory layout, analogy, misconception, explaining ownership, why does Rust, help me understand, confused about, learning Rust, explain like I'm, ELI5, intuition for, coming from Java, coming from Python, 心智模型, 如何理解所有权, 学习 Rust, Rust 入门, 为什么 Rust","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\u002Fm14-mental-model\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"model","mental model","m14 mental model","rust","memory","for","checker","how to","false","layout","me","use","help","python","explain","learning","eli5","why","how","java","2026-11-10 10:12:30",false,"---\nname: m14-mental-model\ndescription: \"Use when learning Rust concepts. Keywords: mental model, how to think about ownership, understanding borrow checker, visualizing memory layout, analogy, misconception, explaining ownership, why does Rust, help me understand, confused about, learning Rust, explain like I'm, ELI5, intuition for, coming from Java, coming from Python, 心智模型, 如何理解所有权, 学习 Rust, Rust 入门, 为什么 Rust\"\nuser-invocable: false\n---\n\n# Mental Models\n\n> **Layer 2: Design Choices**\n\n## Core Question\n\n**What's the right way to think about this Rust concept?**\n\nWhen learning or explaining Rust:\n- What's the correct mental model?\n- What misconceptions should be avoided?\n- What analogies help understanding?\n\n---\n\n## Key Mental Models\n\n| Concept | Mental Model | Analogy |\n|---------|--------------|---------|\n| Ownership | Unique key | Only one person has the house key |\n| Move | Key handover | Giving away your key |\n| `&T` | Lending for reading | Lending a book |\n| `&mut T` | Exclusive editing | Only you can edit the doc |\n| Lifetime `'a` | Valid scope | \"Ticket valid until...\" |\n| `Box\u003CT>` | Heap pointer | Remote control to TV |\n| `Rc\u003CT>` | Shared ownership | Multiple remotes, last turns off |\n| `Arc\u003CT>` | Thread-safe Rc | Remotes from any room |\n\n---\n\n## Coming From Other Languages\n\n| From | Key Shift |\n|------|-----------|\n| Java\u002FC# | Values are owned, not references by default |\n| C\u002FC++ | Compiler enforces safety rules |\n| Python\u002FGo | No GC, deterministic destruction |\n| Functional | Mutability is safe via ownership |\n| JavaScript | No null, use Option instead |\n\n---\n\n## Thinking Prompt\n\nWhen confused about Rust:\n\n1. **What's the ownership model?**\n   - Who owns this data?\n   - How long does it live?\n   - Who can access it?\n\n2. **What guarantee is Rust providing?**\n   - No data races\n   - No dangling pointers\n   - No use-after-free\n\n3. **What's the compiler telling me?**\n   - Error = violation of safety rule\n   - Solution = work with the rules\n\n---\n\n## Trace Up ↑\n\nTo design understanding (Layer 2):\n\n```\n\"Why can't I do X in Rust?\"\n    ↑ Ask: What safety guarantee would be violated?\n    ↑ Check: m01-m07 for the rule being enforced\n    ↑ Ask: What's the intended design pattern?\n```\n\n---\n\n## Trace Down ↓\n\nTo implementation (Layer 1):\n\n```\n\"I understand the concept, now how do I implement?\"\n    ↓ m01-ownership: Ownership patterns\n    ↓ m02-resource: Smart pointer choice\n    ↓ m07-concurrency: Thread safety\n```\n\n---\n\n## Common Misconceptions\n\n| Error | Wrong Model | Correct Model |\n|-------|-------------|---------------|\n| E0382 use after move | GC cleans up | Ownership = unique key transfer |\n| E0502 borrow conflict | Multiple writers OK | Only one writer at a time |\n| E0499 multiple mut borrows | Aliased mutation | Exclusive access for mutation |\n| E0106 missing lifetime | Ignoring scope | References have validity scope |\n| E0507 cannot move from `&T` | Implicit clone | References don't own data |\n\n## Deprecated Thinking\n\n| Deprecated | Better |\n|------------|--------|\n| \"Rust is like C++\" | Different ownership model |\n| \"Lifetimes are GC\" | Compile-time validity scope |\n| \"Clone solves everything\" | Restructure ownership |\n| \"Fight the borrow checker\" | Work with the compiler |\n| \"`unsafe` to avoid rules\" | Understand safe patterns first |\n\n---\n\n## Ownership Visualization\n\n```\nStack                          Heap\n+----------------+            +----------------+\n| main()         |            |                |\n|   s1 ─────────────────────> │ \"hello\"        |\n|                |            |                |\n| fn takes(s) {  |            |                |\n|   s2 (moved) ─────────────> │ \"hello\"        |\n| }              |            | (s1 invalid)   |\n+----------------+            +----------------+\n\nAfter move: s1 is no longer valid\n```\n\n## Reference Visualization\n\n```\n+----------------+\n| data: String   |────────────> \"hello\"\n+----------------+\n       ↑\n       │ &data (immutable borrow)\n       │\n+------+------+\n| reader1    reader2    (multiple OK)\n+------+------+\n\n+----------------+\n| data: String   |────────────> \"hello\"\n+----------------+\n       ↑\n       │ &mut data (mutable borrow)\n       │\n+------+\n| writer (only one)\n+------+\n```\n\n---\n\n## Learning Path\n\n| Stage | Focus | Skills |\n|-------|-------|--------|\n| Beginner | Ownership basics | m01-ownership, m14-mental-model |\n| Intermediate | Smart pointers, error handling | m02, m06 |\n| Advanced | Concurrency, unsafe | m07, unsafe-checker |\n| Expert | Design patterns | m09-m15, domain-* |\n\n---\n\n## Related Skills\n\n| When | See |\n|------|-----|\n| Ownership errors | m01-ownership |\n| Smart pointers | m02-resource |\n| Concurrency | m07-concurrency |\n| Anti-patterns | m15-anti-pattern |\n","# Mental Models\n\n> **Layer 2: Design Choices**\n\n## Core Question\n\n**What's the right way to think about this Rust concept?**\n\nWhen learning or explaining Rust:\n- What's the correct mental model?\n- What misconceptions should be avoided?\n- What analogies help understanding?\n\n---\n\n## Key Mental Models\n\n| Concept | Mental Model | Analogy |\n|---------|--------------|---------|\n| Ownership | Unique key | Only one person has the house key |\n| Move | Key handover | Giving away your key |\n| `&T` | Lending for reading | Lending a book |\n| `&mut T` | Exclusive editing | Only you can edit the doc |\n| Lifetime `'a` | Valid scope | \"Ticket valid until...\" |\n| `Box\u003CT>` | Heap pointer | Remote control to TV |\n| `Rc\u003CT>` | Shared ownership | Multiple remotes, last turns off |\n| `Arc\u003CT>` | Thread-safe Rc | Remotes from any room |\n\n---\n\n## Coming From Other Languages\n\n| From | Key Shift |\n|------|-----------|\n| Java\u002FC# | Values are owned, not references by default |\n| C\u002FC++ | Compiler enforces safety rules |\n| Python\u002FGo | No GC, deterministic destruction |\n| Functional | Mutability is safe via ownership |\n| JavaScript | No null, use Option instead |\n\n---\n\n## Thinking Prompt\n\nWhen confused about Rust:\n\n1. **What's the ownership model?**\n   - Who owns this data?\n   - How long does it live?\n   - Who can access it?\n\n2. **What guarantee is Rust providing?**\n   - No data races\n   - No dangling pointers\n   - No use-after-free\n\n3. **What's the compiler telling me?**\n   - Error = violation of safety rule\n   - Solution = work with the rules\n\n---\n\n## Trace Up ↑\n\nTo design understanding (Layer 2):\n\n```\n\"Why can't I do X in Rust?\"\n    ↑ Ask: What safety guarantee would be violated?\n    ↑ Check: m01-m07 for the rule being enforced\n    ↑ Ask: What's the intended design pattern?\n```\n\n---\n\n## Trace Down ↓\n\nTo implementation (Layer 1):\n\n```\n\"I understand the concept, now how do I implement?\"\n    ↓ m01-ownership: Ownership patterns\n    ↓ m02-resource: Smart pointer choice\n    ↓ m07-concurrency: Thread safety\n```\n\n---\n\n## Common Misconceptions\n\n| Error | Wrong Model | Correct Model |\n|-------|-------------|---------------|\n| E0382 use after move | GC cleans up | Ownership = unique key transfer |\n| E0502 borrow conflict | Multiple writers OK | Only one writer at a time |\n| E0499 multiple mut borrows | Aliased mutation | Exclusive access for mutation |\n| E0106 missing lifetime | Ignoring scope | References have validity scope |\n| E0507 cannot move from `&T` | Implicit clone | References don't own data |\n\n## Deprecated Thinking\n\n| Deprecated | Better |\n|------------|--------|\n| \"Rust is like C++\" | Different ownership model |\n| \"Lifetimes are GC\" | Compile-time validity scope |\n| \"Clone solves everything\" | Restructure ownership |\n| \"Fight the borrow checker\" | Work with the compiler |\n| \"`unsafe` to avoid rules\" | Understand safe patterns first |\n\n---\n\n## Ownership Visualization\n\n```\nStack                          Heap\n+----------------+            +----------------+\n| main()         |            |                |\n|   s1 ─────────────────────> │ \"hello\"        |\n|                |            |                |\n| fn takes(s) {  |            |                |\n|   s2 (moved) ─────────────> │ \"hello\"        |\n| }              |            | (s1 invalid)   |\n+----------------+            +----------------+\n\nAfter move: s1 is no longer valid\n```\n\n## Reference Visualization\n\n```\n+----------------+\n| data: String   |────────────> \"hello\"\n+----------------+\n       ↑\n       │ &data (immutable borrow)\n       │\n+------+------+\n| reader1    reader2    (multiple OK)\n+------+------+\n\n+----------------+\n| data: String   |────────────> \"hello\"\n+----------------+\n       ↑\n       │ &mut data (mutable borrow)\n       │\n+------+\n| writer (only one)\n+------+\n```\n\n---\n\n## Learning Path\n\n| Stage | Focus | Skills |\n|-------|-------|--------|\n| Beginner | Ownership basics | m01-ownership, m14-mental-model |\n| Intermediate | Smart pointers, error handling | m02, m06 |\n| Advanced | Concurrency, unsafe | m07, unsafe-checker |\n| Expert | Design patterns | m09-m15, domain-* |\n\n---\n\n## Related Skills\n\n| When | See |\n|------|-----|\n| Ownership errors | m01-ownership |\n| Smart pointers | m02-resource |\n| Concurrency | m07-concurrency |\n| Anti-patterns | m15-anti-pattern |\n",{"name":5,"description":7,"user-invocable":40},"main","6c13f6f4ac5a3bc1e6b78cd2bb1704f122c4a73e","archive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm14-mental-model",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":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add 0xharryriddle\u002Fcodex-field-kit --skill m14-mental-model",{"tool":58,"command":59},"bunx","bunx skills add 0xharryriddle\u002Fcodex-field-kit --skill m14-mental-model",{"tool":61,"command":62},"pnpm","pnpm dlx skills add 0xharryriddle\u002Fcodex-field-kit --skill m14-mental-model","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Farchive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm14-mental-model\u002FSKILL.md",true,[66],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"patterns\u002Fthinking-in-rust.md","REFERENCE","参考文档",6734,"https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Farchive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm14-mental-model\u002Fpatterns\u002Fthinking-in-rust.md",[73,105,123,133,158,185],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":84,"publishedAt":39},"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",[79],{"categoryNo":80,"categoryName":81,"taxonomyType":82,"taxonomyTypeDesc":83},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",[85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],"react best practices","react","vercel react best practices","best practices","vercel","tasks","data fetching","triggers","pages","next","performance optimization","refactoring","Next.js","Optimization","code","guidelines","react components","components","performance","writing",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":39},"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",[],[112,113,114,115,116,117,118,119,120,24,121,122],"swarm","swarm planner","planner","parallel","multi-agent","only","execution","plans","dependency","multi","implementation",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":39},"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",[],[130,112,131,117,132],"super swarm spark","spark","commands",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":39},"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",[],[140,141,142,143,144,145,146,147,148,149,150,19,151,152,153,154,155,156,157],"role","creator","role creator","keys","users","roles","toml","enforce","install","guide","instructions","developer","reasoning","generate","create","config","codex","files",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":167,"publishedAt":39},"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",[164],{"categoryNo":165,"categoryName":166,"taxonomyType":82,"taxonomyTypeDesc":83},"01JBSEEDCAT000000000000023","Skill与智能体开发",[168,169,170,99,171,172,173,174,24,175,176,177,178,179,180,30,181,182,183,184],"github","read github","read","documentation","docs","MCP","search","when to use","URL","via","io","service","do","user","repo","format","repository",{"skillNo":186,"name":114,"nameZh":6,"description":187,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":188,"categories":189,"keywords":190,"publishedAt":39},"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",[],[114,191,24,192,193,194,92,119,132,195,29,30,196,197,198,31,199,154,90,200],"outline","atomic","with","sprints","draft","write","phased implementation","plan","planning","design"]