[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AWTPM89K9Q3SR64GWWQ3V8":3,"skill-same:01M7AWTPM89K9Q3SR64GWWQ3V8":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7AWTPM89K9Q3SR64GWWQ3V8","m09-domain",null,"CRITICAL: Use for domain modeling. Triggers: domain model, DDD, domain-driven design, entity, value object, aggregate, repository pattern, business rules, validation, invariant, 领域模型, 领域驱动设计, 业务规则","wxxb789\u002Fmarkturbo","wxxb789","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F49564443?v=4","01M7AWR3AB19SNE4ATARY9KV3W","01M7AWR3AZ5Y5ADAY47KF3RBRJ",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fwxxb789\u002Fmarkturbo\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fm09-domain\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: m09-domain\ndescription: \"CRITICAL: Use for domain modeling. Triggers: domain model, DDD, domain-driven design, entity, value object, aggregate, repository pattern, business rules, validation, invariant, 领域模型, 领域驱动设计, 业务规则\"\nuser-invocable: false\n---\n\n# Domain Modeling\n\n> **Layer 2: Design Choices**\n\n## Core Question\n\n**What is this concept's role in the domain?**\n\nBefore modeling in code, understand:\n- Is it an Entity (identity matters) or Value Object (interchangeable)?\n- What invariants must be maintained?\n- Where are the aggregate boundaries?\n\n---\n\n## Domain Concept → Rust Pattern\n\n| Domain Concept | Rust Pattern | Ownership Implication |\n|----------------|--------------|----------------------|\n| Entity | struct + Id | Owned, unique identity |\n| Value Object | struct + Clone\u002FCopy | Shareable, immutable |\n| Aggregate Root | struct owns children | Clear ownership tree |\n| Repository | trait | Abstracts persistence |\n| Domain Event | enum | Captures state changes |\n| Service | impl block \u002F free fn | Stateless operations |\n\n---\n\n## Thinking Prompt\n\nBefore creating a domain type:\n\n1. **What's the concept's identity?**\n   - Needs unique identity → Entity (Id field)\n   - Interchangeable by value → Value Object (Clone\u002FCopy)\n\n2. **What invariants must hold?**\n   - Always valid → private fields + validated constructor\n   - Transition rules → type state pattern\n\n3. **Who owns this data?**\n   - Single owner (parent) → owned field\n   - Shared reference → Arc\u002FRc\n   - Weak reference → Weak\n\n---\n\n## Trace Up ↑\n\nTo domain constraints (Layer 3):\n\n```\n\"How should I model a Transaction?\"\n    ↑ Ask: What domain rules govern transactions?\n    ↑ Check: domain-fintech (audit, precision requirements)\n    ↑ Check: Business stakeholders (what invariants?)\n```\n\n| Design Question | Trace To | Ask |\n|-----------------|----------|-----|\n| Entity vs Value Object | domain-* | What makes two instances \"the same\"? |\n| Aggregate boundaries | domain-* | What must be consistent together? |\n| Validation rules | domain-* | What business rules apply? |\n\n---\n\n## Trace Down ↓\n\nTo implementation (Layer 1):\n\n```\n\"Model as Entity\"\n    ↓ m01-ownership: Owned, unique\n    ↓ m05-type-driven: Newtype for Id\n\n\"Model as Value Object\"\n    ↓ m01-ownership: Clone\u002FCopy OK\n    ↓ m05-type-driven: Validate at construction\n\n\"Model as Aggregate\"\n    ↓ m01-ownership: Parent owns children\n    ↓ m02-resource: Consider Rc for shared within aggregate\n```\n\n---\n\n## Quick Reference\n\n| DDD Concept | Rust Pattern | Example |\n|-------------|--------------|---------|\n| Value Object | Newtype | `struct Email(String);` |\n| Entity | Struct + ID | `struct User { id: UserId, ... }` |\n| Aggregate | Module boundary | `mod order { ... }` |\n| Repository | Trait | `trait UserRepo { fn find(...) }` |\n| Domain Event | Enum | `enum OrderEvent { Created, ... }` |\n\n## Pattern Templates\n\n### Value Object\n\n```rust\nstruct Email(String);\n\nimpl Email {\n    pub fn new(s: &str) -> Result\u003CSelf, ValidationError> {\n        validate_email(s)?;\n        Ok(Self(s.to_string()))\n    }\n}\n```\n\n### Entity\n\n```rust\nstruct UserId(Uuid);\n\nstruct User {\n    id: UserId,\n    email: Email,\n    \u002F\u002F ... other fields\n}\n\nimpl PartialEq for User {\n    fn eq(&self, other: &Self) -> bool {\n        self.id == other.id  \u002F\u002F Identity equality\n    }\n}\n```\n\n### Aggregate\n\n```rust\nmod order {\n    pub struct Order {\n        id: OrderId,\n        items: Vec\u003COrderItem>,  \u002F\u002F Owned children\n        \u002F\u002F ...\n    }\n\n    impl Order {\n        pub fn add_item(&mut self, item: OrderItem) {\n            \u002F\u002F Enforce aggregate invariants\n        }\n    }\n}\n```\n\n---\n\n## Common Mistakes\n\n| Mistake | Why Wrong | Better |\n|---------|-----------|--------|\n| Primitive obsession | No type safety | Newtype wrappers |\n| Public fields with invariants | Invariants violated | Private + accessor |\n| Leaked aggregate internals | Broken encapsulation | Methods on root |\n| String for semantic types | No validation | Validated newtype |\n\n---\n\n## Related Skills\n\n| When | See |\n|------|-----|\n| Type-driven implementation | m05-type-driven |\n| Ownership for aggregates | m01-ownership |\n| Domain error handling | m13-domain-error |\n| Specific domain rules | domain-* |\n","# Domain Modeling\n\n> **Layer 2: Design Choices**\n\n## Core Question\n\n**What is this concept's role in the domain?**\n\nBefore modeling in code, understand:\n- Is it an Entity (identity matters) or Value Object (interchangeable)?\n- What invariants must be maintained?\n- Where are the aggregate boundaries?\n\n---\n\n## Domain Concept → Rust Pattern\n\n| Domain Concept | Rust Pattern | Ownership Implication |\n|----------------|--------------|----------------------|\n| Entity | struct + Id | Owned, unique identity |\n| Value Object | struct + Clone\u002FCopy | Shareable, immutable |\n| Aggregate Root | struct owns children | Clear ownership tree |\n| Repository | trait | Abstracts persistence |\n| Domain Event | enum | Captures state changes |\n| Service | impl block \u002F free fn | Stateless operations |\n\n---\n\n## Thinking Prompt\n\nBefore creating a domain type:\n\n1. **What's the concept's identity?**\n   - Needs unique identity → Entity (Id field)\n   - Interchangeable by value → Value Object (Clone\u002FCopy)\n\n2. **What invariants must hold?**\n   - Always valid → private fields + validated constructor\n   - Transition rules → type state pattern\n\n3. **Who owns this data?**\n   - Single owner (parent) → owned field\n   - Shared reference → Arc\u002FRc\n   - Weak reference → Weak\n\n---\n\n## Trace Up ↑\n\nTo domain constraints (Layer 3):\n\n```\n\"How should I model a Transaction?\"\n    ↑ Ask: What domain rules govern transactions?\n    ↑ Check: domain-fintech (audit, precision requirements)\n    ↑ Check: Business stakeholders (what invariants?)\n```\n\n| Design Question | Trace To | Ask |\n|-----------------|----------|-----|\n| Entity vs Value Object | domain-* | What makes two instances \"the same\"? |\n| Aggregate boundaries | domain-* | What must be consistent together? |\n| Validation rules | domain-* | What business rules apply? |\n\n---\n\n## Trace Down ↓\n\nTo implementation (Layer 1):\n\n```\n\"Model as Entity\"\n    ↓ m01-ownership: Owned, unique\n    ↓ m05-type-driven: Newtype for Id\n\n\"Model as Value Object\"\n    ↓ m01-ownership: Clone\u002FCopy OK\n    ↓ m05-type-driven: Validate at construction\n\n\"Model as Aggregate\"\n    ↓ m01-ownership: Parent owns children\n    ↓ m02-resource: Consider Rc for shared within aggregate\n```\n\n---\n\n## Quick Reference\n\n| DDD Concept | Rust Pattern | Example |\n|-------------|--------------|---------|\n| Value Object | Newtype | `struct Email(String);` |\n| Entity | Struct + ID | `struct User { id: UserId, ... }` |\n| Aggregate | Module boundary | `mod order { ... }` |\n| Repository | Trait | `trait UserRepo { fn find(...) }` |\n| Domain Event | Enum | `enum OrderEvent { Created, ... }` |\n\n## Pattern Templates\n\n### Value Object\n\n```rust\nstruct Email(String);\n\nimpl Email {\n    pub fn new(s: &str) -> Result\u003CSelf, ValidationError> {\n        validate_email(s)?;\n        Ok(Self(s.to_string()))\n    }\n}\n```\n\n### Entity\n\n```rust\nstruct UserId(Uuid);\n\nstruct User {\n    id: UserId,\n    email: Email,\n    \u002F\u002F ... other fields\n}\n\nimpl PartialEq for User {\n    fn eq(&self, other: &Self) -> bool {\n        self.id == other.id  \u002F\u002F Identity equality\n    }\n}\n```\n\n### Aggregate\n\n```rust\nmod order {\n    pub struct Order {\n        id: OrderId,\n        items: Vec\u003COrderItem>,  \u002F\u002F Owned children\n        \u002F\u002F ...\n    }\n\n    impl Order {\n        pub fn add_item(&mut self, item: OrderItem) {\n            \u002F\u002F Enforce aggregate invariants\n        }\n    }\n}\n```\n\n---\n\n## Common Mistakes\n\n| Mistake | Why Wrong | Better |\n|---------|-----------|--------|\n| Primitive obsession | No type safety | Newtype wrappers |\n| Public fields with invariants | Invariants violated | Private + accessor |\n| Leaked aggregate internals | Broken encapsulation | Methods on root |\n| String for semantic types | No validation | Validated newtype |\n\n---\n\n## Related Skills\n\n| When | See |\n|------|-----|\n| Type-driven implementation | m05-type-driven |\n| Ownership for aggregates | m01-ownership |\n| Domain error handling | m13-domain-error |\n| Specific domain rules | domain-* |\n",{"name":5,"description":7,"user-invocable":19},"main","0f3f41ed51c357d4f79561a132514089c1aaa97d",".agents\u002Fskills\u002Fm09-domain",0,"https:\u002F\u002Fgithub.com\u002Fwxxb789\u002Fmarkturbo","https:\u002F\u002Fgithub.com\u002Fwxxb789","2026-11-15 04:06:53",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add wxxb789\u002Fmarkturbo --skill m09-domain",{"tool":36,"command":37},"bunx","bunx skills add wxxb789\u002Fmarkturbo --skill m09-domain",{"tool":39,"command":40},"pnpm","pnpm dlx skills add wxxb789\u002Fmarkturbo --skill m09-domain","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fwxxb789\u002Fmarkturbo\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fm09-domain\u002FSKILL.md",true,[],[45,52,58,65,72,78],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M7AWXVVZ6JEJVFGGT2WBSEN0","hello-diagrams","A valid, fully-populated Agent Skill, shown here so the Skills inspector has something correct to display.","https:\u002F\u002Fgithub.com\u002Fwxxb789\u002Fmarkturbo\u002Fblob\u002Fmain\u002Fsample\u002F.claude\u002Fskills\u002Fhello-diagrams\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7AWXTNG6ZV6WW5CHJZXJYEC","Broken-Example","https:\u002F\u002Fgithub.com\u002Fwxxb789\u002Fmarkturbo\u002Fblob\u002Fmain\u002Fsample\u002F.claude\u002Fskills\u002Fbroken-example\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7AWXS5WN306ENF2MYJYP7VM","valid-skill","A fully conformant skill with every optional field populated.","https:\u002F\u002Fgithub.com\u002Fwxxb789\u002Fmarkturbo\u002Fblob\u002Fmain\u002Ffixtures\u002Fskills\u002Fskills\u002Fvalid-skill\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7AWXR0NY08YVHE0G8VTJJ97","a-different-name","The name does not match the directory, which is a conformance warning.","https:\u002F\u002Fgithub.com\u002Fwxxb789\u002Fmarkturbo\u002Fblob\u002Fmain\u002Ffixtures\u002Fskills\u002Fskills\u002Fname-mismatch\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7AWXQ5EV9JCA0WG9Q1WB13Y","missing-metadata","https:\u002F\u002Fgithub.com\u002Fwxxb789\u002Fmarkturbo\u002Fblob\u002Fmain\u002Ffixtures\u002Fskills\u002Fskills\u002Fmissing-metadata\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7AWXP8GT7FATM53B914ZN50","malformed-yaml","https:\u002F\u002Fgithub.com\u002Fwxxb789\u002Fmarkturbo\u002Fblob\u002Fmain\u002Ffixtures\u002Fskills\u002Fskills\u002Fmalformed-yaml\u002FSKILL.md",[],[]]