m09-domain/SKILL.md
Mastering C++ Domain Modeling (DDD). Triggers: Entity, Value Object, Aggregate, Repository, Pimpl, Class Design, Invariant.
npx skillsauth add 13eholder/modern-cpp-skills m09-domainInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Identity or Value?
Color, Money). Equality via comparison. Copyable.User, Socket). Equality via ID. Non-copyable (usually).| Issue | Design Question | | ---------------------- | ---------------------------------------------------- | | Data Inconsistency | Are public fields allowing invalid states? | | Object Slicing | Are you passing polymorphic Entities by Value? | | Header Hell | Are you leaking implementation details? (Use Pimpl). |
Is it copyable?
Does it have invariants?
class with private data + public methods.struct (POD).Does it own others?
std::vector / unique_ptr.class User (Entity) holds Name (Value) and Address (Value).| Pattern | C++ Implementation |
| ---------------- | ------------------------------------------- |
| Value Object | struct + operator<=>. |
| Entity | class + Deleted Copy + ID field. |
| Repository | Pure Virtual Interface (virtual ... = 0). |
| Aggregate | Parent class owning children. |
tools
Common C++ Anti-Patterns. Triggers: global variables, new/delete, C-style cast, macros, void*.
data-ai
C++ Mental Models: Pointer vs Reference, Initialization, Undefined Behavior.
data-ai
Mastering C++ Domain Errors: Exception Hierarchies, System Errors, and Expected.
data-ai
Mastering C++ Lifecycle: RAII, Destructors, Static Initialization, Rule of 5.