本文へ移動
cccskills
無料GitHub で公開

refactor

Refactor code to improve structure and maintainability

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Refactor

Improve code structure without changing external behavior.

Process

  1. Understand — Read all related code, run existing tests
  2. Plan — Identify what to change and why
  3. Execute — Make changes incrementally
  4. Verify — Run tests after each change

Common Refactoring Patterns

Extract

  • Long function → smaller focused functions
  • Repeated code → shared helper
  • Magic numbers → named constants

Simplify

  • Deep nesting → early returns / guard clauses
  • Complex conditionals → descriptive functions
  • Large classes → smaller focused classes

Rename

  • Unclear names → descriptive names
  • Inconsistent naming → consistent conventions

Reorganize

  • Related functions scattered → grouped in modules
  • Circular dependencies → dependency inversion

Rules

  • Never change behavior — tests must pass before and after
  • One refactoring type per commit
  • If tests don't exist, write them first
  • Don't refactor and add features in the same change

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Building, compiling, and resolving dependency issues across languages

日本語の概要は準備中です。原文の説明を表示しています。

vstorm-co/pydantic-deepagents1,0782026年10月6日 更新

Review Python code for quality, security, and best practices

日本語の概要は準備中です。原文の説明を表示しています。

vstorm-co/pydantic-deepagents1,0782026年10月6日 更新

Systematic code review for bugs, security, style, and performance

日本語の概要は準備中です。原文の説明を表示しています。

vstorm-co/pydantic-deepagents1,0782026年10月6日 更新

Comprehensive data analysis skill for CSV files using Python and pandas

日本語の概要は準備中です。原文の説明を表示しています。

vstorm-co/pydantic-deepagents1,0782026年10月6日 更新

Working with diverse data formats: binary, text, structured, and custom

日本語の概要は準備中です。原文の説明を表示しています。

vstorm-co/pydantic-deepagents1,0782026年10月6日 更新

Best practices for creating research diagrams with Excalidraw MCP tools

日本語の概要は準備中です。原文の説明を表示しています。

vstorm-co/pydantic-deepagents1,0782026年10月6日 更新

vstorm-co のスキルをすべて見る

このスキルの問題を報告する