본문으로 건너뛰기
Skillpedia
일반 코딩7.1k · #13501

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/component-identification-sizing/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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

  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, making BillingService a 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) * 100
    
  4. Calculate statistics

    • Mean component size: total_statements / number_of_components
    • Standard deviation: sqrt(sum((size - mean)^2) / (n - 1))
    • Component's d
자주 묻는 질문

앱이 얼마나 빠르게 실행되는지도 측정하나요?

아니요. 코드 크기를 측정하며, 실행 성능이나 서버 용량은 측정하지 않습니다.

크다고 판단하는 기준은 무엇인가요?

각 컴포넌트를 평균과 비교해서 이상값을 표시합니다.

어디를 나눌지도 제안하나요?

네. 대략적인 예상 크기와 함께 구체적인 분할 방안을 제안합니다.

상세 정보

작성자의 원본 설명

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.

repo: tech-leads-club/agent-skills

인기도

GitHub 스타
7.1k
순위
#13501
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬