askill
refactor-extract-and-isolate

refactor-extract-and-isolateSafety 45Repository

[Code Quality] Extracts methods, classes, or modules to reduce complexity and improve isolation. Use when functions are too long, classes have too many responsibilities, or concerns are mixed.

2 stars
1.2k downloads
Updated 12/25/2025

Package Files

Loading files...
SKILL.md

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

  1. Identify extraction boundary
  2. Choose good name for new unit
  3. Move code to new location
  4. Update references
  5. Add tests for new unit
  6. Verify original tests pass

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

50/100Analyzed 2/22/2026

A moderately structured skill covering code extraction concepts (method, class, protocol) with 'when to extract' criteria and a checklist. The content is logically organized but lacks actionable implementation details, code examples, or tool-specific guidance. Located in .factory directory suggesting internal tool usage. Could serve as a template but requires significant elaboration for practical use.

45
75
55
45
40

Metadata

Licenseunknown
Version-
Updated12/25/2025
PublisherCANTAGESTUDIO

Tags

No tags yet.