Tech debt analyzer

From Sir-chawakorn/power-ranger-toolkit · View interactive version

Tech debt analyzer is an AI agent skill from the GitHub repository Sir-chawakorn/power-ranger-toolkit. Identify, measure, and prioritize technical debt for strategic remediation

How to use this skill

Skill file

💳 Tech Debt Analyzer Skill


name: tech-debt-analyzer

description: Identify, measure, and prioritize technical debt for strategic remediation


🎯 Purpose

วิเคราะห์ technical debt ใน codebase เพื่อวางแผนการแก้ไขอย่างมีกลยุทธ์

📋 When to Use

🔧 Debt Categories

| Category | Examples | Impact |

|----------|----------|--------|

| Code | Duplication, complexity | Maintainability |

| Architecture | Tight coupling, monolith | Scalability |

| Testing | Low coverage | Reliability |

| Dependencies | Outdated packages | Security |

| Documentation | Missing docs | Onboarding |

| Infrastructure | Manual processes | Efficiency |

📊 Debt Metrics

Code Quality

# Complexity (ESLint)
npx eslint --ext .ts,.tsx src/ --format json

# Duplication
npx jscpd src/

# Test coverage
npm run test -- --coverage

Scoring

| Metric | Good | Moderate | High Debt |

|--------|------|----------|-----------|

| Coverage | >80% | 50-80% | <50% |

| Complexity | <10 | 10-20 | >20 |

| Duplication | <3% | 3-5% | >5% |

📝 Debt Analysis Template

## 💳 Tech Debt Report

### Summary
- **Total Items**: 23
- **High Priority**: 5
- **Estimated Effort**: 40 hours

### By Category
| Category | Count | Priority |
|----------|-------|----------|
| Code | 10 | Medium |
| Testing | 8 | High |
| Deps | 5 | High |

### Top Items

#### 1. Low Test Coverage in Auth Module
- **Impact**: High (security critical)
- **Effort**: 8 hours
- **Risk**: Bugs in production

#### 2. Outdated React Version
- **Impact**: Medium (missing features)
- **Effort**: 16 hours
- **Risk**: Security vulnerabilities

🔄 Remediation Process

1. IDENTIFY debt
2. MEASURE impact
3. PRIORITIZE by ROI
4. ALLOCATE (20% sprint capacity)
5. TRACK progress

✅ Debt Prevention

🔗 Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.