Agent skill
domain-modeling
Creates structured domain documentation with anatomy diagrams, entity schemas, and operation specs. Use when designing systems, after brainstorming, or documenting existing architecture.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/ts-domain-modeling
SKILL.md
Domain Modeling
Structured documentation for system design. TypeScript-first schemas.
Process
- Identify entities - Nouns in the domain (things with identity/state)
- Identify operations - Verbs (actions that transform state)
- Map relationships - How entities connect (1:1, 1:n)
- Define schemas - TypeScript interfaces for each entity
- Specify operations - Params interface + step-by-step behavior
Document Structure
## Anatomy
### Diagram ← Relationship overview (ASCII boxes + cardinality)
### Entities ← Name | Description table
### Operations ← Name | Description table
### Other Terms ← Identifiers, enums, value types (optional)
## Entities
### <EntityName>
#### Schema ← TypeScript interface
#### Data ← Known instances (optional)
## Operations
### <operationName> ← Params interface + numbered steps
Anatomy Section
Diagram
ASCII boxes with relationship cardinality.
┌─────────┐ 1:n ┌─────────┐
│ <EntityA> │─────▶│ <EntityB> │
└─────────┘ └─────────┘
Conventions:
1:n= one-to-many1:1= one-to-one- Arrow direction = ownership/containment
Entities Table
| Name | Description |
|---|---|
| EntityName | One-line description of what it represents. |
Operations Table
| Name | Description |
|---|---|
operationName |
One-line description of what it does. |
Other Terms (optional)
For identifiers, enums, types that don't warrant full entity treatment:
| Name | Description |
|---|---|
| TermName | Brief definition. |
Entities Section
One subsection per entity.
Entity Template
Schema
interface EntityName {
/** Property description. */
propertyName: PropertyType
}
Data (optional)
When entity has known/enumerable instances:
const instances: EntityName[] = [
{/* ... */},
]
Operations Section
One subsection per operation. Params interface + numbered behavior steps.
Operation Template
interface Params {
/** Param description. */
paramName: ParamType
}
- First step
- Second step
- Sub-detail if needed
- Return result
Discriminated Unions
When an entity has variants:
type EntityName =
| EntityNameVariantA
| EntityNameVariantB
interface EntityNameVariantA {
kind: 'a'
/* variant-specific props */
}
Output Location
docs/design/<domain>-design.md or docs/plans/YYYY-MM-DD-<topic>-design.md
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?