codebase-cleanup-refactor-clean
できること
プログラムコードの品質を高めるためのツールです。コードを分析し、理解しやすく、保守しやすく、そして高速にするための変更案を提案します。
使う場面
- ✓コードが大きくなり、分かりにくくなってきたとき。
- ✓繰り返しの多い部分を取り除き、コードを簡潔にしたいとき。
- ✓プロジェクトに新しい機能を追加する前。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/codebase-cleanup-refactor-clean/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このPythonコードを整理して、読みやすくなるようにリファクタリングしてもらえますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIはコードによくある問題を調べ、改善案を提案します。良いプログラミングの習慣に従いながら、コードをより分かりやすく、安定したものにすることを目指します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Refactor and Clean Code
You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.
Use this skill when
- Cleaning up large codebases with accumulated debt
- Removing duplication and simplifying modules
- Preparing a codebase for new feature work
- Aligning implementation with clean code standards
Do not use this skill when
- You only need a tiny targeted fix
- Refactoring is blocked by policy or deadlines
- The request is documentation-only
Context
The user needs help refactoring code to make it cleaner, more maintainable, and aligned with best practices. Focus on practical improvements that enhance code quality without over-engineering.
Requirements
$ARGUMENTS
Instructions
- Identify high-impact refactor candidates and risks.
- Break work into small, testable steps.
- Apply changes with a focus on readability and stability.
- Validate with tests and targeted regression checks.
- If detailed patterns are required, open
resources/implementation-playbook.md.
Safety
- Avoid large rewrites without agreement on scope.
- Keep changes reviewable and reversible.
Output Format
- Cleanup plan with prioritized steps
- Key refactor targets and rationale
- Expected impact and risk notes
- Test/verification plan
Resources
resources/implementation-playbook.mdfor detailed patterns and examples.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
よくある質問
「リファクタリング」とは何ですか?
動作を変えずに、コードの書き方を改善することです。散らかった引き出しを整理して、目的のものをすぐ見つけられるようにするのに似ています。
「クリーンコードの原則」とは何ですか?
読みやすく理解しやすいコードを書くためのルールや指針です。よく構成された物語のように、流れが分かりやすいコードを目指します。
AIがコード全体を書き直しますか?
いいえ。AIは品質を高めるための、的を絞った変更を提案します。大きな書き直しは、あなたの同意と計画があった場合にのみ行われます。
詳細
作者による元の説明
You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.
人気
- GitHubのスター
- 48k
- ランキング
- #4200
- ライセンス
- 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のイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。