Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

tech-debt-tracker科技债务追踪器

Agent Skill

tech-debt-tracker 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,228

周安装

91

GitHub Stars

103

下载量

721
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tech-debt-tracker(科技债务追踪器)
来源仓库:https://github.com/borghei/claude-skills
仓库路径:skills/tech-debt-tracker
安装命令:
npx skills add https://github.com/borghei/claude-skills --skill tech-debt-tracker
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/borghei/claude-skills --skill tech-debt-tracker

简介

用于识别、评分与跟踪代码库中的技术债务项,支持优先级排序。

  • 基于 AST 解析检测六大类债务信号(代码、架构、测试、文档、依赖、基础设施)。
  • 采用成本延迟分析与趋势看板辅助决策偿还顺序与资源分配。
  • 需在目标仓库内有读取权限方可启动扫描流程,输出含修复建议的详细清单。
  • tech-debt-tracker 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Tech Debt Tracker

The agent identifies, scores, prioritizes, and tracks technical debt across codebases using AST parsing, cost-of-delay analysis, and trend dashboards.

Workflow

  1. Scan codebase -- Run the Debt Scanner against the target repository. It uses AST parsing and pattern matching to detect debt signals across all six categories (code, architecture, test, documentation, dependency, infrastructure).
  2. Score each item -- Apply the Severity Scoring Framework. Rate each item on velocity impact, quality impact, productivity impact, and business impact (1-10 each). Estimate effort (XS-XL) and risk level.
  3. Calculate interest rate -- For each item, compute Interest Rate = Impact Score x Frequency of Encounter per sprint. Calculate Cost of Delay = Interest Rate x Sprints Until Fix x Team Size Multiplier.
  4. Prioritize -- Plot items on the Cost-of-Delay vs Effort matrix. Assign priority: Immediate (high cost, low effort), Planned (high cost, high effort), Opportunistic (low cost, low effort), Backlog (low cost, high effort).
  5. Allocate sprint capacity -- Apply the Debt-to-Feature Ratio based on current team velocity. Reserve the recommended percentage for debt work.
  6. Generate reports -- Produce the Executive Dashboard (health score, trend, top risks, investment recommendation) and the Engineering Dashboard (daily new/resolved, interest rate by component, hotspots).
  7. Track trends -- Compare current scan against previous baselines. Alert if debt accumulation rate exceeds paydown rate for two consecutive sprints.

Debt Classification

CategoryKey IndicatorsDetection Method
CodeFunctions > 50 lines, nesting > 4 levels, cyclomatic complexity > 10, duplicate blocks > 3AST parsing, complexity metrics
ArchitectureCircular dependencies, tight coupling, missing abstraction layers, monolithic componentsDependency analysis, coupling metrics
TestCoverage < 80% on critical paths, flaky tests, test suite > 10 minCoverage reports, failure pattern analysis
DocumentationMissing API docs, outdated READMEs, no ADRs, stale commentsCoverage analysis, freshness checking
DependencyKnown CVEs, deprecated APIs, unused packages, version conflictsVulnerability scanning, usage analysis
InfrastructureManual deploys, missing monitoring, env inconsistencies, no DR planAudit checklists, config drift detection

Severity Scoring Framework

Rate each dimension 1-10:

Dimension1-25-69-10
Velocity ImpactNegligibleAffects some featuresBlocks new development
Quality ImpactNo defect increaseModerate defect increaseCritical reliability problems
Productivity ImpactNo team impactRegular complaintsCausing developer turnover
Business ImpactNo customer impactModerate performance hitRevenue-impacting issues

Effort sizing: XS (1-4 hrs), S (1-2 days), M (3-5 days), L (1-2 weeks), XL (3+ weeks)

Interest Rate and Cost of Delay

Interest Rate = Impact Score x Frequency of Encounter (per sprint)
Cost of Delay = Interest Rate x Sprints Until Fix x Team Size Multiplier

Example:
  Legacy auth module with poor error handling
  Impact: 7  |  Frequency: 15 encounters/sprint  |  Team: 8 devs
  Planned fix: sprint 4 (3 sprints away)

  Interest Rate = 7 x 15 = 105 points/sprint
  Cost of Delay = 105 x 3 x 1.2 = 378 total cost points

Prioritization Matrix

QuadrantCost of DelayEffortAction
Immediate (quick wins)HighLowDo first
Planned (major initiatives)HighHighSchedule dedicated sprints
OpportunisticLowLowFix when touching related code
BacklogLowHighReconsider quarterly

WSJF Alternative

WSJF = (Business Value + Time Criticality + Risk Reduction) / Effort

Each component scored 1-10. Highest WSJF items are prioritized first.

Sprint Allocation (Debt-to-Feature Ratio)

Team VelocityDebt %Feature %Strategy
< 70% of capacity60%40%Remove major blockers
70-85% of capacity30%70%Balanced maintenance
> 85% of capacity15%85%Opportunistic only

Sprint planning rule: Reserve 20% of sprint capacity for debt. Prioritize items with the highest interest rates. Add "debt tax" to feature estimates when working in high-debt areas.

Debt Item Data Structure

{
  "id": "DEBT-2024-001",
  "title": "Legacy user authentication module",
  "category": "code",
  "subcategory": "error_handling",
  "location": "src/auth/legacy_auth.py:45-120",
  "description": "Authentication error handling uses generic exceptions",
  "impact": { "velocity": 7, "quality": 8, "productivity": 6, "business": 5 },
  "effort": { "size": "M", "risk": "medium", "skill_required": "mid" },
  "interest_rate": 105,
  "cost_of_delay": 378,
  "priority": "high",
  "status": "identified",
  "tags": ["security", "user-experience", "maintainability"]
}

Status lifecycle: Identified > Analyzed > Prioritized > Planned > In Progress > Review > Done | Won't Fix

Refactoring Strategies

StrategyWhen to UseHow It Works
Strangler FigLarge monoliths, high-risk migrationsBuild new around old; gradually redirect traffic; remove old
Branch by AbstractionNeed old + new running in parallelCreate interface; implement both behind it; switch via config
Feature TogglesGradual rollout of refactored componentsAdd toggle at decision points; test both paths; remove old
Parallel RunCritical business logic changesRun both implementations; compare outputs; build confidence

Executive Dashboard

TECH DEBT HEALTH
  Overall Score: [0-100]  |  Trend: [improving/declining]
  Cost of Delayed Fixes: [X development days]
  High-Risk Items: [count]

MONTHLY REPORT:
  1. Executive Summary (3 bullet points)
  2. Health Score Trend (6-month view)
  3. Top 3 Risk Items (business impact focus)
  4. Investment Recommendation (resource allocation)
  5. Success Stories (debt resolved last month)

Engineering Dashboard

DAILY:
  New items identified  |  Items resolved  |  Interest rate by component

SPRINT REVIEW:
  Debt points completed vs planned  |  Velocity impact
  Newly discovered debt  |  Team code quality sentiment

Example: Scanning a Python Microservice

# Run debt scanner
python scripts/debt_scanner.py --repo ./payment-service --output debt_inventory.json

# Output summary:
#   Total items found: 47
#   Critical: 3  |  High: 8  |  Medium: 21  |  Low: 15
#
#   Top 3 by cost-of-delay:
#     1. DEBT-001: payment_processor.py - nested exception handling (CoD: 420)
#     2. DEBT-002: db/migrations/ - 12 unapplied migrations (CoD: 315)
#     3. DEBT-003: tests/ - 62% coverage on payment flow (CoD: 280)

# Prioritize items
python scripts/debt_prioritizer.py --inventory debt_inventory.json --sprint-capacity 40

# Generate executive report
python scripts/debt_dashboard.py --inventory debt_inventory.json --baseline previous_scan.json

Quarterly Planning

  1. Identify 1-2 major debt themes per quarter
  2. Allocate dedicated sprints for large-scale refactoring
  3. Plan debt work around major feature releases
  4. Track: debt interest rate reduction, velocity improvements, defect rate reduction, code review cycle time

Scripts

Debt Scanner (debt_scanner.py)

Scans codebase using AST parsing and pattern matching. Detects all six debt categories. Outputs structured JSON inventory.

Debt Prioritizer (debt_prioritizer.py)

Analyses debt inventory using cost-of-delay and WSJF frameworks. Outputs prioritized backlog with sprint allocation recommendations.

Debt Dashboard (debt_dashboard.py)

Generates trend reports comparing current scan against baselines. Produces executive and engineering dashboard views.

References

See REFERENCE.md for the complete Technical Debt Quadrant (Fowler), detailed detection heuristics per category, and implementation roadmap phases.

Troubleshooting

ProblemCauseSolution
Scanner finds zero debt itemsTarget directory contains no recognized file extensions, or all files match ignore patternsVerify the directory path is correct and contains source files. Check --config to ensure file_extensions and ignore_patterns are appropriate for your stack.
AST parsing errors on valid Python filesFiles use syntax from a newer Python version than the runtime executing the scannerRun the scanner with the same Python version the target codebase requires (e.g., python3.12 scripts/debt_scanner.py).
Duplicate code detection is slow on large reposThe scanner hashes every N-line sliding window across all files, which scales quadratically with file countReduce scope by scanning one service directory at a time, or increase min_duplicate_lines in the config to reduce candidate blocks.
Prioritizer produces all-zero cost-of-delay scoresInput inventory lacks severity or type fields that the enrichment step depends onEnsure the inventory JSON was produced by debt_scanner.py or follows the Debt Item Data Structure documented above. Manual inventories must include type and severity per item.
Dashboard shows "No valid data files loaded"Files passed as arguments are not valid JSON, or the JSON structure is unrecognizedThe dashboard accepts scanner output (debt_items key), prioritizer output (prioritized_backlog key), or a raw JSON array of debt items. Validate file contents with python -m json.tool <file>.
Health score is unexpectedly low despite few critical itemsHigh debt density (items per file) dominates the health formula even when individual severities are lowReview the density contribution: health penalizes 10 points per item-per-file. Break large files into smaller modules or resolve low-severity bulk items like todo_comment and missing_docstring.
Sprint allocation plan shows hundreds of sprintsDefault debt capacity is 20% of --sprint-capacity, which may be too low for a large backlogIncrease --sprint-capacity to reflect actual team hours, or filter the inventory to high-priority items before running the prioritizer.

Success Criteria

  • Scan completes in under 60 seconds for repositories up to 100,000 lines of code.
  • Every detected debt item includes a unique ID, file path, line number (where applicable), severity, and debt type -- no fields left as null or unknown.
  • Health score correlates with manual code review assessments within 15 points on the 0-100 scale when validated against a senior engineer's judgment.
  • Prioritized backlog produces a clear top-10 list where the first item has at least 2x the priority score of the tenth item, confirming meaningful differentiation.
  • Sprint allocation recommendations fit within the configured capacity (no single sprint exceeds 100% of debt budget) and cover all high-priority items within the first 3 sprints.
  • Dashboard trend analysis correctly identifies improving, declining, or stable directions when compared against at least 3 historical snapshots with known trajectories.
  • Cost-of-delay calculations produce actionable dollar-equivalent values that engineering managers can use directly in sprint planning and quarterly roadmap discussions.

Scope & Limitations

This skill covers:

  • Static detection of code-level, architecture, test, documentation, dependency, and infrastructure debt via AST parsing (Python) and regex pattern matching (all languages).
  • Quantitative prioritization of debt items using cost-of-delay, WSJF, and RICE frameworks with configurable team size and sprint capacity.
  • Historical trend analysis, health scoring, debt velocity tracking, and executive/engineering dashboard generation from multiple scan snapshots.
  • Sprint allocation planning with capacity-aware backlog scheduling and effort estimation by debt type.

This skill does NOT cover:

  • Runtime performance profiling or production monitoring -- see engineering/performance-profiler and engineering/observability-designer for those concerns.
  • Dependency vulnerability scanning (CVE detection) or software composition analysis -- see engineering/dependency-auditor for security-focused dependency review.
  • Automated refactoring or code transformation -- the skill identifies and prioritizes debt but does not modify source code.
  • Database schema debt, API contract drift, or infrastructure-as-code drift detection -- see engineering/database-schema-designer, engineering/api-design-reviewer, and engineering/migration-architect for those domains.

Integration Points

SkillIntegrationData Flow
engineering/dependency-auditorFeed dependency audit findings into the scanner as dependency_debt items to unify all debt in one inventory.Dependency audit JSON -> scanner config or manual merge into debt_inventory.json
engineering/performance-profilerCorrelate performance hotspots with high-complexity debt items to prioritize refactoring that yields both quality and speed gains.Profiler hotspot report -> cross-reference with scanner output by file path
engineering/ci-cd-pipeline-builderAdd debt_scanner.py as a CI pipeline step to fail builds when health score drops below a threshold or critical debt count increases.Scanner JSON output -> CI gate condition on summary.health_score
engineering/pr-review-expertSurface relevant debt items during code review by querying the debt inventory for files touched in a pull request.PR changed-files list -> filter debt_inventory.json by file_path
engineering/observability-designerMap infrastructure debt items (missing monitoring, env inconsistencies) to observability gaps identified by the observability skill.Dashboard category_distribution -> observability gap analysis
engineering/migration-architectUse the prioritized backlog to scope and sequence large-scale migration efforts, especially for architecture-category debt rated as planned initiatives.Prioritizer sprint_allocation -> migration planning timeline

Tool Reference

Debt Scanner (scripts/debt_scanner.py)

Purpose: Scans a codebase directory for technical debt signals using AST parsing (Python files) and regex pattern matching (all languages). Detects code smells, large functions, high complexity, duplicate code, TODO comments, and common anti-patterns. Produces a structured JSON inventory and a human-readable text report.

Usage:

python scripts/debt_scanner.py <directory> [options]

Parameters:

FlagTypeDefaultDescription
directorypositional, required--Path to the directory to scan.
--configstringNonePath to a JSON configuration file that overrides default thresholds (e.g., max_function_length, max_complexity, ignore_patterns).
--outputstringNoneOutput file path. When set, writes report to file instead of stdout. JSON output appends .json, text output appends .txt.
--formatchoicebothOutput format: json, text, or both.

Example:

python scripts/debt_scanner.py ./src --config custom_thresholds.json --output scan_results --format both

Output Formats:

  • JSON: Contains scan_metadata, summary (files scanned, lines scanned, health score, debt density, priority/type breakdowns), debt_items (array of debt objects with id, type, description, file_path, severity, metadata, priority_score, priority), file_statistics, and recommendations.
  • Text: Human-readable report with header, summary statistics, priority breakdown, top 10 debt items, and numbered recommendations.

Debt Prioritizer (scripts/debt_prioritizer.py)

Purpose: Takes a debt inventory (from the scanner or a manual JSON file) and enriches each item with effort estimates, business impact scores, interest rate calculations, and cost-of-delay values. Produces a prioritized backlog with sprint allocation recommendations using one of three frameworks: cost-of-delay, WSJF, or RICE.

Usage:

python scripts/debt_prioritizer.py <inventory_file> [options]

Parameters:

FlagTypeDefaultDescription
inventory_filepositional, required--Path to debt inventory JSON file (scanner output, prioritizer output, or raw array of debt items).
--outputstringNoneOutput file path. JSON output appends .json, text output appends .txt.
--formatchoicebothOutput format: json, text, or both.
--frameworkchoicecost_of_delayPrioritization framework: cost_of_delay, wsjf, or rice.
--team-sizeinteger5Number of developers on the team. Affects interest rate team impact multiplier and RICE reach calculation.
--sprint-capacityinteger80Total sprint capacity in hours. 20% is allocated to debt work by default. Used for sprint allocation planning.

Example:

python scripts/debt_prioritizer.py scan_results.json --framework wsjf --team-size 8 --sprint-capacity 120 --output prioritized --format json

Output Formats:

  • JSON: Contains metadata (analysis date, framework, team size, sprint capacity), prioritized_backlog (enriched items sorted by priority score, each with effort_estimate, business_impact, interest_rate, cost_of_delay, category, impact_tags), sprint_allocation (total debt hours, capacity per sprint, sprint plan with item assignments), insights (category distribution, effort breakdown, quick wins count, cost totals), charts_data (scatter, pie, timeline, interest trend arrays), and recommendations.
  • Text: Executive summary with total effort and cost-of-delay, sprint allocation plan (first 3 sprints with top items), top 10 priority items with scores and tags, and numbered recommendations.

Debt Dashboard (scripts/debt_dashboard.py)

Purpose: Takes one or more historical debt inventory files (from the scanner or prioritizer) and generates trend analysis, debt velocity tracking (accruing vs. paying down), health score timelines, forecasts, and an executive summary. Supports loading files individually or from a directory.

Usage:

python scripts/debt_dashboard.py [files...] [options]

Parameters:

FlagTypeDefaultDescription
filespositional, optional--One or more debt inventory JSON file paths. Accepts scanner output, prioritizer output, or raw arrays.
--input-dirstringNoneDirectory containing debt inventory JSON files. All *.json files in the directory are loaded. Mutually exclusive usage with positional files.
--outputstringNoneOutput file path. JSON output appends .json, text output appends .txt.
--formatchoicebothOutput format: json, text, or both.
--periodchoicemonthlyAnalysis period for trend grouping: weekly, monthly, or quarterly.
--team-sizeinteger5Number of developers on the team. Used for velocity impact estimation.

Example:

python scripts/debt_dashboard.py --input-dir ./debt_scans/ --period quarterly --team-size 10 --output dashboard --format both

Output Formats:

  • JSON: Contains metadata (generated date, period, snapshot count, date range, team size), executive_summary (overall status, health score, status message, key insights, total debt items, effort hours, high priority count, velocity impact percent), current_health (overall score, debt density, velocity impact, quality score, maintainability score, technical risk score), trend_analysis (per-metric trend direction, change rate, correlation strength, forecast, confidence interval), debt_velocity (per-period new/resolved items, net change, velocity ratio, effort hours added/resolved), forecasts (3-month and 6-month projections for health, debt count, risk), recommendations (prioritized strategic actions with category, impact, effort), visualizations (health timeline, debt accumulation, category distribution, velocity chart, effort trend arrays), and detailed_metrics.
  • Text: Executive summary with status and key metrics, current health metrics, trend analysis with directional indicators, and top 5 strategic recommendations with priority, impact, and effort ratings.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.41%
按下载量换算255

Claude

31.74%
按下载量换算229

Cursor

20.19%
按下载量换算146

Gemini CLI

10.54%
按下载量换算76

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills