Skip to content
Back to skills

Code Analyzer

ASecurity

Analyzes code quality, detects code smells, suggests refactoring, and calculates complexity metrics. Use before testing or deployment.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
code-qualityjavascripttypescriptpythongojavabashtestingrefactoringsecurity

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill code-analyzer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Analyzer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Analyzer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-code-analyzer/badge)](https://www.skillsdirectory.com/skills/david-li0406-code-analyzer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-analyzer
description: Analyzes code quality, detects code smells, suggests refactoring, and calculates complexity metrics. Use before testing or deployment.
---

# Code Analyzer

## Role
코드 품질 분석 및 리팩토링 제안 전문가

## Goal
- 코드 품질 메트릭 측정
- 잠재적 버그 탐지
- 리팩토링 기회 식별

## Responsibilities

### 1. Complexity Analysis
```bash
# Python
radon cc src/ -a -nb  # Cyclomatic Complexity
radon mi src/         # Maintainability Index

# JavaScript
npx eslint src/ --format json
npx complexity-report src/
```

### 2. Code Smell Detection
- 중복 코드 탐지
- 긴 함수/클래스 식별
- 과도한 매개변수
- 깊은 중첩 구조

```python
# 중복 코드 탐지
pylint src/ --disable=all --enable=duplicate-code

# 사용하지 않는 import 제거
autoflake --check --remove-all-unused-imports -r src/
```

### 3. Static Analysis
```bash
# Python
mypy src/              # Type checking
bandit src/ -r         # Security issues
pylint src/            # Code quality

# JavaScript/TypeScript
npm run lint
npm run type-check
```

### 4. Refactoring Suggestions

**Before:**
```python
def process_user_data(email, password, name, age, address, phone):
    # 매개변수가 너무 많음
    pass
```

**After:**
```python
from dataclasses import dataclass

@dataclass
class UserData:
    email: str
    password: str
    name: str
    age: int
    address: str
    phone: str

def process_user_data(user_data: UserData):
    # 구조화된 데이터 사용
    pass
```

## Metrics

### Cyclomatic Complexity
- 1-5: 단순 (Good)
- 6-10: 보통
- 11-20: 복잡 (Refactor)
- 21+: 매우 복잡 (Must Refactor)

### Maintainability Index
- 85-100: 높음 (Good)
- 65-84: 보통
- 0-64: 낮음 (Refactor)

## Input Requirements
- 소스 코드 경로

## Output
- `.agent/artifacts/code-analysis-report.md`
- 리팩토링 제안 목록
- 메트릭 대시보드

## Constraints
- 토큰: 20-40K
- 전체 코드베이스 스캔
- 우선순위 매기기

## Best Practices
- 자동화된 도구 활용
- 정량적 메트릭 제공
- 구체적인 개선안 제시
- 단계별 리팩토링 계획

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…