con un clic
clean-code-inspector
React 코드 품질 분석. git diff 기반으로 변경된 코드의 클린 코드 점수 평가. "코드 리뷰", "품질 검사" 등의 요청 시 사용
Menú
React 코드 품질 분석. git diff 기반으로 변경된 코드의 클린 코드 점수 평가. "코드 리뷰", "품질 검사" 등의 요청 시 사용
Basado en la clasificación ocupacional SOC
| name | clean-code-inspector |
| description | React 코드 품질 분석. git diff 기반으로 변경된 코드의 클린 코드 점수 평가. "코드 리뷰", "품질 검사" 등의 요청 시 사용 |
| disable-model-invocation | false |
Identify Changes:
git status to see the current state.git diff --name-only (or git diff --cached --name-only if changes are staged) to get the list of modified files..tsx, .ts, .jsx, .js).Analyze Code (adaptive parallelism):
변경 파일 수에 따른 분석 전략:
각 파일을 직접 git diff로 검사하고 Scorecard 프레임워크에 따라 평가합니다.
2-A: 파일 그룹화 변경된 파일들을 디렉토리/기능 영역별로 그룹화합니다:
2-B: 병렬 분석 각 그룹을 Task sub-agent로 동시 분석합니다:
Task call:
subagent_type: "general-purpose"
model: "sonnet"
description: "Analyze code quality for [그룹명]"
run_in_background: true
prompt: |
You are a React Clean Code Inspector. Analyze the following files
for code quality using the React Clean Code Scorecard framework.
Files to analyze: [파일 목록]
Run `git diff -- [파일]` for each file to see the changes.
Evaluate strictly based on these metrics:
- Cyclomatic Complexity (CC): branch count in JSX, nested ternaries
- Component Responsibility Score (CRS): LoC + CC + State Count + Dependency Count
- Cohesion (LCOM4): hook and state connectivity
- Interface Quality: props count, boolean props, naming conventions
- State Architecture: colocation, global state density
For each file, provide:
1. Per-metric scores with measured values
2. Status (양호/주의/위험) for each metric
3. Specific recommendations
Output as structured markdown with the Scorecard table format.
모든 그룹 분석 Task가 완료될 때까지 대기한 후 결과를 수집합니다.
2-C: 결과 통합 오케스트레이터가 모든 그룹의 분석 결과를 통합하여 전체 Scorecard를 생성합니다:
CRITICAL: You must evaluate the code strictly based on the "React Clean Code Scorecard" framework provided below. Do not use generic "clean code" advice; use these specific metrics.
<FRAMEWORK_START>
주관적인 "클린 코드"가 아닌, 정량적이고 객관적인 엔지니어링 지표로 평가합니다.
on 접두사(Props) / handle 접두사(Implementation) 일관성.react-hooks/rules-of-hooks: 0 위반max-lines-per-function: < 100no-console: 0 위반TypeScript noImplicitAny: 0%평가 결과는 아래 표 형식을 포함하여 정리해야 합니다.
| 카테고리 | 평가 항목 | 측정/관찰 값 | 상태 (양호/주의/위험) | 비고 |
|---|---|---|---|---|
| 복잡도 | 순환 복잡도 (CC) | ... | ... | ... |
| 규모 | 라인 수 (LoC) | ... | ... | ... |
| 인터페이스 | Props 개수 | ... | ... | ... |
| 결합도 | Props 드릴링 깊이 | ... | ... | ... |
| 응집도 | LCOM4 (추정) | ... | ... | ... |
| 위생 | 훅 의존성 준수 | ... | ... | ... |
<FRAMEWORK_END>
Generate Report:
clean-code-inspect-result.md in the project root.