refactor

Solid

Refactor code to improve structure and maintainability

AI & Automation 859 stars 98 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
98
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
50
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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

Details

Author
vstorm-co
Repository
vstorm-co/pydantic-deepagents
Created
6 months ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category