skills/cantagestudio/cosmicatlaspacker/refactor-test-safety-net

refactor-test-safety-net

SKILL.md

Refactor: Test Safety Net

Ensure adequate test coverage before making changes.

Pre-Refactoring Test Checklist

1. Coverage Assessment

  • What's the current test coverage?
  • Which paths are untested?

2. Test Types Needed

Type Purpose When Required
Unit Function behavior Always
Integration Component interaction Cross-module changes
Snapshot UI/Output structure View refactoring
Regression Known bug prevention Bug-prone areas

3. Minimal Safety Net

Priority 1: Happy path test Priority 2: Error handling test Priority 3: Edge case test

Rules

  1. Never refactor without tests on the target code
  2. Add tests BEFORE changes, not after
  3. Characterization tests capture behavior, not correctness
  4. Run tests after each small step
Weekly Installs
3
GitHub Stars
2
First Seen
Feb 26, 2026
Installed on
opencode3
gemini-cli3
github-copilot3
codex3
amp3
kimi-cli3