Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Maps business domains and suggests service boundaries in any codebase using DDD Strategic Design. Use when asking "what are the domains in this codebase?", "where should I draw service boundaries?", "identify bounded contexts", "classify subdomains", "DDD analysis", or analyzing domain cohesion. Do NOT use for grouping existing components into domains (use domain-identification-grouping) or dependency analysis (use coupling-analysis).
.claude/skills/tech-leads-club-domain-analysis/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 92% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 85% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 160% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 96% | 0% |
This skill analyzes codebases to identify subdomains (Core, Supporting, Generic) and suggest bounded contexts following Domain-Driven Design Strategic Design principles.
Apply this skill when:
Core Domain: Competitive advantage, highest business value, requires best developers
Supporting Subdomain: Essential but not differentiating, business-specific
Generic Subdomain: Common functionality, could be outsourced
An explicit linguistic boundary where domain terms have specific, unambiguous meanings.
Scan codebase for business concepts (not infrastructure):
@Entity, class, domain models*Service, *Manager, *Handler*UseCase, *Command, *Handler*Controller, *Resolver, API endpointsFor each concept, determine:
Primary Language Context
Subscription, Invoice, Payment → Billing languageMovie, Video, Episode → Content languageUser, Authentication → Identity languageLinguistic Boundaries
Concept Relationships
A subdomain has:
Common Domain Patterns:
Classify Each Subdomain:
Use this decision tree:
Is it a competitive advantage?
YES → Core Domain
NO → Does it require business-specific knowledge?
YES → Supporting Subdomain
NO → Generic SubdomainHigh Cohesion Indicators ✅
Low Cohesion Indicators ❌
Cohesion Score Formula:
Score = (
Linguistic Cohesion (0-3) + // Shared vocabulary
Usage Cohesion (0-3) + // Used together
Data Cohesion (0-2) + // Entity relationships
Change Cohesion (0-2) // Change together
) / 10
8-10: High Cohesion ✅
5-7: Medium Cohesion ⚠️
0-4: Low Cohesion ❌Rule 1: Linguistic Mismatch
User (identity) + Subscription (billing) in same serviceRule 2: Cross-Domain Dependencies
Rule 3: Mixed Responsibilities
Rule 4: Generic in Core
Rule 5: Unclear Boundaries
For each subdomain identified, suggest bounded context:
Bounded Context Characteristics:
Integration Patterns:
For each domain/subdomain:
markdown## Domain: {Name} **Type**: Core Domain | Supporting Subdomain | Generic Subdomain **Ubiquitous Language**: {key business terms} **Business Capability**: {what business problem it solves} **Key Concepts**: - {Concept} (Entity|Service|UseCase) - {brief description} **Subdomains** (if applicable): 1. {Subdomain} (Core|Supporting|Generic) - Concepts: {list} - Cohesion: {score}/10 - Dependencies: → {other domains} **Suggested Bounded Context**: {Name}Context - Linguistic boundary: {where terms have specific meaning} - Integration: {how it should integrate with other contexts} **Dependencies**: - → {OtherDomain} via {interface/API} - ← {OtherDomain} via {interface/API} **Cohesion Score**: {score}/10
markdown## Cross-Domain Cohesion | Domain A | Domain B | Cohesion | Issue | Recommendation | | -------- | -------- | -------- | ------------------ | ----------------------- | | Billing | Identity | 2/10 | ❌ Direct coupling | Use interface | | Content | Billing | 6/10 | ⚠️ Usage tracking | Event-based integration |
markdown## Issues Detected ### Priority: High **Issue**: {description} - **Location**: {file/class/method} - **Problem**: {what's wrong} - **Concepts**: {involved concepts} - **Cohesion**: {score}/10 - **Recommendation**: {suggested fix} ### Priority: Medium {similar format}
markdown## Suggested Bounded Contexts ### {ContextName}Context **Contains Subdomains**: - {Subdomain1} (Core) - {Subdomain2} (Supporting) **Ubiquitous Language**: - Term: Definition in this context **Integration Requirements**: - Consumes from: {OtherContext} via {pattern} - Publishes to: {OtherContext} via {pattern} **Implementation Notes**: - Separate persistence - Independent deployment - Explicit API boundaries
For Each Concept:
For Each Domain:
For Cohesion Analysis:
Analyze business capability
└─ Is it competitive advantage?
├─ YES → Core Domain
└─ NO → Is it business-specific?
├─ YES → Supporting Subdomain
└─ NO → Generic SubdomainSame vocabulary? → High linguistic cohesion
Used together? → High usage cohesion
Direct relationships? → High data cohesion
Change together? → High change cohesion
All high → Strong subdomain candidate
Mix of high/low → Review boundaries
All low → Likely wrong groupingClear boundary signs:
✅ Distinct Ubiquitous Language
✅ Concepts have unambiguous meaning
✅ Different meanings across contexts
✅ Clear integration points
Unclear boundary signs:
❌ Same terms with same meanings everywhere
❌ Concepts used identically across system
❌ No clear linguistic differences
❌ Tight coupling everywhereBig Ball of Mud
All-Inclusive Model
Mixed Linguistic Concepts
Good domain identification has:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-20 | fail→fail | 21,364 | 15,282 | -28% | 1 | 1 | 0% | 4,697 | 5,873 | +25% | 0 | 0 | — |
case-03 | fail→pass | 35,282 | 24,239 | -31% | 1 | 1 | 0% | 6,202 | 7,017 | +13% | 0 | 0 | — |
case-01 | fail→fail | 34,033 | 23,930 | -30% | 1 | 1 | 0% | 6,205 | 6,929 | +12% | 0 | 0 | — |
case-02 | fail→pass | 23,873 | 29,188 | +22% | 1 | 1 | 0% | 4,261 | 8,172 | +92% | 0 | 0 | — |
case-09 | pass→pass | 14,096 | 10,985 | -22% | 1 | 1 | 0% | 2,453 | 4,424 | +80% | 0 | 0 | — |
case-04 | pass→pass | 10,901 | 10,834 | -1% | 1 | 1 | 0% | 1,886 | 4,410 | +134% | 0 | 0 | — |
case-05 | fail→fail | 14,403 | 12,845 | -11% | 1 | 1 | 0% | 2,196 | 4,791 | +118% | 0 | 0 | — |
case-06 | pass→pass | 7,911 | 3,939 | -50% | 1 | 1 | 0% | 1,520 | 3,405 | +124% | 0 | 0 | — |
case-07 | fail→pass | 12,435 | 7,041 | -43% | 1 | 1 | 0% | 2,024 | 3,751 | +85% | 0 | 0 | — |
case-08 | pass→pass | 10,770 | 7,189 | -33% | 1 | 1 | 0% | 1,815 | 3,877 | +114% | 0 | 0 | — |
case-10 | pass→pass | 13,612 | 15,384 | +13% | 1 | 1 | 0% | 2,364 | 5,140 | +117% | 0 | 0 | — |
case-11 | pass→pass | 26,433 | 10,574 | -60% | 1 | 1 | 0% | 1,976 | 4,503 | +128% | 0 | 0 | — |
case-12 | pass→pass | 68,348 | 7,794 | -89% | 1 | 1 | 0% | 1,134 | 3,853 | +240% | 0 | 0 | — |
case-13 | fail→pass | 9,622 | 7,822 | -19% | 1 | 1 | 0% | 1,544 | 4,008 | +160% | 0 | 0 | — |
case-14 | pass→pass | 47,479 | 4,756 | -90% | 1 | 1 | 0% | 1,332 | 3,429 | +157% | 0 | 0 | — |
case-15 | fail→pass | 12,834 | 8,235 | -36% | 1 | 1 | 0% | 1,986 | 3,892 | +96% | 0 | 0 | — |
case-16 | pass→pass | 5,550 | 3,371 | -39% | 1 | 1 | 0% | 1,030 | 3,209 | +212% | 0 | 0 | — |
case-17 | fail→fail | 20,296 | 13,689 | -33% | 1 | 1 | 0% | 2,944 | 5,029 | +71% | 0 | 0 | — |
case-18 | pass→pass | 10,938 | 9,535 | -13% | 1 | 1 | 0% | 1,711 | 4,112 | +140% | 0 | 0 | — |
case-19 | fail→pass | 15,449 | 18,195 | +18% | 1 | 1 | 0% | 2,768 | 5,971 | +116% | 0 | 0 | — |
case-21 | fail→fail | 11,150 | 10,497 | -6% | 1 | 1 | 0% | 2,164 | 4,417 | +104% | 0 | 0 | — |
case-22 | fail→fail | 16,466 | 17,471 | +6% | 1 | 1 | 0% | 3,464 | 6,147 | +77% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +27 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.