本文へスキップ
Skillpedia
一般的なプログラミング48k · #4184

code-refactoring-refactor-clean

できること

このツールは、プログラミングコードを改善するためのものです。優れたソフトウェア設計の方針に沿って、コードを理解しやすく、保守しやすく、効率的にします。

使う場面

  • ✓コードが分かりにくく、修正が難しいとき。
  • ✓繰り返しや複雑な部分をなくしたいとき。
  • ✓新しい機能を安全に追加できるよう、コードを整えたいとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/code-refactoring-refactor-clean/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/code-refactoring-refactor-clean/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“このコードを、よりきれいで理解しやすい形にリファクタリングしてもらえますか?”

毎週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

  • Refactoring tangled or hard-to-maintain code
  • Reducing duplication, complexity, or code smells
  • Improving testability and design consistency
  • Preparing modules for new features safely

Do not use this skill when

  • You only need a small one-line fix
  • Refactoring is prohibited due to change freeze
  • The request is for 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

  • Assess code smells, dependencies, and risky hotspots.
  • Propose a refactor plan with incremental steps.
  • Apply changes in small slices and keep behavior stable.
  • Update tests and verify regressions.
  • If detailed patterns are required, open resources/implementation-playbook.md.

Safety

  • Avoid changing external behavior without explicit approval.
  • Keep diffs reviewable and ensure tests pass.

Output Format

  • Summary of issues and target areas
  • Refactor plan with ordered steps
  • Proposed changes and expected impact
  • Test/verification notes

Resources

  • resources/implementation-playbook.md for 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.
よくある質問

「コードの臭い(コードスメル)」とは何ですか?

コードの中に、何か問題がある、または改善できる余地があることを示す兆候のことです。たとえば、同じ処理の繰り返しや、過度な複雑さなどが当てはまります。

「SOLID」とは何ですか?

ソフトウェアをより理解しやすく、柔軟で、保守しやすくするための5つの設計原則のことです。

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.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#4184
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル