
Component Identification Sizing
- 166 installs
- 5k repo stars
- Updated August 4, 2026
- tech-leads-club/agent-skills
Use component-identification-sizing for development tasks
About
component-identification-sizing: A skill for development. This provides functionality for development workflows.
- component-identification-sizing
Component Identification Sizing by the numbers
- 166 all-time installs (skills.sh)
- +9 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #2,333 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/tech-leads-club/agent-skills --skill component-identification-sizingAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 166 |
|---|---|
| repo stars | ★ 5k |
| Last updated | August 4, 2026 |
| Repository | tech-leads-club/agent-skills ↗ |
What it does
Use component-identification-sizing for development tasks
Files
Component Identification and Sizing
This skill identifies architectural components (logical building blocks) in a codebase and calculates size metrics to assess decomposition feasibility and identify oversized components.
How to Use
Quick Start
Request analysis of your codebase:
- "Identify and size all components in this codebase"
- "Find oversized components that need splitting"
- "Create a component inventory for decomposition planning"
- "Analyze component size distribution"
Usage Examples
Example 1: Complete Analysis
User: "Identify and size all components in this codebase"
The skill will:
1. Map directory/namespace structures
2. Identify all components (leaf nodes)
3. Calculate size metrics (statements, files, percentages)
4. Generate component inventory table
5. Flag oversized/undersized components
6. Provide recommendationsExample 2: Find Oversized Components
User: "Which components are too large?"
The skill will:
1. Calculate mean and standard deviation
2. Identify components >2 std dev or >10% threshold
3. Analyze functional areas within large components
4. Suggest specific splits with estimated sizesExample 3: Component Size Analysis
User: "Analyze component sizes and distribution"
The skill will:
1. Calculate all size metrics
2. Generate size distribution summary
3. Identify outliers
4. Provide statistics and recommendationsStep-by-Step Process
1. Initial Analysis: Start with complete component inventory 2. Identify Issues: Find components that need attention 3. Get Recommendations: Request actionable split/consolidation suggestions 4. Monitor Progress: Track component growth over time
When to Use
Apply this skill when:
- Starting a monolithic decomposition effort
- Assessing codebase structure and organization
- Identifying components that are too large or too small
- Creating component inventory for migration planning
- Analyzing code distribution across components
- Preparing for component-based decomposition patterns
Core Concepts
Component Definition
A component is an architectural building block that:
- Has a well-defined role and responsibility
- Is identified by a namespace, package structure, or directory path
- Contains source code files (classes, functions, modules) grouped together
- Performs specific business or infrastructure functionality
Key Rule: Components are identified by leaf nodes in directory/namespace structures. If a namespace is extended (e.g., services/billing extended to services/billing/payment), the parent becomes a subdomain, not a component.
Size Metrics
Statements (not lines of code):
- Count executable statements terminated by semicolons or newlines
- More accurate than lines of code for size comparison
- Accounts for code complexity, not formatting
Component Size Indicators:
- Percent of codebase: Component statements / Total statements
- File count: Number of source files in component
- Standard deviation: Distance from mean component size
Analysis Process
Phase 1: Identify Components
Scan the codebase directory structure:
1. Map directory/namespace structure
- For Node.js:
services/,routes/,models/,utils/ - For Java: Package structure (e.g.,
com.company.domain.service) - For Python: Module paths (e.g.,
app/billing/payment)
2. Identify leaf nodes
- Components are the deepest directories containing source files
- Example:
services/BillingService/is a component - Example:
services/BillingService/payment/extends it, makingBillingServicea subdomain
3. Create component inventory
- List each component with its namespace/path
- Note any parent namespaces (subdomains)
Phase 2: Calculate Size Metrics
For each component:
1. Count statements
- Parse source files in component directory
- Count executable statements (not comments, blank lines, or declarations alone)
- Sum across all files in component
2. Count files
- Total source files (
.js,.ts,.java,.py, etc.) - Exclude test files, config files, documentation
3. Calculate percentage
component_percent = (component_statements / total_statements) * 1004. Calculate statistics
- Mean component size:
total_statements / number_of_components - Standard deviation:
sqrt(sum((size - mean)^2) / (n - 1)) - Component's deviation:
(component_size - mean) / std_dev
Phase 3: Identify Size Issues
Oversized Components (candidates for splitting):
- Exceeds 30% of total codebase (for small apps with <10 components)
- Exceeds 10% of total codebase (for large apps with >20 components)
- More than 2 standard deviations above mean
- Contains multiple distinct functional areas
Undersized Components (candidates for consolidation):
- Less than 1% of codebase (may be too granular)
- Less than 1 standard deviation below mean
- Contains only a few files with minimal functionality
Well-Sized Components:
- Between 1-2 standard deviations from mean
- Represents a single, cohesive functional area
- Appropriate percentage for application size
Output Format
Component Inventory Table
## Component Inventory
| Component Name | Namespace/Path | Statements | Files | Percent | Status |
| --------------- | ---------------------------- | ---------- | ----- | ------- | ------------ |
| Billing Payment | services/BillingService | 4,312 | 23 | 5% | ✅ OK |
| Reporting | services/ReportingService | 27,765 | 162 | 33% | ⚠️ Too Large |
| Notification | services/NotificationService | 1,433 | 7 | 2% | ✅ OK |Status Legend:
- ✅ OK: Well-sized (within 1-2 std dev from mean)
- ⚠️ Too Large: Exceeds size threshold or >2 std dev above mean
- 🔍 Too Small: <1% of codebase or <1 std dev below mean
Size Analysis Summary
## Size Analysis Summary
**Total Components**: 18
**Total Statements**: 82,931
**Mean Component Size**: 4,607 statements
**Standard Deviation**: 5,234 statements
**Oversized Components** (>2 std dev or >10%):
- Reporting (33% - 27,765 statements) - Consider splitting into:
- Ticket Reports
- Expert Reports
- Financial Reports
**Well-Sized Components** (within 1-2 std dev):
- Billing Payment (5%)
- Customer Profile (5%)
- Ticket Assignment (9%)
**Undersized Components** (<1 std dev):
- Login (2% - 1,865 statements) - Consider consolidating with AuthenticationComponent Size Distribution
## Component Size DistributionComponent Size Distribution (by percent of codebase)
[Visual representation or histogram if possible]
Largest: ████████████████████████████████████ 33% (Reporting) ████████ 9% (Ticket Assign) ██████ 8% (Ticket) ██████ 6% (Expert Profile) █████ 5% (Billing Payment) ████ 4% (Billing History) ...
````
Recommendations
## Recommendations
### High Priority: Split Large Components
**Reporting Component** (33% of codebase):
- **Current**: Single component with 27,765 statements
- **Issue**: Too large, contains multiple functional areas
- **Recommendation**: Split into:
1. Reporting Shared (common utilities)
2. Ticket Reports (ticket-related reports)
3. Expert Reports (expert-related reports)
4. Financial Reports (financial reports)
- **Expected Result**: Each component ~7-9% of codebase
### Medium Priority: Review Small Components
**Login Component** (2% of codebase):
- **Current**: 1,865 statements, 3 files
- **Consideration**: May be too granular if related to broader authentication
- **Recommendation**: Evaluate if should be consolidated with Authentication/User components
### Low Priority: Monitor Well-Sized Components
Most components are appropriately sized. Continue monitoring during decomposition.Analysis Checklist
Component Identification:
- [ ] Mapped all directory/namespace structures
- [ ] Identified leaf nodes (components) vs parent nodes (subdomains)
- [ ] Created complete component inventory
- [ ] Documented namespace/path for each component
Size Calculation:
- [ ] Counted statements (not lines) for each component
- [ ] Counted source files (excluding tests/configs)
- [ ] Calculated percentage of total codebase
- [ ] Calculated mean and standard deviation
Size Assessment:
- [ ] Identified oversized components (>threshold or >2 std dev)
- [ ] Identified undersized components (<1% or <1 std dev)
- [ ] Flagged components for splitting or consolidation
- [ ] Documented size distribution
Recommendations:
- [ ] Suggested splits for oversized components
- [ ] Suggested consolidations for undersized components
- [ ] Prioritized recommendations by impact
- [ ] Created architecture stories for refactoring
Implementation Notes
For Node.js/Express Applications
Components typically found in:
services/- Business logic componentsroutes/- API endpoint componentsmodels/- Data model componentsutils/- Utility componentsmiddleware/- Middleware components
Example Component Identification:
services/
├── BillingService/ ← Component (leaf node)
│ ├── index.js
│ └── BillingService.js
├── CustomerService/ ← Component (leaf node)
│ └── CustomerService.js
└── NotificationService/ ← Component (leaf node)
└── NotificationService.jsFor Java Applications
Components identified by package structure:
com.company.domain.service- Service componentscom.company.domain.model- Model componentscom.company.domain.repository- Repository components
Example Component Identification:
com.company.billing.payment ← Component (leaf package)
com.company.billing.history ← Component (leaf package)
com.company.billing ← Subdomain (parent of payment/history)Statement Counting
JavaScript/TypeScript:
- Count statements terminated by
;or newline - Include: assignments, function calls, returns, conditionals, loops
- Exclude: comments, blank lines, declarations without assignment
Java:
- Count statements terminated by
; - Include: method calls, assignments, returns, conditionals
- Exclude: class/interface declarations, comments, blank lines
Python:
- Count executable statements (not comments or blank lines)
- Include: assignments, function calls, returns, conditionals
- Exclude: docstrings, comments, blank lines
Fitness Functions
After identifying and sizing components, create automated checks:
Component Size Threshold
// Alert if any component exceeds 10% of codebase
function checkComponentSize(components, threshold = 0.1) {
const totalStatements = components.reduce((sum, c) => sum + c.statements, 0)
return components
.filter((c) => c.statements / totalStatements > threshold)
.map((c) => ({
component: c.name,
percent: ((c.statements / totalStatements) * 100).toFixed(1),
issue: 'Exceeds size threshold',
}))
}Standard Deviation Check
// Alert if component is >2 standard deviations from mean
function checkStandardDeviation(components) {
const sizes = components.map((c) => c.statements)
const mean = sizes.reduce((a, b) => a + b, 0) / sizes.length
const stdDev = Math.sqrt(sizes.reduce((sum, size) => sum + Math.pow(size - mean, 2), 0) / (sizes.length - 1))
return components
.filter((c) => Math.abs(c.statements - mean) > 2 * stdDev)
.map((c) => ({
component: c.name,
deviation: ((c.statements - mean) / stdDev).toFixed(2),
issue: 'More than 2 standard deviations from mean',
}))
}Best Practices
Do's ✅
- Use statements, not lines of code
- Identify components as leaf nodes only
- Calculate both percentage and standard deviation
- Consider application size when setting thresholds
- Document namespace/path for each component
- Create visual size distribution if possible
Don'ts ❌
- Don't count test files in component size
- Don't treat parent directories as components
- Don't use fixed thresholds without considering app size
- Don't ignore small components (may need consolidation)
- Don't skip standard deviation calculation
- Don't mix infrastructure and domain components in same analysis
Next Steps
After completing component identification and sizing:
1. Apply Gather Common Domain Components Pattern - Identify duplicate functionality 2. Apply Flatten Components Pattern - Remove orphaned classes from root namespaces 3. Apply Determine Component Dependencies Pattern - Analyze coupling between components 4. Create Component Domains - Group components into logical domains
Notes
- Component size thresholds vary by application size
- Small apps (<10 components): 30% threshold may be appropriate
- Large apps (>20 components): 10% threshold is more appropriate
- Standard deviation is more reliable than fixed percentages
- Well-sized components are 1-2 standard deviations from mean
- Oversized components often contain multiple functional areas that can be split
Component Identification & Sizing - Quick Reference
Component Definition
Component = Leaf node in directory/namespace structure containing source files
Subdomain = Parent namespace that has been extended (not a component)
Size Metrics
| Metric | How to Calculate | Purpose |
|---|---|---|
| Statements | Count executable statements (not lines) | Accurate size measure |
| Files | Count source files in component | Complexity indicator |
| Percent | (component_statements / total_statements) * 100 | Relative size |
| Std Dev | sqrt(sum((size - mean)^2) / (n-1)) | Outlier detection |
Size Thresholds
| App Size | Oversized Threshold | Notes |
|---|---|---|
| Small (<10 components) | >30% of codebase | Fewer components, higher variance |
| Medium (10-20 components) | >15% of codebase | Balanced threshold |
| Large (>20 components) | >10% of codebase | More components, lower variance |
Standard Deviation Rule: Components >2 std dev from mean are oversized
Component Status
- ✅ OK: Within 1-2 std dev from mean, appropriate size
- ⚠️ Too Large: >2 std dev above mean or exceeds threshold
- 🔍 Too Small: <1 std dev below mean or <1% of codebase
Quick Analysis Steps
1. Map directories → Identify leaf nodes (components) 2. Count statements → Per component, sum across files 3. Calculate stats → Mean, std dev, percentages 4. Flag outliers → >2 std dev or threshold violations 5. Recommend actions → Split large, consolidate small
Common Patterns
Node.js/Express
services/ComponentName/ ← Component
routes/v1/endpoint/ ← Component
models/ModelName/ ← ComponentJava
com.company.domain.service ← Component (leaf package)
com.company.domain ← Subdomain (parent)Python
app/domain/service/ ← Component (leaf module)
app/domain/ ← Subdomain (parent)Output Template
## Component Inventory
| Component | Namespace | Statements | Files | % | Status |
| --------- | --------- | ---------- | ----- | --- | ------ |
| Name | path | 4,312 | 23 | 5% | ✅ OK |
## Summary
- Total: X components
- Mean: Y statements
- Std Dev: Z statements
- Oversized: [list]
- Recommendations: [actions]Component Identification and Sizing Skill
A skill for identifying architectural components in codebases and calculating size metrics to support decomposition planning and migration efforts.
What This Skill Does
This skill analyzes codebases to:
1. Identify architectural components (logical building blocks) from directory/namespace structures 2. Calculate size metrics using statements (not lines of code) for accurate comparison 3. Detect oversized components that exceed thresholds or standard deviations 4. Identify undersized components that may need consolidation 5. Generate component inventory tables with size statistics 6. Provide recommendations for splitting large components or consolidating small ones 7. Assess decomposition feasibility based on component size distribution
When to Use This Skill
This skill is applied when you:
- Ask to analyze codebase structure or organization
- Request component identification or sizing analysis
- Need help planning monolithic decomposition
- Want to find oversized components that need splitting
- Ask about architectural decomposition patterns
- Request component inventory for migration planning
- Discuss codebase metrics or statistics
Key Features
Language & Framework Agnostic
This skill works with any codebase in any language:
- Node.js/Express: Analyzes
services/,routes/,models/directories - Java: Analyzes package structures (e.g.,
com.company.domain.service) - Python: Analyzes module paths (e.g.,
app/billing/payment) - C#/.NET: Analyzes namespace structures
- Any language: Works with directory/namespace patterns
Accurate Size Metrics
Uses statements (not lines of code) for accurate size comparison:
- Accounts for code complexity, not formatting
- More reliable than line counts
- Consistent across different coding styles
- Standard deviation analysis for outlier detection
Actionable Output
Provides concrete, actionable analysis:
- Component inventory tables with size metrics
- Size distribution visualizations
- Oversized component identification with split recommendations
- Undersized component identification with consolidation suggestions
- Fitness function code for automated governance
Files Included
SKILL.md (Main Skill)
The primary skill file containing:
- Component identification methodology
- Size calculation process (statements, files, percentages)
- Standard deviation analysis framework
- Output format templates
- Implementation notes for different languages
- Fitness function examples
- Complete analysis checklist
QUICK-REFERENCE.md (Quick Lookup)
Fast reference for common scenarios:
- Component definition rules
- Size threshold guidelines
- Quick analysis steps
- Common directory patterns
- Output template
README.md (This File)
Complete documentation including:
- What the skill does
- When to use it
- Usage examples
- Core concepts
- Installation and customization
Usage Examples
Example 1: Identify All Components
User: "Identify and size all components in this codebase"
The skill will:
1. Map directory/namespace structures
2. Identify leaf nodes (components)
3. Count statements and files per component
4. Calculate percentages and statistics
5. Generate component inventory table
6. Flag oversized/undersized componentsOutput:
## Component Inventory
| Component Name | Namespace | Statements | Files | Percent | Status |
| ------------------- | ---------------------------- | ---------- | ----- | ------- | ------------ |
| BillingService | services/BillingService | 4,312 | 23 | 5% | ✅ OK |
| ReportingService | services/ReportingService | 27,765 | 162 | 33% | ⚠️ Too Large |
| NotificationService | services/NotificationService | 1,433 | 7 | 2% | ✅ OK |
## Recommendations
- ReportingService (33%) should be split into smaller componentsExample 2: Find Oversized Components
User: "Find components that are too large and need splitting"
The skill will:
1. Calculate mean and standard deviation
2. Identify components >2 std dev or >10% threshold
3. Analyze functional areas within large components
4. Suggest specific splits
5. Estimate resulting component sizesOutput:
## Oversized Components
**ReportingService** (33% - 27,765 statements)
- Exceeds 10% threshold
- Contains multiple functional areas:
- Ticket Reports (8,000 statements)
- Expert Reports (9,000 statements)
- Financial Reports (10,000 statements)
- Shared utilities (765 statements)
**Recommendation**: Split into:
1. ReportingShared (shared utilities)
2. TicketReportsService
3. ExpertReportsService
4. FinancialReportsServiceExample 3: Component Size Analysis
User: "Analyze component sizes and distribution"
The skill will:
1. Calculate all size metrics
2. Generate size distribution
3. Identify outliers
4. Provide summary statistics
5. Create recommendationsOutput:
## Size Analysis Summary
**Total Components**: 18
**Total Statements**: 82,931
**Mean Component Size**: 4,607 statements
**Standard Deviation**: 5,234 statements
**Distribution**:
- Oversized (>2 std dev): 1 component
- Well-sized (within 1-2 std dev): 15 components
- Undersized (<1 std dev): 2 componentsCore Concepts
Component Definition
A component is an architectural building block that:
- Has a well-defined role and responsibility
- Is identified by a leaf node in directory/namespace structure
- Contains source code files grouped together
- Performs specific business or infrastructure functionality
Key Rule: Components are leaf nodes only. If a namespace is extended (e.g., services/billing → services/billing/payment), the parent becomes a subdomain, not a component.
Size Metrics
| Metric | Description | Purpose |
|---|---|---|
| Statements | Count executable statements (terminated by ; or newline) | Accurate size measure, accounts for complexity |
| Files | Count source files in component | Complexity indicator |
| Percent | (component_statements / total_statements) * 100 | Relative size in codebase |
| Std Dev | Standard deviation from mean component size | Outlier detection |
Size Thresholds
Thresholds vary by application size:
| App Size | Oversized Threshold | Notes |
|---|---|---|
| Small (<10 components) | >30% of codebase | Fewer components, higher variance acceptable |
| Medium (10-20 components) | >15% of codebase | Balanced threshold |
| Large (>20 components) | >10% of codebase | More components, lower variance expected |
Standard Deviation Rule: Components >2 standard deviations from mean are considered oversized.
Component Status
- ✅ OK: Within 1-2 std dev from mean, appropriately sized
- ⚠️ Too Large: >2 std dev above mean or exceeds percentage threshold
- 🔍 Too Small: <1 std dev below mean or <1% of codebase
How to Use
Quick Start
Request analysis of your codebase:
"Identify and size all components in this codebase"
"Find oversized components that need splitting"
"Create a component inventory for decomposition planning"
"Analyze component size distribution"Step-by-Step Usage
1. Initial Analysis
Start with a complete component inventory:
User: "Identify all components and calculate their sizes"This will:
- Map your directory structure
- Identify all components (leaf nodes)
- Calculate size metrics
- Generate inventory table
2. Identify Issues
Find components that need attention:
User: "Which components are too large and need splitting?"This will:
- Calculate statistics (mean, std dev)
- Flag oversized components
- Analyze functional areas
- Suggest specific splits
3. Get Recommendations
Request actionable recommendations:
User: "What should I do about oversized components?"This will:
- Prioritize recommendations
- Suggest component splits
- Estimate resulting sizes
- Create architecture stories
4. Monitor Progress
Track changes over time:
User: "Has component X grown too large since last analysis?"This will:
- Compare current vs. previous sizes
- Check against thresholds
- Alert if thresholds exceeded
Advanced Usage
Custom Thresholds
If you have specific size requirements:
User: "Identify components larger than 15% of the codebase"Language-Specific Analysis
For framework-specific analysis:
User: "Analyze components in the services/ directory"Component Grouping
Analyze specific domains:
User: "Size all components in the billing domain"Output Format
The skill generates structured output:
Component Inventory Table
## Component Inventory
| Component Name | Namespace/Path | Statements | Files | Percent | Status |
| ---------------- | ------------------------- | ---------- | ----- | ------- | ------------ |
| BillingService | services/BillingService | 4,312 | 23 | 5% | ✅ OK |
| ReportingService | services/ReportingService | 27,765 | 162 | 33% | ⚠️ Too Large |Size Analysis Summary
## Size Analysis Summary
**Total Components**: 18
**Total Statements**: 82,931
**Mean Component Size**: 4,607 statements
**Standard Deviation**: 5,234 statements
**Oversized Components** (>2 std dev or >10%):
- ReportingService (33% - 27,765 statements)Recommendations
## Recommendations
### High Priority: Split Large Components
**ReportingService** (33% of codebase):
- **Current**: Single component with 27,765 statements
- **Issue**: Too large, contains multiple functional areas
- **Recommendation**: Split into:
1. ReportingShared (common utilities)
2. TicketReportsService
3. ExpertReportsService
4. FinancialReportsService
- **Expected Result**: Each component ~7-9% of codebaseIntegration with Other Skills
This skill is part of a decomposition pattern sequence:
1. Component Identification & Sizing (this skill) → Understand what you have 2. Component Dependency Analysis → Assess coupling and feasibility 3. Common Domain Component Detection → Find duplicate functionality 4. Component Flattening → Remove orphaned classes 5. Domain Identification → Group components into domains 6. Service Boundary Recommendation → Plan service extraction
Use this skill first to establish a baseline before applying other decomposition patterns.
Installation
This skill is installed at the project level:
skills/component-identification-sizing/This means it's:
- Shared with the repository: Anyone cloning this repo gets the skill
- Version controlled: Changes are tracked in git
- Project-specific: Can be customized for this codebase
The skill will be automatically discovered and used when appropriate based on the description in the frontmatter.
Customization
For Project-Specific Patterns
If your project has specific component patterns, document them:
skills/component-identification-sizing/
└── project-patterns.md # Document project-specific component patternsFor Framework-Specific Analysis
Add framework-specific detection patterns:
## Framework: NestJS
**Component Pattern**: `@Injectable()` classes in `services/` directory
**Module Pattern**: `@Module()` decorator groups components
**Controller Pattern**: `@Controller()` in `controllers/` directoryCustom Thresholds
Modify thresholds in SKILL.md for your project:
## Custom Thresholds
For this project:
- Oversized: >12% of codebase (instead of default 10%)
- Undersized: <0.5% of codebase (instead of default 1%)Fitness Functions
After identifying components, create automated checks:
Component Size Check
// Alert if component exceeds threshold
function checkComponentSize(component, totalStatements, threshold = 0.1) {
const percent = component.statements / totalStatements
if (percent > threshold) {
return {
component: component.name,
percent: (percent * 100).toFixed(1),
issue: 'Exceeds size threshold',
}
}
}Standard Deviation Check
// Alert if component is >2 std dev from mean
function checkStandardDeviation(component, mean, stdDev) {
const deviation = Math.abs(component.statements - mean) / stdDev
if (deviation > 2) {
return {
component: component.name,
deviation: deviation.toFixed(2),
issue: 'More than 2 standard deviations from mean',
}
}
}Best Practices
Do's ✅
- Use statements, not lines of code
- Identify components as leaf nodes only
- Calculate both percentage and standard deviation
- Consider application size when setting thresholds
- Document namespace/path for each component
- Create visual size distribution if possible
- Monitor component growth over time
Don'ts ❌
- Don't count test files in component size
- Don't treat parent directories as components
- Don't use fixed thresholds without considering app size
- Don't ignore small components (may need consolidation)
- Don't skip standard deviation calculation
- Don't mix infrastructure and domain components in same analysis
Validation
To verify the skill works correctly, try:
User: "Identify and size all components in this codebase"The skill should:
1. Read the SKILL.md file 2. Map directory/namespace structures 3. Identify leaf nodes (components) 4. Calculate size metrics 5. Generate component inventory table 6. Flag oversized/undersized components 7. Provide recommendations
Troubleshooting
Components Not Identified
Issue: Components are not found in your structure
Solution:
- Check if directories follow expected patterns
- Verify source files exist in component directories
- Ensure leaf nodes contain actual code files
Incorrect Size Calculations
Issue: Size metrics seem wrong
Solution:
- Verify statement counting logic matches your language
- Check if test files are being excluded
- Ensure all source files are being counted
Thresholds Too Strict/Loose
Issue: Too many/few components flagged
Solution:
- Adjust thresholds in SKILL.md for your app size
- Use standard deviation instead of fixed percentages
- Consider your specific decomposition goals
References
This skill is based on:
- Software Architecture: The Hard Parts by Neal Ford, Mark Richards, Pramod Sadalage, Zhamak Dehghani
- Component-Based Decomposition Patterns (Chapter 5)
- Fundamentals of Software Architecture by Mark Richards & Neal Ford
Contributing
To improve this skill:
1. Add language-specific statement counting patterns 2. Expand framework-specific component detection 3. Add more size distribution visualization options 4. Document new anti-patterns or red flags 5. Share real-world case studies
Version
Version: 1.0.0 Created: 2026-02-05 Based on: Component-Based Decomposition Patterns from "Software Architecture: The Hard Parts"
---
Quick Start
To use this skill immediately:
User: "Identify and size all components in my codebase"
User: "Find oversized components that need splitting"
User: "Create a component inventory for decomposition planning"
User: "Analyze component size distribution"This skill will automatically be applied to provide comprehensive analysis with actionable recommendations.