Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

techdebt

БесплатноЗапускает вложенные скриптыНе проверен

Technical debt detection and remediation. Run at session end to find duplicated code, dead imports, security issues, and complexity hotspots. Triggers: 'find…

0xDarkMatterот 0xDarkMatter★ 86 звёзд на GitHub

Об этом скилле

Tech Debt Scanner

Automated technical debt detection using parallel subagents. Designed to run at session end to catch issues while context is fresh.

Quick Start

# Session end - scan changes since last commit (default)
/techdebt

# Deep scan - analyze entire codebase
/techdebt --deep

# Specific categories
/techdebt --duplicates    # Only duplication
/techdebt --security      # Only security issues
/techdebt --complexity    # Only complexity hotspots
/techdebt --deadcode      # Only dead code

# Auto-fix mode (interactive)
/techdebt --fix

Architecture

Always uses parallel subagents for fast analysis:

Main Agent (orchestrator)
    │
    ├─> Subagent 1: Duplication Scanner
    ├─> Subagent 2: Security Scanner
    ├─> Subagent 3: Complexity Scanner
    └─> Subagent 4: Dead Code Scanner

    ↓ All run in parallel (2-15s depending on scope)

Main Agent: Consolidate findings → Rank by severity → Generate report

Benefits:

  • 🚀 Parallel execution - all scans run simultaneously
  • 🧹 Clean main context - no pollution from analysis work
  • 💪 Scalable - handles large codebases efficiently
  • 🎯 Fast - even small diffs benefit from parallelization

Workflow

Step 1: Determine Scope

Default (no flags):

  • Scan files changed since last commit: git diff --name-only HEAD
  • Fast session-end workflow (~2-3 seconds)
  • Perfect for "wrap up" scenarios

Deep scan (--deep flag):

  • Scan entire codebase
  • Comprehensive analysis (~10-15 seconds for medium projects)
  • Use when refactoring or preparing major releases

Specific category (e.g., --duplicates):

  • Run only specified scanner
  • Fastest option for targeted analysis

Step 2: Spawn Parallel Subagents

Launch 4 subagents simultaneously (or subset if category specified):

Subagent 1: Duplication Scanner

  • Task: Find duplicated code blocks using AST similarity
  • Tools: ast-grep, structural search, token analysis
  • Output: List of duplicate code blocks with similarity scores

Subagent 2: Security Scanner

  • Task: Detect security vulnerabilities and anti-patterns
  • Checks: Hardcoded secrets, SQL injection, XSS, insecure crypto
  • Output: Security findings with severity and remediation guidance

Subagent 3: Complexity Scanner

  • Task: Identify overly complex functions and methods
  • Metrics: Cyclomatic complexity, nested depth, function length
  • Output: Complexity hotspots with refactoring suggestions

Subagent 4: Dead Code Scanner

  • Task: Find unused imports, variables, and unreachable code
  • Checks: Unused imports, dead branches, orphaned functions
  • Output: Dead code list with safe removal instructions

Subagent instructions template:

Scan {scope} for {category} issues.

## Domain Knowledge
Before scanning, read the relevant skill for deeper patterns:
- Security scanner: Read skills/security-ops/references/owasp-top10-a01-a05.md and owasp-top10-a06-a10.md
- Complexity scanner: Read skills/refactor-ops/SKILL.md

Scope: {file_list or "entire codebase"}
Language: {detected from file extensions}
Focus: {category-specific patterns}

Output format:
- File path + line number
- Issue description
- Severity (P0-P3)
- Suggested fix (if available)

Use appropriate tools:
- Duplication: ast-grep for structural similarity
- Security: pattern matching + known vulnerability patterns
- Complexity: cyclomatic complexity calculation
- Dead Code: static analysis for unused symbols

Step 3: Consolidate Findings

Main agent collects results from all subagents and:

  1. Deduplicate - Remove duplicate findings across categories
  2. Rank by severity:
    • P0 (Critical): Security vulnerabilities, blocking issues
    • P1 (High): Major duplication, high complexity
    • P2 (Medium): Minor duplication, moderate complexity
    • P3 (Low): Dead code, style issues
  3. Group by file - Organize findings by affected file
  4. Calculate debt score - Overall technical debt metric

Step 4: Generate Report

Create actionable report with:

# Tech Debt Report

**Scope:** {X files changed | Entire codebase}
**Scan Time:** {duration}
**Debt Score:** {0-100, lower is better}

## Summary

| Category | Findings | P0 | P1 | P2 | P3 |
|----------|----------|----|----|----|----|
| Duplication | X | - | X | X | - |
| Security | X | X | - | - | - |
| Complexity | X | - | X | X | - |
| Dead Code | X | - | - | X | X |

## Critical Issues (P0)

### {file_path}:{line}
**Category:** {Security}
**Issue:** Hardcoded API key detected
**Impact:** Credential exposure risk
**Fix:** Move to environment variable

## High Priority (P1)

### {file_path}:{line}
**Category:** {Duplication}
**Issue:** 45-line block duplicated across 3 files
**Impact:** Maintenance burden, inconsistency risk
**Fix:** Extract to shared utility function

[... continue for all findings ...]

## Recommendations

1. Address all P0 issues before merge
2. Consider refactoring high-complexity functions
3. Remove dead code to reduce ma
Полный SKILL.md на GitHub

Установить techdebt в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/report-template.mdreferences/patterns.mdreferences/severity-guide.mdscripts/.gitkeep

FAQ

Что делает скилл techdebt?

Technical debt detection and remediation. Run at session end to find duplicated code, dead imports, security issues, and complexity hotspots. Triggers: 'find tech debt', 'scan for issues', 'check code quality', 'wrap up session', 'ready to commit', 'before merge', 'code review prep'.

Как установить скилл techdebt?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл techdebt запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить techdebt с