refactor-extract-and-isolate

Refactor: Extract and Isolate

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-extract-and-isolate" with this command: npx skills add cantagestudio/cosmicatlaspacker/cantagestudio-cosmicatlaspacker-refactor-extract-and-isolate

Refactor: Extract and Isolate

Break down complex code into focused, reusable units.

Extract Method

When to Extract

  • Function > 20 lines

  • Code block has a distinct purpose

  • Same logic repeated

  • Deep nesting (> 3 levels)

Extract Class

When to Extract

  • Class > 300 lines

  • Multiple distinct responsibilities

  • Group of related methods/properties

  • Feature envy

Extract Protocol/Interface

When to Extract

  • Multiple implementations possible

  • Testing requires mocking

  • Dependency inversion needed

Checklist

  • Identify extraction boundary

  • Choose good name for new unit

  • Move code to new location

  • Update references

  • Add tests for new unit

  • Verify original tests pass

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.

General

refactor-dedupe-and-cleanup

No summary provided by upstream source.

Repository SourceNeeds Review
General

design-tokens-validator

No summary provided by upstream source.

Repository SourceNeeds Review
General

ux-ascii-visualizer

No summary provided by upstream source.

Repository SourceNeeds Review
General

task-segmentation

No summary provided by upstream source.

Repository SourceNeeds Review