Token导航 LogoToken导航TokenDH.com
运维和基础设施需要联网github未标认证来源可访问clear审计通过

codebase-cleanup-tech-debt代码库清理技术债务

Agent Skill

codebase-cleanup-tech-debt 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

582

周安装

25

GitHub Stars

693

下载量

204
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/rmyndharis/antigravity-skills --skill codebase-cleanup-tech-debt

简介

codebase-cleanup-tech-debt 专门处理技术债务识别、量化与优先级排序,提供治理框架。

  • 适用于制定债务偿还路线图、资源分配决策及技术选型评估等战略规划场景。
  • 结合影响度与修复成本模型,输出可执行的重构计划与阶段性目标。
  • 超出纯分析范畴的任务应选用其他专项技能,确保职责边界清晰。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Technical Debt Analysis and Remediation

You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create actionable remediation plans.

Use this skill when

  • Working on technical debt analysis and remediation tasks or workflows
  • Needing guidance, best practices, or checklists for technical debt analysis and remediation

Do not use this skill when

  • The task is unrelated to technical debt analysis and remediation
  • You need a different domain or tool outside this scope

Context

The user needs a comprehensive technical debt analysis to understand what's slowing down development, increasing bugs, and creating maintenance challenges. Focus on practical, measurable improvements with clear ROI.

Requirements

$ARGUMENTS

Instructions

1. Technical Debt Inventory

Conduct a thorough scan for all types of technical debt:

Code Debt

  • Duplicated Code

- Exact duplicates (copy-paste) - Similar logic patterns - Repeated business rules - Quantify: Lines duplicated, locations

  • Complex Code

- High cyclomatic complexity (>10) - Deeply nested conditionals (>3 levels) - Long methods (>50 lines) - God classes (>500 lines, >20 methods) - Quantify: Complexity scores, hotspots

  • Poor Structure

- Circular dependencies - Inappropriate intimacy between classes - Feature envy (methods using other class data) - Shotgun surgery patterns - Quantify: Coupling metrics, change frequency

Architecture Debt

  • Design Flaws

- Missing abstractions - Leaky abstractions - Violated architectural boundaries - Monolithic components - Quantify: Component size, dependency violations

  • Technology Debt

- Outdated frameworks/libraries - Deprecated API usage - Legacy patterns (e.g., callbacks vs promises) - Unsupported dependencies - Quantify: Version lag, security vulnerabilities

Testing Debt

  • Coverage Gaps

- Untested code paths - Missing edge cases - No integration tests - Lack of performance tests - Quantify: Coverage %, critical paths untested

  • Test Quality

- Brittle tests (environment-dependent) - Slow test suites - Flaky tests - No test documentation - Quantify: Test runtime, failure rate

Documentation Debt

  • Missing Documentation

- No API documentation - Undocumented complex logic - Missing architecture diagrams - No onboarding guides - Quantify: Undocumented public APIs

Infrastructure Debt

  • Deployment Issues

- Manual deployment steps - No rollback procedures - Missing monitoring - No performance baselines - Quantify: Deployment time, failure rate

2. Impact Assessment

Calculate the real cost of each debt item:

Development Velocity Impact

Debt Item: Duplicate user validation logic
Locations: 5 files
Time Impact:
- 2 hours per bug fix (must fix in 5 places)
- 4 hours per feature change
- Monthly impact: ~20 hours
Annual Cost: 240 hours × $150/hour = $36,000

Quality Impact

Debt Item: No integration tests for payment flow
Bug Rate: 3 production bugs/month
Average Bug Cost:
- Investigation: 4 hours
- Fix: 2 hours
- Testing: 2 hours
- Deployment: 1 hour
Monthly Cost: 3 bugs × 9 hours × $150 = $4,050
Annual Cost: $48,600

Risk Assessment

  • Critical: Security vulnerabilities, data loss risk
  • High: Performance degradation, frequent outages
  • Medium: Developer frustration, slow feature delivery
  • Low: Code style issues, minor inefficiencies

3. Debt Metrics Dashboard

Create measurable KPIs:

Code Quality Metrics

Metrics:
  cyclomatic_complexity:
    current: 15.2
    target: 10.0
    files_above_threshold: 45

  code_duplication:
    percentage: 23%
    target: 5%
    duplication_hotspots:
      - src/validation: 850 lines
      - src/api/handlers: 620 lines

  test_coverage:
    unit: 45%
    integration: 12%
    e2e: 5%
    target: 80% / 60% / 30%

  dependency_health:
    outdated_major: 12
    outdated_minor: 34
    security_vulnerabilities: 7
    deprecated_apis: 15

Trend Analysis

debt_trends = {
    "2024_Q1": {"score": 750, "items": 125},
    "2024_Q2": {"score": 820, "items": 142},
    "2024_Q3": {"score": 890, "items": 156},
    "growth_rate": "18% quarterly",
    "projection": "1200 by 2025_Q1 without intervention"
}

4. Prioritized Remediation Plan

Create an actionable roadmap based on ROI:

Quick Wins (High Value, Low Effort) Week 1-2:

1. Extract duplicate validation logic to shared module
   Effort: 8 hours
   Savings: 20 hours/month
   ROI: 250% in first month

2. Add error monitoring to payment service
   Effort: 4 hours
   Savings: 15 hours/month debugging
   ROI: 375% in first month

3. Automate deployment script
   Effort: 12 hours
   Savings: 2 hours/deployment × 20 deploys/month
   ROI: 333% in first month

Medium-Term Improvements (Month 1-3)

1. Refactor OrderService (God class)
   - Split into 4 focused services
   - Add comprehensive tests
   - Create clear interfaces
   Effort: 60 hours
   Savings: 30 hours/month maintenance
   ROI: Positive after 2 months

2. Upgrade React 16 → 18
   - Update component patterns
   - Migrate to hooks
   - Fix breaking changes
   Effort: 80 hours
   Benefits: Performance +30%, Better DX
   ROI: Positive after 3 months

Long-Term Initiatives (Quarter 2-4)

1. Implement Domain-Driven Design
   - Define bounded contexts
   - Create domain models
   - Establish clear boundaries
   Effort: 200 hours
   Benefits: 50% reduction in coupling
   ROI: Positive after 6 months

2. Comprehensive Test Suite
   - Unit: 80% coverage
   - Integration: 60% coverage
   - E2E: Critical paths
   Effort: 300 hours
   Benefits: 70% reduction in bugs
   ROI: Positive after 4 months

5. Implementation Strategy

Incremental Refactoring

# Phase 1: Add facade over legacy code
class PaymentFacade:
    def __init__(self):
        self.legacy_processor = LegacyPaymentProcessor()

    def process_payment(self, order):
        # New clean interface
        return self.legacy_processor.doPayment(order.to_legacy())

# Phase 2: Implement new service alongside
class PaymentService:
    def process_payment(self, order):
        # Clean implementation
        pass

# Phase 3: Gradual migration
class PaymentFacade:
    def __init__(self):
        self.new_service = PaymentService()
        self.legacy = LegacyPaymentProcessor()

    def process_payment(self, order):
        if feature_flag("use_new_payment"):
            return self.new_service.process_payment(order)
        return self.legacy.doPayment(order.to_legacy())

Team Allocation

Debt_Reduction_Team:
  dedicated_time: "20% sprint capacity"

  roles:
    - tech_lead: "Architecture decisions"
    - senior_dev: "Complex refactoring"
    - dev: "Testing and documentation"

  sprint_goals:
    - sprint_1: "Quick wins completed"
    - sprint_2: "God class refactoring started"
    - sprint_3: "Test coverage >60%"

6. Prevention Strategy

Implement gates to prevent new debt:

Automated Quality Gates

pre_commit_hooks:
  - complexity_check: "max 10"
  - duplication_check: "max 5%"
  - test_coverage: "min 80% for new code"

ci_pipeline:
  - dependency_audit: "no high vulnerabilities"
  - performance_test: "no regression >10%"
  - architecture_check: "no new violations"

code_review:
  - requires_two_approvals: true
  - must_include_tests: true
  - documentation_required: true

Debt Budget

debt_budget = {
    "allowed_monthly_increase": "2%",
    "mandatory_reduction": "5% per quarter",
    "tracking": {
        "complexity": "sonarqube",
        "dependencies": "dependabot",
        "coverage": "codecov"
    }
}

7. Communication Plan

Stakeholder Reports

## Executive Summary
- Current debt score: 890 (High)
- Monthly velocity loss: 35%
- Bug rate increase: 45%
- Recommended investment: 500 hours
- Expected ROI: 280% over 12 months

## Key Risks
1. Payment system: 3 critical vulnerabilities
2. Data layer: No backup strategy
3. API: Rate limiting not implemented

## Proposed Actions
1. Immediate: Security patches (this week)
2. Short-term: Core refactoring (1 month)
3. Long-term: Architecture modernization (6 months)

Developer Documentation

## Refactoring Guide
1. Always maintain backward compatibility
2. Write tests before refactoring
3. Use feature flags for gradual rollout
4. Document architectural decisions
5. Measure impact with metrics

## Code Standards
- Complexity limit: 10
- Method length: 20 lines
- Class length: 200 lines
- Test coverage: 80%
- Documentation: All public APIs

8. Success Metrics

Track progress with clear KPIs:

Monthly Metrics

  • Debt score reduction: Target -5%
  • New bug rate: Target -20%
  • Deployment frequency: Target +50%
  • Lead time: Target -30%
  • Test coverage: Target +10%

Quarterly Reviews

  • Architecture health score
  • Developer satisfaction survey
  • Performance benchmarks
  • Security audit results
  • Cost savings achieved

Output Format

  1. Debt Inventory: Comprehensive list categorized by type with metrics
  2. Impact Analysis: Cost calculations and risk assessments
  3. Prioritized Roadmap: Quarter-by-quarter plan with clear deliverables
  4. Quick Wins: Immediate actions for this sprint
  5. Implementation Guide: Step-by-step refactoring strategies
  6. Prevention Plan: Processes to avoid accumulating new debt
  7. ROI Projections: Expected returns on debt reduction investment

Focus on delivering measurable improvements that directly impact development velocity, system reliability, and team morale.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Codex

25.77%
按下载量换算53

Antigravity

21.01%
按下载量换算43

windsurf

17.67%
按下载量换算36

trae

13.69%
按下载量换算28

Claude Code

7.99%
按下载量换算16

OpenCode

3.39%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills