/domain-expert:domain-expertfrom domain-expert
Domain knowledge discovery and guidance. Use when user says /domain, /domain configure, /domain learn, /domain explain, or /domain map.
Ships in domain-expert. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Discover, learn, and guide domain knowledge. Helps understand project concepts, terminology, and how to map requests to domain patterns.
| Mode | Command | Purpose |
|---|---|---|
| configure | /domain configure | Read domain knowledge from docs |
| learn | /domain learn | Infer domain from code analysis |
| explain | /domain explain <concept> | Answer questions about a concept |
| map | /domain map <request> | Map request to domain concepts |
/domain configure (Setup)Discovers domain knowledge from existing documentation.
/domain configure
What it checks:
Output:
## Discovered Domain Knowledge
**Project:** E-commerce platform
**Confidence:** High (domain.md found)
### Glossary (12 terms)
| Term | Definition |
|------|------------|
| Customer | User who has made a purchase |
| Order | Customer's request to purchase items |
| Cart | Collection of items before checkout |
### Entities (5 found)
| Entity | Description | Key Attributes |
|--------|-------------|----------------|
| Customer | Registered user | id, email, tier |
| Order | Purchase request | id, status, items |
### Business Rules (3 found)
| Rule | Context |
|------|---------|
| Orders can only be cancelled within 24h | Order cancellation |
**Save this configuration?** [Confirm / Adjust]
/domain learnAnalyzes domain code to infer entities, relationships, and patterns.
# Analyze all domain code (default)
/domain learn --analyze
# Learn from specific file
/domain learn --from src/domain/order/order.ts
What it analyzes by language:
| Language | Paths Scanned | Patterns |
|---|---|---|
| TypeScript | src/domain/, src/entities/ | class, interface, type, enum |
| Python | domain/, models/ | class, @dataclass, BaseModel |
| Go | internal/domain/, pkg/domain/ | type struct, type interface |
| Rust | src/domain/, src/core/ | struct, enum, trait |
| Java | src/main/java/**/domain/ | class, interface, enum |
Output:
## Inferred Domain Knowledge
**Method:** Code analysis (23 files)
**Confidence:** Medium
### Entities (inferred)
| Name | Type | Attributes | Confidence |
|------|------|------------|------------|
| User | Entity | id, email, status | 95% |
| Order | Aggregate | id, items, total | 90% |
| Money | Value Object | amount, currency | 85% |
### Relationships
User ──1:N──> Order Order ──1:N──> OrderItem OrderItem ──N:1──> Product
### Naming Patterns
- Entities: PascalCase nouns (User, Order)
- Events: PascalCase past tense (OrderCreated)
- Commands: PascalCase imperative (CreateOrder)
**Save this configuration?** [Confirm / Adjust]
/domain explain <concept>Explains a domain concept with full context.
/domain explain Order
/domain explain "value object"
Output:
## Domain Concept: Order
**Definition:** A customer's request to purchase one or more products.
**Type:** Aggregate Root
**Attributes:**
- id: Unique order identifier
- status: pending, confirmed, shipped, delivered, cancelled
- items: List of OrderItems
- total: Calculated total (Money)
**Relationships:**
- Belongs to: Customer
- Contains: OrderItem (1:N)
**Business Rules:**
- Cannot be modified after shipping
- Can only be cancelled within 24 hours
- Total must equal sum of items
**Code Location:** src/domain/order/order.ts
/domain map <request>Maps a user request to domain concepts (used by developer skill).
/domain map "Allow users to cancel orders and get refunds"
Output:
## Domain Mapping
**Request:** "Allow users to cancel orders and get refunds"
### Entities Involved
| Entity | Role |
|--------|------|
| User | Actor (who cancels) |
| Order | Target (what's cancelled) |
| Payment | Related (what's refunded) |
### Operations
| Operation | Type | Description |
|-----------|------|-------------|
| CancelOrder | Command | Change order status to cancelled |
| RefundPayment | Command | Initiate refund for payment |
| OrderCancelled | Event | Emitted after cancellation |
### Business Rules
- Can only cancel orders in pending/confirmed status
- Refund amount depends on cancellation timing
- Must notify customer of cancellation
### Code Locations
- Order: src/domain/order/order.ts
- Payment: src/domain/payment/payment.ts
The skill categorizes discovered concepts using DDD patterns:
| Concept | Description | Indicators |
|---|---|---|
| Entity | Object with identity | Has id/uuid field |
| Value Object | Immutable, no identity | readonly, immutable |
| Aggregate | Cluster with root entity | Contains entities |
| Repository | Persistence interface | find, save, delete methods |
| Service | Stateless operations | Service suffix |
| Event | Something that happened | Past tense name |
| Command | Request to change state | Imperative name |
Config path depends on how the plugin was installed:
| Plugin Scope | Config File | Git |
|---|---|---|
| project | .claude/skills/domain-expert.yaml | Committed (shared) |
| local | .claude/skills/domain-expert.local.yaml | Ignored (personal) |
| user | .claude/skills/domain-expert.local.yaml | Ignored (personal) |
Precedence when reading (first found wins):
.claude/skills/domain-expert.local.yaml.claude/skills/domain-expert.yamlThe domain-expert skill integrates with:
/domain map to understand requestsWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub dohernandez/claude-skills --plugin domain-expert