Langsung ke konten
Skillpedia
Pemrograman umum7.1k · #13501

component-identification-sizing

Fungsinya

Skill ini membuat AI mendaftar blok bangunan basis kode dan mengukur seberapa besar masing-masing. Skill ini ditujukan untuk tim yang berencana memecah aplikasi besar dan perlu tahu dari mana harus mulai.

Kapan dipakai

  • ✓Saat Anda ingin tahu seberapa besar setiap modul atau layanan dalam basis kode Anda.
  • ✓Ketika Anda menduga salah satu bagian aplikasi terlalu besar dan perlu dipecah.
  • ✓Ketika Anda merencanakan pemecahan aplikasi besar dan membutuhkan inventaris terlebih dahulu.

Link skill

https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/component-identification-sizing/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/component-identification-sizing/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Tunjukkan komponen di basis kode kami, ukurannya, dan mana yang tampaknya terlalu besar untuk dibiarkan seperti sekarang.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

AI memetakan folder dan namespace, menghitung pernyataan dan file untuk setiap komponen, dan menandai ukuran yang luar biasa besar dibandingkan yang lain.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum

Apakah skill ini mengukur seberapa cepat aplikasi berjalan?

Tidak. Skill ini mengukur ukuran kode, bukan kinerja saat berjalan atau kapasitas server.

Bagaimana AI memutuskan sesuatu terlalu besar?

AI membandingkan setiap komponen dengan rata-rata dan menandai yang menyimpang.

Bisakah AI menyarankan tempat pemecahan?

Bisa. AI mengusulkan pemecahan spesifik dengan perkiraan ukuran kasar.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
7.1k
Peringkat
#13501
Lisensi
—
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa