30eggis

spec-component-loader

by @30eggis in Tools
0
0
# Install this skill:
npx skills add 30eggis/claude-frontend-skills --skill "spec-component-loader"

Install specific skill from multi-skill repository

# Description

|

# SKILL.md


name: spec-component-loader
description: |
μ μ§„μ μœΌλ‘œ μ»΄ν¬λ„ŒνŠΈ μŠ€νŽ™μ„ λ‘œλ”©ν•©λ‹ˆλ‹€.
μΉ΄ν…Œκ³ λ¦¬λ³„, μš°μ„ μˆœμœ„λ³„, μ˜μ‘΄μ„± 기반 λ‘œλ”© 지원.
Agent의 μ»¨ν…μŠ€νŠΈ νš¨μœ¨μ„±μ„ μœ„ν•΄ ν•„μš”ν•œ λΆ€λΆ„λ§Œ μ„ νƒμ μœΌλ‘œ λ‘œλ”©ν•©λ‹ˆλ‹€.
allowed-tools: Read, Glob, Grep
argument-hint: " [--list] [--category ] [--name ] [--with-deps] [--gap]"
permissionMode: bypassPermissions


spec-component-loader

μ»΄ν¬λ„ŒνŠΈ μŠ€νŽ™μ„ μ μ§„μ μœΌλ‘œ λ‘œλ”©ν•˜μ—¬ Agent의 μ»¨ν…μŠ€νŠΈλ₯Ό 효율적으둜 κ΄€λ¦¬ν•©λ‹ˆλ‹€.

μ‚¬μš© λͺ©μ 

  • μ»΄ν¬λ„ŒνŠΈ μŠ€νŽ™μ΄ 많으면 Agent 호좜 μ‹œ μ»¨ν…μŠ€νŠΈ 초과 μœ„ν—˜
  • ν•„μš”ν•œ μ»΄ν¬λ„ŒνŠΈλ§Œ μ μ§„μ μœΌλ‘œ λ‘œλ”©
  • μ˜μ‘΄μ„± κ·Έλž˜ν”„λ₯Ό κ³ λ €ν•œ 효율적인 κ΅¬ν˜„ μˆœμ„œ 제곡

μ‚¬μš©λ²•

전체 μ»΄ν¬λ„ŒνŠΈ λͺ©λ‘

/spec-component-loader {spec-folder} --list

좜λ ₯:

# μ»΄ν¬λ„ŒνŠΈ λͺ©λ‘

## μΉ΄ν…Œκ³ λ¦¬λ³„ λΆ„λ₯˜

### Layout (4개)
- Header
- Sidebar
- Footer
- MainLayout

### Cards (6개)
- StockCard
- PortfolioCard
- NewsCard
- AlertCard
- WatchlistCard
- SummaryCard

### Display (8개)
- PriceDisplay
- ChangeIndicator
- Sparkline
- ChartWidget
- DataTable
- Badge
- Tooltip
- Avatar

### Forms (5개)
- SearchInput
- OrderForm
- AlertForm
- SettingsForm
- LoginForm

### Feedback (3개)
- Toast
- LoadingSpinner
- ErrorBoundary

## μ˜μ‘΄μ„± μš”μ•½
| μ»΄ν¬λ„ŒνŠΈ | 의쑴 | ν”Όμ˜μ‘΄ | λ³΅μž‘λ„ |
|----------|------|--------|--------|
| StockCard | 3 | 5 | HIGH |
| PriceDisplay | 1 | 8 | MEDIUM |
| Header | 2 | 1 | LOW |

μΉ΄ν…Œκ³ λ¦¬λ³„ λ‘œλ”©

/spec-component-loader {spec-folder} --category layout
/spec-component-loader {spec-folder} --category cards
/spec-component-loader {spec-folder} --category display
/spec-component-loader {spec-folder} --category forms

좜λ ₯: ν•΄λ‹Ή μΉ΄ν…Œκ³ λ¦¬μ˜ λͺ¨λ“  μ»΄ν¬λ„ŒνŠΈ μŠ€νŽ™ 전체 λ‚΄μš©

νŠΉμ • μ»΄ν¬λ„ŒνŠΈ λ‘œλ”©

/spec-component-loader {spec-folder} --name StockCard
/spec-component-loader {spec-folder} --name PriceDisplay

좜λ ₯: ν•΄λ‹Ή μ»΄ν¬λ„ŒνŠΈμ˜ μŠ€νŽ™ 전체 λ‚΄μš©

μ˜μ‘΄μ„± 포함 λ‘œλ”©

/spec-component-loader {spec-folder} --name StockCard --with-deps

좜λ ₯:

# StockCard + μ˜μ‘΄μ„±

## μ˜μ‘΄μ„± 트리
StockCard
β”œβ”€β”€ PriceDisplay (display)
β”œβ”€β”€ ChangeIndicator (display)
└── Sparkline (display)

## 1. PriceDisplay (μ˜μ‘΄μ„±)
{PriceDisplay spec content}

## 2. ChangeIndicator (μ˜μ‘΄μ„±)
{ChangeIndicator spec content}

## 3. Sparkline (μ˜μ‘΄μ„±)
{Sparkline spec content}

## 4. StockCard (λŒ€μƒ)
{StockCard spec content}

Gap Analysis (λ―Έκ΅¬ν˜„ μ»΄ν¬λ„ŒνŠΈ)

/spec-component-loader {spec-folder} --gap

좜λ ₯:

# μ»΄ν¬λ„ŒνŠΈ Gap Analysis

## λ―Έκ΅¬ν˜„ μ»΄ν¬λ„ŒνŠΈ (12개)

### μš°μ„ μˆœμœ„λ³„
| μš°μ„ μˆœμœ„ | μ»΄ν¬λ„ŒνŠΈ | μΉ΄ν…Œκ³ λ¦¬ | λ³΅μž‘λ„ |
|----------|----------|----------|--------|
| P0 | StockCard | cards | HIGH |
| P0 | PriceDisplay | display | MEDIUM |
| P1 | Header | layout | LOW |
| ... |

## ꢌμž₯ κ΅¬ν˜„ μˆœμ„œ
1. PriceDisplay (display) - μ˜μ‘΄μ„± μ—†μŒ, 8개 μ»΄ν¬λ„ŒνŠΈκ°€ 의쑴
2. ChangeIndicator (display) - μ˜μ‘΄μ„± μ—†μŒ, 5개 μ»΄ν¬λ„ŒνŠΈκ°€ 의쑴
3. Sparkline (display) - μ˜μ‘΄μ„± μ—†μŒ, 3개 μ»΄ν¬λ„ŒνŠΈκ°€ 의쑴
4. StockCard (cards) - μœ„ 3개 의쑴, P0 μš°μ„ μˆœμœ„
...

## κ΅¬ν˜„ 배치 (병렬화 κ°€λŠ₯)
### Batch 1 (μ˜μ‘΄μ„± μ—†μŒ)
- PriceDisplay
- ChangeIndicator
- Sparkline
- Badge

### Batch 2 (Batch 1 μ™„λ£Œ ν›„)
- StockCard
- PortfolioCard
- AlertCard

### Batch 3
...

Spec 폴더 ꡬ쑰

{spec-folder}/03-components/
β”œβ”€β”€ component-inventory.md     β†’ 전체 μ»΄ν¬λ„ŒνŠΈ λͺ©λ‘
β”œβ”€β”€ gap-analysis.md            β†’ Gap 뢄석 κ²°κ³Ό
└── specs/
    β”œβ”€β”€ layout/
    β”‚   β”œβ”€β”€ Header.md          β†’ Markdown (legacy)
    β”‚   β”œβ”€β”€ Header.yaml        β†’ YAML (preferred)
    β”‚   β”œβ”€β”€ Sidebar.md
    β”‚   └── Footer.md
    β”œβ”€β”€ cards/
    β”‚   β”œβ”€β”€ StockCard.md
    β”‚   β”œβ”€β”€ StockCard.yaml     β†’ YAML format
    β”‚   └── PortfolioCard.md
    β”œβ”€β”€ display/
    β”‚   β”œβ”€β”€ PriceDisplay.md
    β”‚   └── ChangeIndicator.md
    β”œβ”€β”€ forms/
    β”‚   └── SearchInput.md
    └── feedback/
        └── Toast.md

Format Detection

The loader auto-detects spec format by file extension:

Extension Format Priority
.yaml YAML (structured) Preferred
.md Markdown (legacy) Fallback

When both formats exist for a component, YAML takes precedence.

λ‘œλ”© 둜직

--list λͺ¨λ“œ

1. Read: {spec-folder}/03-components/component-inventory.md
2. Glob: {spec-folder}/03-components/specs/**/*.{yaml,md}
3. 각 νŒŒμΌμ—μ„œ 메타데이터 μΆ”μΆœ (YAML: direct parse, MD: regex)
4. μΉ΄ν…Œκ³ λ¦¬λ³„, μ˜μ‘΄μ„± μš”μ•½ 생성

--category λͺ¨λ“œ

1. Glob: {spec-folder}/03-components/specs/{category}/*.{yaml,md}
2. YAML 파일 μš°μ„ , MD fallback
3. λͺ¨λ“  파일 λ‚΄μš© Read
4. 톡합 좜λ ₯

--name λͺ¨λ“œ

1. Glob: {spec-folder}/03-components/specs/**/{name}.yaml (preferred)
2. Fallback: Glob: {spec-folder}/03-components/specs/**/{name}.md
3. Read ν•΄λ‹Ή 파일
4. 좜λ ₯

--with-deps λͺ¨λ“œ

1. --name으둜 λŒ€μƒ μ»΄ν¬λ„ŒνŠΈ λ‘œλ”©
2. μŠ€νŽ™μ—μ„œ μ˜μ‘΄μ„± νŒŒμ‹±:
   - YAML: dependencies.internal[].name
   - MD: "Dependencies:" μ„Ήμ…˜
3. 각 μ˜μ‘΄μ„± μž¬κ·€μ μœΌλ‘œ λ‘œλ”© (μˆœν™˜ μ°Έμ‘° λ°©μ§€)
4. ν† ν΄λ‘œμ§€ μ •λ ¬ν•˜μ—¬ 좜λ ₯ (μ˜μ‘΄μ„± λ¨Όμ €)

--gap λͺ¨λ“œ

1. Read: {spec-folder}/03-components/gap-analysis.md
2. λ˜λŠ” 동적 뢄석:
   - μŠ€νŽ™μ— μ •μ˜λœ μ»΄ν¬λ„ŒνŠΈ λͺ©λ‘ (*.yaml + *.md)
   - μ‹€μ œ κ΅¬ν˜„λœ μ»΄ν¬λ„ŒνŠΈ (src/components/**/*.tsx)
   - μ°¨μ§‘ν•© 계산
3. κ΅¬ν˜„ μˆœμ„œ ꢌμž₯ (μ˜μ‘΄μ„± κ³ λ €)

YAML Parsing Guide

YAML 포맷 μ»΄ν¬λ„ŒνŠΈ μŠ€νŽ™μ—μ„œ 데이터 μΆ”μΆœ:

# 메타데이터
id: "CMP-001"           β†’ μ»΄ν¬λ„ŒνŠΈ ID
name: "StockCard"       β†’ μ»΄ν¬λ„ŒνŠΈ 이름
category: "cards"       β†’ μΉ΄ν…Œκ³ λ¦¬
priority: "P0"          β†’ μš°μ„ μˆœμœ„

# μ˜μ‘΄μ„±
dependencies:
  internal:
    - name: "PriceDisplay"
    - name: "ChangeIndicator"

# Props
props:
  - name: "symbol"
    type: "string"
    required: true

# Design tokens reference
styles:
  _ref: "../../shared/design-tokens.yaml"

μ»΄ν¬λ„ŒνŠΈ μŠ€νŽ™ 포맷

각 μ»΄ν¬λ„ŒνŠΈ μŠ€νŽ™μ€ λ‹€μŒ ν˜•μ‹μ„ λ”°λ¦…λ‹ˆλ‹€:

# StockCard

**μΉ΄ν…Œκ³ λ¦¬:** cards
**μš°μ„ μˆœμœ„:** P0
**λ³΅μž‘λ„:** HIGH

## μ˜μ‘΄μ„± (Dependencies)
- PriceDisplay
- ChangeIndicator
- Sparkline

## ν”Όμ˜μ‘΄μ„± (Used By)
- Dashboard
- WatchlistPage
- SearchResults

## Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| symbol | string | Yes | - | μ’…λͺ© μ½”λ“œ |
| onSelect | () => void | No | - | 선택 μ‹œ 콜백 |
| variant | 'compact' \| 'full' | No | 'full' | ν‘œμ‹œ λͺ¨λ“œ |

## States

| State | Description | Visual |
|-------|-------------|--------|
| default | κΈ°λ³Έ μƒνƒœ | 흰색 λ°°κ²½ |
| hover | 마우슀 μ˜€λ²„ | 밝은 그림자 |
| selected | 선택됨 | νŒŒλž€ ν…Œλ‘λ¦¬ |
| loading | λ‘œλ”© 쀑 | μŠ€μΌˆλ ˆν†€ |
| error | μ—λŸ¬ | λΉ¨κ°„ ν…Œλ‘λ¦¬ |

## Interactions

| Trigger | Action | Result |
|---------|--------|--------|
| Click | onSelect 호좜 | 상세 νŽ˜μ΄μ§€ 이동 |
| Long Press | μ»¨ν…μŠ€νŠΈ 메뉴 | λΉ λ₯Έ μ•‘μ…˜ ν‘œμ‹œ |

## μ ‘κ·Όμ„± (a11y)
- role: article
- aria-label: "{symbol} 주식 μΉ΄λ“œ"
- ν‚€λ³΄λ“œ: Enter/Space둜 선택

## ν…ŒμŠ€νŠΈ 힌트
- μ‹€μ‹œκ°„ 가격 μ—…λ°μ΄νŠΈ ν…ŒμŠ€νŠΈ
- λ‘œλ”© μƒνƒœ λ Œλ”λ§
- μ—λŸ¬ μƒνƒœ λ Œλ”λ§

Agent 연동 μ˜ˆμ‹œ

Phase 3: EXECUTEμ—μ„œ μ‚¬μš©

Task(spec-executor, opus):
  prompt: "
    # Step 1: κ΅¬ν˜„ν•  μ»΄ν¬λ„ŒνŠΈ μŠ€νŽ™ λ‘œλ”©
    Skill(spec-component-loader {spec-folder} --name PriceDisplay --with-deps)

    # Step 2: κ΅¬ν˜„
    - μ˜μ‘΄μ„±λΆ€ν„° κ΅¬ν˜„
    - λŒ€μƒ μ»΄ν¬λ„ŒνŠΈ κ΅¬ν˜„
    - ν…ŒμŠ€νŠΈ μž‘μ„±

    # Step 3: λ‹€μŒ μ»΄ν¬λ„ŒνŠΈ
    Skill(spec-component-loader {spec-folder} --name StockCard --with-deps)
  "

점진적 λ‘œλ”© νŒ¨ν„΄

# 1단계: 전체 ꡬ쑰 νŒŒμ•…
Skill(spec-component-loader specs --list)

# 2단계: Gap λΆ„μ„μœΌλ‘œ κ΅¬ν˜„ μˆœμ„œ κ²°μ •
Skill(spec-component-loader specs --gap)

# 3단계: Batch 1 μ»΄ν¬λ„ŒνŠΈ (μ˜μ‘΄μ„± μ—†μŒ) 병렬 κ΅¬ν˜„
Skill(spec-component-loader specs --category display)

# 4단계: Batch 2 μ»΄ν¬λ„ŒνŠΈ (μ˜μ‘΄μ„± 있음)
Skill(spec-component-loader specs --name StockCard --with-deps)

좜λ ₯ 포맷

λͺ¨λ“  좜λ ₯은 Markdown ν˜•μ‹μœΌλ‘œ μ œκ³΅λ©λ‹ˆλ‹€:

# {λ‘œλ”© νƒ€μž…} κ²°κ³Ό

## 메타데이터
- λ‘œλ”© μΌμ‹œ: {timestamp}
- μ†ŒμŠ€: {spec-folder}
- ν•„ν„°: {filter-type}
- μ»΄ν¬λ„ŒνŠΈ 수: {count}

## λ‚΄μš©

{actual content}

---
*Loaded by spec-component-loader*

κ΄€λ ¨ Skill

  • spec-test-loader: ν…ŒμŠ€νŠΈ κ³„νšμ„œ λ‘œλ”©
  • spec-scenario-loader: μ‹œλ‚˜λ¦¬μ˜€ κ³„νšμ„œ λ‘œλ”©
  • spec-it-execute: Phase 3, 5μ—μ„œ 이 skill μ‚¬μš©

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.