component-identification-sizing
하는 일
이 스킬은 AI가 코드베이스의 구성 요소를 나열하고 각각의 크기를 측정하게 합니다. 큰 애플리케이션을 나누려고 하며, 어디서부터 시작할지 알아야 하는 팀을 위한 것입니다.
사용하는 경우
- ✓코드베이스의 각 모듈이나 서비스가 얼마나 큰지 알고 싶을 때.
- ✓앱의 한 부분이 너무 커서 나눠야 할 것 같을 때.
- ✓큰 앱을 나누는 계획을 세우는데, 먼저 목록이 필요할 때.
스킬 링크
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/component-identification-sizing/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 코드베이스의 컴포넌트와 크기를 보여 주세요. 그대로 두기에 너무 커 보이는 것이 무엇인지도 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 폴더와 네임스페이스를 정리하고, 각 컴포넌트의 문장 수와 파일 수를 세며, 다른 것들에 비해 비정상적으로 큰 크기를 표시합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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 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
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:
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)
- For Node.js:
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
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)
- Sum across all files in component
Count files
- Total source files (
.js,.ts,.java,.py, etc.) - Exclude test files, config files, documentation
- Total source files (
Calculate percentage
component_percent = (component_statements / total_statements) * 100Calculate statistics
- Mean component size:
total_statements / number_of_components - Standard deviation:
sqrt(sum((size - mean)^2) / (n - 1)) - Component's d
- Mean component size:
자주 묻는 질문
앱이 얼마나 빠르게 실행되는지도 측정하나요?
아니요. 코드 크기를 측정하며, 실행 성능이나 서버 용량은 측정하지 않습니다.
크다고 판단하는 기준은 무엇인가요?
각 컴포넌트를 평균과 비교해서 이상값을 표시합니다.
어디를 나눌지도 제안하나요?
네. 대략적인 예상 크기와 함께 구체적인 분할 방안을 제안합니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 7.1k
- 순위
- #13501
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
component-common-domain-detection
7.1k에이전트가 코드베이스의 여러 부분에 반복되는 비즈니스 로직을 찾아, 그것을 어떻게 합칠지 제안하도록 돕습니다.
component-flattening-analysis
7.1k에이전트가 잘못 놓인 코드를 찾고, 복잡한 컴포넌트 폴더 구조를 평평하게 정리해 각 조각이 제자리에 있도록 돕습니다.
coupling-analysis
7.1k에이전트가 코드베이스의 부분들이 서로 얼마나 단단히 묶여 있는지 확인하고, 먼저 느슨하게 만들 연결을 알려 주도록 돕습니다.
decomposition-planning-roadmap
7.1k에이전트가 큰 앱을 별도 서비스로 나누는 단계별 순서를 우선순위와 단계와 함께 계획하도록 돕습니다.