Skip to content
cccskills
FreePublished on GitHub

refactor

Refactor code to improve structure and maintainability

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md1.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Building, compiling, and resolving dependency issues across languages

The English summary is being prepared. Showing the original description.

vstorm-co/pydantic-deepagents1.1KUpdated Oct 6, 2026

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

The English summary is being prepared. Showing the original description.

vstorm-co/pydantic-deepagents1.1KUpdated Oct 6, 2026

Review Python code for quality, security, and best practices

The English summary is being prepared. Showing the original description.

vstorm-co/pydantic-deepagents1.1KUpdated Oct 6, 2026

Comprehensive data analysis skill for CSV files using Python and pandas

The English summary is being prepared. Showing the original description.

vstorm-co/pydantic-deepagents1.1KUpdated Oct 6, 2026

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

The English summary is being prepared. Showing the original description.

vstorm-co/pydantic-deepagents1.1KUpdated Oct 6, 2026

Best practices for creating research diagrams with Excalidraw MCP tools

The English summary is being prepared. Showing the original description.

vstorm-co/pydantic-deepagents1.1KUpdated Oct 6, 2026

See all skills by vstorm-co

Report a problem with this skill