Component Identification and Sizing workflow skill. Use this skill when the user needs Maps architectural components in a codebase and measures their size to identify what should be extracted first. Use when asking "how big is each module?", "what components do I have?", "which service is too large?", "analyze codebase structure", "size my monolith", or planning where to start decomposing. Do NOT use for runtime performance sizing or infrastructure capacity planning and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
component-identification-sizing
description
Component Identification and Sizing workflow skill. Use this skill when the user needs Maps architectural components in a codebase and measures their size to identify what should be extracted first. Use when asking "how big is each module?", "what components do I have?", "which service is too large?", "analyze codebase structure", "size my monolith", or planning where to start decomposing. Do NOT use for runtime performance sizing or infrastructure capacity planning and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.
This public intake copy packages packages/skills-catalog/skills/(architecture)/component-identification-sizing from https://github.com/tech-leads-club/agent-skills into the native Omni Skills editorial shape without hiding its origin.
Use it when the operator needs the upstream workflow, support files, and repository context to stay intact while the public validator and private enhancer continue their normal downstream flow.
This intake keeps the copied upstream files intact and uses the external_source block in metadata.json plus ORIGIN.md as the provenance anchor for review.
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.
Imported source sections that did not map cleanly to the public headings are still preserved below or in the support files. Notable imported sections: How to Use, Core Concepts, Output Format, Component Inventory, Size Analysis Summary, Component Size Distribution.
When to Use This Skill
Use this section as the trigger filter. It should make the activation boundary explicit before the operator loads files, runs commands, or opens a pull request.
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
Operating Table
Situation
Start here
Why it matters
First-time use
metadata.json
Confirms repository, branch, commit, and imported path through the external_source block before touching the copied workflow
Provenance review
ORIGIN.md
Gives reviewers a plain-language audit trail for the imported source
Workflow execution
QUICK-REFERENCE.md
Starts with the smallest copied file that materially changes execution
Supporting context
README.md
Adds the next most relevant copied source file without loading the entire package
Handoff decision
## Related Skills
Helps the operator switch to a stronger native skill when the task drifts
Workflow
This workflow is intentionally editorial and operational at the same time. It keeps the imported source useful to the operator while still satisfying the public intake standards that feed the downstream enhancer flow.
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)
Identify leaf nodes
Components are the deepest directories containing source files
Example: services/BillingService/ is a component
Imported Workflow Notes
Imported: Analysis Process
Phase 1: Identify Components
Scan the codebase directory structure:
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)
Identify leaf nodes
Components are the deepest directories containing source files
Example: services/BillingService/ is a component
Example: services/BillingService/payment/ extends it, making BillingService a subdomain
Create component inventory
List each component with its namespace/path
Note any parent namespaces (subdomains)
Phase 2: Calculate Size Metrics
For each component:
Count statements
Parse source files in component directory
Count executable statements (not comments, blank lines, or declarations alone)
Apply Determine Component Dependencies Pattern - Analyze coupling between components
Create Component Domains - Group components into logical domains
Imported: 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 recommendations
Example 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 sizes
Example 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 recommendations
Step-by-Step Process
Initial Analysis: Start with complete component inventory
Identify Issues: Find components that need attention
Get Recommendations: Request actionable split/consolidation suggestions
Monitor Progress: Track component growth over time
Examples
Example 1: Ask for the upstream workflow directly
Use @component-identification-sizing to handle <task>. Start from the copied upstream workflow, load only the files that change the outcome, and keep provenance visible in the answer.
Explanation: This is the safest starting point when the operator needs the imported workflow, but not the entire repository.
Example 2: Ask for a provenance-grounded review
Review @component-identification-sizing against metadata.json and ORIGIN.md, then explain which copied upstream files you would load first and why.
Explanation: Use this before review or troubleshooting when you need a precise, auditable explanation of origin and file selection.
Example 3: Narrow the copied support files before execution
Use @component-identification-sizing for <task>. Load only the copied references, examples, or scripts that change the outcome, and name the files explicitly before proceeding.
Explanation: This keeps the skill aligned with progressive disclosure instead of loading the whole copied package by default.
Example 4: Build a reviewer packet
Review @component-identification-sizing using the copied upstream files plus provenance, then summarize any gaps before merge.
Explanation: This is useful when the PR is waiting for human review and you want a repeatable audit packet.
Best Practices
Treat the generated public skill as a reviewable packaging layer around the upstream repository. The goal is to keep provenance explicit and load only the copied source material that materially improves execution.
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't count test files in component size
Imported Operating Notes
Imported: 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
Troubleshooting
Problem: The operator skipped the imported context and answered too generically
Symptoms: The result ignores the upstream workflow in packages/skills-catalog/skills/(architecture)/component-identification-sizing, fails to mention provenance, or does not use any copied source files at all.
Solution: Re-open metadata.json, ORIGIN.md, and the most relevant copied upstream files. Check the external_source block first, then restate the provenance before continuing.
Problem: The imported workflow feels incomplete during review
Symptoms: Reviewers can see the generated SKILL.md, but they cannot quickly tell which references, examples, or scripts matter for the current task.
Solution: Point at the exact copied references, examples, scripts, or assets that justify the path you took. If the gap is still real, record it in the PR instead of hiding it.
Problem: The task drifted into a different specialization
Symptoms: The imported skill starts in the right place, but the work turns into debugging, architecture, design, security, or release orchestration that a native skill handles better.
Solution: Use the related skills section to hand off deliberately. Keep the imported provenance visible so the next skill inherits the right context instead of starting blind.
Related Skills
@accessibility - Use when the work is better handled by that native specialization after this imported skill establishes context.
@ai-cold-outreach - Use when the work is better handled by that native specialization after this imported skill establishes context.
@ai-pricing - Use when the work is better handled by that native specialization after this imported skill establishes context.
@ai-sdr - Use when the work is better handled by that native specialization after this imported skill establishes context.
Additional Resources
Use this support matrix and the linked files below as the operator packet for this imported skill. They should reflect real copied source material, not generic scaffolding.
Resource family
What it gives the reviewer
Example path
references
copied reference notes, guides, or background material from upstream
references/n/a
examples
worked examples or reusable prompts copied from upstream
examples/n/a
scripts
upstream helper scripts that change execution or validation
scripts/n/a
agents
routing or delegation notes that are genuinely part of the imported package
agents/n/a
assets
supporting assets or schemas copied from the source package
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
### Recommendations
```markdown
#### Imported: 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.
Imported: 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