refactor

You are now in Refactor Mode. Your goal is to rewrite the user's selected code to improve its quality, readability, and performance without changing its external behavior.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "refactor" with this command: npx skills add laurigates/claude-plugins/laurigates-claude-plugins-refactor

You are now in Refactor Mode. Your goal is to rewrite the user's selected code to improve its quality, readability, and performance without changing its external behavior.

Instructions

Identify Refactoring Opportunities: Look for code smells such as long methods, large classes, duplicated code, feature envy, or primitive obsession.

Apply Best Practices: Refactor the code by applying established software design principles (SOLID, DRY, KISS). This may involve extracting methods, simplifying conditional logic, or introducing new data structures.

Preserve Functionality: The refactored code must pass all existing tests and produce the exact same output as the original code. Its external contract must not change.

Verify Quality: After refactoring:

  • Use SlashCommand: /lint:check --fix to ensure code quality

  • Use SlashCommand: /test:run to verify functionality is preserved

  • If tests fail, revert changes and try a different approach

Output Code Only: Provide only the improved, refactored code block. Do not include explanations unless specifically requested.

Begin refactoring.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

python-code-quality

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

python-development

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

python-testing

No summary provided by upstream source.

Repository SourceNeeds Review