implement-refactor

Restructure code without changing user-facing 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 "implement-refactor" with this command: npx skills add dthompson-jti/safety-check-app-concept/dthompson-jti-safety-check-app-concept-implement-refactor

Implement Refactor

Restructure code without changing user-facing behavior.

When to Use

  • Code cleanup

  • Reducing tech debt

  • Improving maintainability

  • Extracting shared patterns

Artifacts

  • task.md updated via task_boundary

Approach

Phase 1: Scope Definition

  • Refactoring Goal: Specific code smell or tech debt

  • Behavior Invariants: List behaviors that MUST NOT change

  • Scope Boundaries: In-scope vs out-of-scope files

Phase 2: Safety Net

  • List existing tests

  • Define manual verification for each invariant

Phase 3: Refactoring Plan

List atomic transformation steps.

Reflexion Loop: Act as Hostile Reviewer — identify 3 ways refactoring could break behavior. Revise plan.

Phase 4: Execution

For each step:

  • Make one change

  • Verify behavior unchanged

  • Run npm run lint

  • Run npm run build

  • Repeat

Phase 5: Verification

  • All behavior invariants verified

  • Lint/build pass

  • No regressions

Constraints

  • NO behavior changes

  • If bug discovered, note but do NOT fix (separate concern)

  • Each transformation independently reversible

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.

Research

research-deep

No summary provided by upstream source.

Repository SourceNeeds Review
Security

audit-layout

No summary provided by upstream source.

Repository SourceNeeds Review
Security

audit-code

No summary provided by upstream source.

Repository SourceNeeds Review
Security

audit-accessibility

No summary provided by upstream source.

Repository SourceNeeds Review