選項
首頁首頁 Skill 開發者工具 tech-debt-tracker

掃描程式碼庫以識別技術債務,評估嚴重程度,跟蹤趨勢,並生成優先修復計劃。

...展開全部
26
更新時間 2026-08-29

技術債務追蹤器

層級: 強大 🔥
類別: 工程流程自動化
專業領域: 程式碼質量、技術債務管理、軟體工程

概述

技術債務是軟體開發中最具隱蔽性的挑戰之一——它會隨時間累積,降低開發速度,增加維護成本,並削弱程式碼質量。本技能提供了一套全面的框架,用於跨程式碼庫識別、分析、優先順序排序和追蹤技術債務。

技術債務不僅僅是雜亂的程式碼——它還包含架構上的妥協、缺失的測試、過時的依賴項、文件空白以及基礎設施方面的讓步。就像金融債務一樣,它會透過增加開發時間、提高缺陷率和降低團隊效率來產生“利息”。

本技能提供的功能

本技能提供了三個相互關聯的工具,構成完整的技術債務管理系統:

  1. 債務掃描器 - 自動識別程式碼庫中的技術債務訊號
  2. 債務優先順序排序器 - 使用延遲成本框架分析和優先處理債務專案
  3. 債務儀表盤 - 追蹤債務隨時間的趨勢並提供高管報告

這些工具共同使工程團隊能夠基於資料做出關於技術債務的決策,平衡新功能開發與維護工作。

快速入門 — 掃描 → 優先順序排序 → 儀表盤

所有路徑均相對於本技能資料夾。掃描器的 JSON 輸出直接饋送給優先順序排序器;帶日期的庫存快照饋送給儀表盤。

1. 掃描程式碼庫

python3 scripts/debt_scanner.py /path/to/codebase --format json --output debt_inventory.json

生成包含 scan_metadatasummarydebt_items[]file_statisticsrecommendationsdebt_inventory.json。向使用者報告 summary 中的計數。(試執行:assets/sample_codebase。)

2. 優先順序排序積壓工作

python3 scripts/debt_prioritizer.py debt_inventory.json --framework wsjf --team-size 6 --sprint-capacity 20 --format json --output debt_priorities.json

框架:cost_of_delay(預設)、wsjfrice。輸出包含 prioritized_backlog(自上而下工作)、sprint_allocation(貼上到衝刺計劃中)和 insights

3. 追蹤隨時間的趨勢

保留帶日期的快照(debt_YYYY-MM-DD.json),然後:

python3 scripts/debt_dashboard.py --input-dir snapshots/ --period monthly --format both --output debt_dashboard

或顯式傳遞檔案(示例:assets/historical_debt_2024-01-15.json assets/historical_debt_2024-02-01.json)。儀表盤報告趨勢方向和高管就緒的摘要——使用它來驗證清理衝刺確實減少了債務。

驗證迴圈

在修復衝刺後:重新執行第 1 步,使用新快照重新執行第 3 步,並斷言目標類別的計數已下降。未能推動儀表盤變化的清理是返工,而非債務償還。

技術債務分類框架

→ 參見 references/debt-frameworks.md 獲取詳細資訊(另見:references/debt-classification-taxonomy.md、references/prioritization-framework.md、references/stakeholder-communication-templates.md)

常見陷阱及避免方法

1. 分析癱瘓

問題:花費過多時間分析債務而不是修復它。解決方案:為分析設定時間限制,對大多數專案使用“足夠好”的評分。

2. 完美主義

問題:試圖消除所有債務而不是管理它。解決方案:專注於高影響債務,接受某些債務是可接受的。

3. 忽視業務背景

問題:優先考慮技術優雅而非業務價值。解決方案:始終將債務工作與業務成果和客戶影響聯絡起來。

4. 應用不一致

問題:一些團隊採用實踐,而其他團隊則忽略它們。解決方案:將債務追蹤納入標準開發工作流。

5. 工具過度工程化

問題:構建無人使用的複雜債務管理系統。解決方案:從簡單開始,根據實際使用模式進行迭代。

技術債務管理不僅僅是編寫更好的程式碼——它是建立可持續的開發實踐,平衡短期交付壓力與長期系統健康。使用這些工具和框架,就何時以及如何投資於債務減少做出明智決策。

在 GitHub 上查看
---
name: tech-debt-tracker
description: Scan codebases for technical debt, score severity, track trends, and generate prioritized remediation plans.
---

# Tech Debt Tracker

**Tier**: POWERFUL 🔥  
**Category**: Engineering Process Automation  
**Expertise**: Code Quality, Technical Debt Management, Software Engineering

## Overview

Tech debt is one of the most insidious challenges in software development - it compounds over time, slowing down development velocity, increasing maintenance costs, and reducing code quality. This skill provides a comprehensive framework for identifying, analyzing, prioritizing, and tracking technical debt across codebases.

Tech debt isn't just about messy code - it encompasses architectural shortcuts, missing tests, outdated dependencies, documentation gaps, and infrastructure compromises. Like financial debt, it accrues "interest" through increased development time, higher bug rates, and reduced team velocity.

## What This Skill Provides

This skill offers three interconnected tools that form a complete tech debt management system:

1. **Debt Scanner** - Automatically identifies tech debt signals in your codebase
2. **Debt Prioritizer** - Analyzes and prioritizes debt items using cost-of-delay frameworks
3. **Debt Dashboard** - Tracks debt trends over time and provides executive reporting

Together, these tools enable engineering teams to make data-driven decisions about tech debt, balancing new feature development with maintenance work.

## Quick Start — scan → prioritize → dashboard

All paths relative to this skill folder. The scanner's JSON output feeds the prioritizer directly; dated inventory snapshots feed the dashboard.

### 1. Scan the codebase

```bash
python3 scripts/debt_scanner.py /path/to/codebase --format json --output debt_inventory.json
```

Emits `debt_inventory.json` with `scan_metadata`, `summary`, `debt_items[]`, `file_statistics`, and `recommendations`. Report the `summary` counts to the user. (Dry run: `assets/sample_codebase`.)

### 2. Prioritize the backlog

```bash
python3 scripts/debt_prioritizer.py debt_inventory.json --framework wsjf --team-size 6 --sprint-capacity 20 --format json --output debt_priorities.json
```

Frameworks: `cost_of_delay` (default), `wsjf`, `rice`. Output contains `prioritized_backlog` (work top-down), `sprint_allocation` (paste into sprint planning), and `insights`.

### 3. Track trends over time

Keep dated snapshots (`debt_YYYY-MM-DD.json`), then:

```bash
python3 scripts/debt_dashboard.py --input-dir snapshots/ --period monthly --format both --output debt_dashboard
```

Or pass files explicitly (samples: `assets/historical_debt_2024-01-15.json assets/historical_debt_2024-02-01.json`). The dashboard reports trend direction and executive-ready summaries — use it to verify a cleanup sprint actually reduced debt.

### Verification loop

After a remediation sprint: re-run step 1, re-run step 3 with the new snapshot, and assert the targeted categories' counts dropped. A cleanup that doesn't move the dashboard is rework, not debt paydown.

## Technical Debt Classification Framework
→ See references/debt-frameworks.md for details (also: references/debt-classification-taxonomy.md, references/prioritization-framework.md, references/stakeholder-communication-templates.md)

## Common Pitfalls and How to Avoid Them

### 1. Analysis Paralysis
**Problem**: Spending too much time analyzing debt instead of fixing it.
**Solution**: Set time limits for analysis, use "good enough" scoring for most items.

### 2. Perfectionism
**Problem**: Trying to eliminate all debt instead of managing it.
**Solution**: Focus on high-impact debt, accept that some debt is acceptable.

### 3. Ignoring Business Context
**Problem**: Prioritizing technical elegance over business value.
**Solution**: Always tie debt work to business outcomes and customer impact.

### 4. Inconsistent Application
**Problem**: Some teams adopt practices while others ignore them.
**Solution**: Make debt tracking part of standard development workflow.

### 5. Tool Over-Engineering
**Problem**: Building complex debt management systems that nobody uses.
**Solution**: Start simple, iterate based on actual usage patterns.

Technical debt management is not just about writing better code - it's about creating sustainable development practices that balance short-term delivery pressure with long-term system health. Use these tools and frameworks to make informed decisions about when and how to invest in debt reduction.

所有檔案

0 個檔案

安裝 tech-debt-tracker

將技能檔案下載並解壓至你的 .claude/skills/ 目錄。

下載 ZIP

複製儲存庫並將技能檔案複製到您的專案中。

git clone https://github.com/alirezarezvani/claude-skills/tree/main/engineering/skills/tech-debt-tracker # Copy SKILL.md to your .claude/skills/ directory

複製 複製
快速設定: 將技能資料夾複製到 .claude/skills/ 目錄。Claude 將自動檢測並使用該技能。

相關技能

algorithmic-art
更新時間 2026-08-27
receiving-code-review
更新時間 2026-09-03
deprecation-and-migration
更新時間 2026-09-03
senior-backend
更新時間 2026-08-30
OR