domain-analysis
What it does
This skill has the AI identify the main business areas of a codebase, label them as core, supporting or generic, and suggest bounded contexts. It is for developers and architects who want service boundaries that match the business.
When to use it
- βWhen you want to know what business domains exist in a codebase.
- βWhen you need to decide where to draw boundaries between services.
- βWhen you want to check whether the parts of a system match the business areas.
Skill link
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/domain-analysis/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βWhat are the main business domains in our codebase, and where should the service boundaries go?β
5 new skills a week. 1 minute to read.
How it works
The AI reads the code for business language and rules, groups them into subdomains, then suggests bounded contexts where each term has one clear meaning.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Subdomain Identification & Bounded Context Analysis
This skill analyzes codebases to identify subdomains (Core, Supporting, Generic) and suggest bounded contexts following Domain-Driven Design Strategic Design principles.
When to Use
Apply this skill when:
- Analyzing domain boundaries in any codebase
- Identifying Core, Supporting, and Generic subdomains
- Mapping bounded contexts from problem space to solution space
- Assessing domain cohesion and detecting coupling issues
- Planning domain-driven refactoring
- Understanding business capabilities in code
Core Principles
Subdomain Classification
Core Domain: Competitive advantage, highest business value, requires best developers
- Indicators: Complex business logic, frequent changes, domain experts needed
Supporting Subdomain: Essential but not differentiating, business-specific
- Indicators: Supports Core Domain, moderate complexity, business-specific rules
Generic Subdomain: Common functionality, could be outsourced
- Indicators: Well-understood problem, low differentiation, standard functionality
Bounded Context
An explicit linguistic boundary where domain terms have specific, unambiguous meanings.
- Primary nature: Linguistic boundary, not technical
- Key rule: Inside boundary, all Ubiquitous Language terms are unambiguous
- Goal: Align 1 subdomain to 1 bounded context (ideal)
Analysis Process
Phase 1: Extract Concepts
Scan codebase for business concepts (not infrastructure):
Entities (domain models with identity)
- Patterns:
@Entity,class, domain models - Focus: Business concepts, not technical classes
- Patterns:
Services (business operations)
- Patterns:
*Service,*Manager,*Handler - Focus: Business logic, not technical utilities
- Patterns:
Use Cases (business workflows)
- Patterns:
*UseCase,*Command,*Handler - Focus: Business processes, not CRUD
- Patterns:
Controllers/Resolvers (entry points)
- Patterns:
*Controller,*Resolver, API endpoints - Focus: Business capabilities, not technical routes
- Patterns:
Phase 2: Group by Ubiquitous Language
For each concept, determine:
Primary Language Context
- What business vocabulary does this belong to?
- Examples:
Subscription,Invoice,Paymentβ Billing languageMovie,Video,Episodeβ Content languageUser,Authenticationβ Identity language
Linguistic Boundaries
- Where do term meanings change?
- Same term, different meaning = different bounded context
- Example: "Customer" in Sales vs "Customer" in Support
Concept Relationships
- Which concepts naturally belong together?
- Which share business vocabulary?
- Which reference each other?
Phase 3: Identify Subdomains
A subdomain has:
- Distinct business capability
- Independent business value
- Unique vocabulary
- Multiple related entities working together
- Cohesive set of business operations
Common Domain Patterns:
- Billing/Subscription: Payments, invoices, plans
- Content/Catalog: Media, products, inventory
- Identity/Access: Users, authentication, authorization
- Analytics: Metrics, dashboards, insights
- Notifications: Messages, alerts, communications
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 Subdomain
Phase 4: Assess Cohesion
High Cohesion Indicators β
- Concepts share Ubiquitous Language
- Concepts frequently used together
- Direct business relationships
- Changes to one affect others in group
- Solve same business problem
Low Cohesion Indicators β
- Different business vocabularies mixed
- Concepts rarely used together
- No direct business relationship
- Changes don't affect others
- Solve different business problems
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 β
Phase 5: Detect Low Cohesion Issues
Rule 1: Linguistic Mismatch
- Problem: Different business vocabularies mixed
- Example:
User(identity) +Subscription(billing) in same service - Action: Suggest separation into different bounded contexts
**Rule 2: Cross-
FAQ
What is a bounded context?
It is an area of the system where each business term has one clear meaning.
Does it group existing components?
No. Grouping existing components into domains is a separate skill.
What are core, supporting and generic domains?
Core areas give a competitive edge, supporting areas help the core, and generic areas are common and could be outsourced.
Details
Original description by the author
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).
Popularity
- GitHub stars
- 7.1k
- Ranking position
- #13504
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
component-common-domain-detection
7.1kHelps your agent find business logic that is repeated across several parts of a codebase and suggests how to combine it.
component-flattening-analysis
7.1kHelps your agent find misplaced code and flatten messy component folder structures, so each piece sits where it belongs.
component-identification-sizing
7.1kHelps your agent map the parts of a codebase and measure their size, to find which module to split first.
coupling-analysis
7.1kHelps your agent check how tightly parts of a codebase depend on each other, and which connections to loosen first.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.