codebase-cleanup-tech-debt
できること
このツールは、プロジェクトのコードを分析して、重複したコード、複雑すぎるコード、古くなったコードなど、技術的な問題(テクニカルデット)を見つけます。それぞれの問題がどれくらい影響しているかを把握でき、開発を改善するためにどれから直すとよいかを提案します。
使う場面
- ✓新しい機能の開発が遅くなってきたとき。
- ✓バグがよく発生するようになったとき。
- ✓古いプロジェクトを改善する計画を立てたいとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/codebase-cleanup-tech-debt/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このプロジェクトのコードを分析して、一番大きな技術的な問題と、それをどこから直していけばよいかを教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
コードや変更履歴などのデータを調べて、問題のある箇所を特定します。そのあと、それらの問題にかかるコストを見積もり、優先順位をつけた対応計画を提案します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Compatibility and maintenance
Compatibility alias of code-refactoring-tech-debt; use that ID for new references when no existing contract requires this one. The full instructions and support files remain local so existing installations
continue to work offline. This is one shared procedure, not an additional capability.
Preserve the callable ID when an existing manifest or client configuration uses it.
Modified in AAS on 2026-09-05; original metadata and license notices are retained.
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
Inspect the current repository, hotspots and real change/incident history. The numbers, thresholds, staffing and timelines below are hypothetical planning examples, not measurements, promised returns or mandatory quality gates. Report missing cost/usage inputs as unknown; never fill them with fabricated telemetry. Review-only scope does not authorize broad refactors, policy changes or deployment.
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
…
よくある質問
「テクニカルデット」とは何ですか?
ソフトウェア開発で近道をしたり、ベストプラクティスに従わなかったりすることで蓄積される「借金」のようなものです。コードが理解しにくくなったり、エラーが起きやすくなったり、変更に時間がかかるようになったりします。
どのような問題を見つけられますか?
重複したコード、複雑すぎるコード、構造上の問題、古い技術の利用、テストの不足、ドキュメントの不備、インフラに関する問題などを見つけます。
どの問題から直すかはどうやって決めるのですか?
修正による効果(節約できる時間やお金)と、実装に必要な手間の両方をもとに優先順位を決めます。すばやく効率よく解決できるものを重視します。
詳細
作者による元の説明
Identify technical debt from actual code and change history, estimate its impact, and prioritize bounded improvements with explicit assumptions.
人気
- GitHubのスター
- 48k
- ランキング
- #4201
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。