documenting-domains
Generate domain understanding documentation from codebase analysis. Extracts entities, business logic, domain terms, and concept relationships. Triggers: domain understanding, glossary, entities, business logic, domain model, ER diagram, use cases.
When & Why to Use This Skill
This Claude skill automates the extraction of Domain-Driven Design (DDD) insights directly from your codebase. By analyzing source code, ORM patterns, and business logic, it generates comprehensive domain documentation, including entity-relationship mappings, ubiquitous language glossaries, and core business invariants. It serves as a bridge between technical implementation and high-level architectural understanding, ensuring documentation stays synchronized with the actual code.
Use Cases
- Rapid Onboarding: Generate an instant domain glossary and entity map to help new developers understand the business context of a complex codebase.
- Legacy System Analysis: Automatically uncover hidden business rules and domain models within undocumented legacy projects to facilitate refactoring or migration.
- DDD Synchronization: Maintain a consistent 'Ubiquitous Language' by extracting domain terms directly from class names, comments, and JSDoc.
- Architectural Auditing: Visualize entity relationships and validation logic across different ORMs (like Prisma, TypeORM, or Django) to ensure architectural integrity.
- Technical Documentation: Streamline the creation of READMEs and internal wikis by providing structured summaries of domain events and business policies.
| name | documenting-domains |
|---|---|
| description | > |
| allowed-tools | [Read, Write, Grep, Glob, Bash, Task] |
| context | fork |
| user-invocable | false |
Domain Understanding Generation
Detection
| Category | Targets |
|---|---|
| Entities | class, interface, dataclass, Prisma, ORM |
| Invariants | Validation logic, constraints, required fields |
| Domain Terms | Class/function names, comments, JSDoc |
| Relationships | Entity references, inheritance, imports |
| Business Rules | Validators, policies, domain services |
| Domain Events | Event classes, EventEmitter, pub/sub patterns |
ORM Patterns
| ORM/Framework | Pattern |
|---|---|
| Prisma | model User {} |
| TypeORM | @Entity(), @Column() |
| Sequelize | Model.init() |
| Django | class User(models.Model) |
| SQLAlchemy | class User(Base) |