testing-tdd-refactor-guard

Community

Prevent unsafe refactors with tests

AuthorAutisticAF
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents AI-assisted refactors from being applied to code that lacks sufficient tests, reducing regressions, debugging time, and accidental behavior changes.

Core Features & Use Cases

  • Pre-refactor safety check: Identifies scope, public API surface, and dependencies before any refactor is performed.
  • Coverage and quality assessment: Scans test targets for XCTest patterns, estimates coverage levels, and evaluates test quality (behavior vs. implementation).
  • Characterization test generation: When coverage is partial or missing, instructs or triggers generation of characterization tests to capture current behavior before refactoring.
  • Use case: Before migrating a repository module from CoreData to SwiftData or renaming public APIs, run this guard to ensure failing regressions will be caught by tests.

Quick Start

Run the testing-tdd-refactor-guard before asking the AI to refactor files like ItemManager.swift and ItemRepository.swift.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: testing-tdd-refactor-guard
Download link: https://github.com/AutisticAF/claude-code-apple-dev-plugin/archive/main.zip#testing-tdd-refactor-guard

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.