选项
首页首页 Skill 开发者工具 tech-debt-tracker

扫描代码库以识别技术债务,评估严重程度,跟踪趋势,并生成优先修复计划。

...展开全部
25
更新时间 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
senior-backend
更新时间 2026-08-30
systematic-debugging
更新时间 2026-09-03
OR