refactor-test_skill

This skill analyzes test coverage and identifies gaps to guide pre-refactoring tests and verification checkpoints, reducing risk during code changes.
  • Shell

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill shotaiuchi/dotclaude --skill refactor-test

  • SKILL.md2.0 KB

Overview

This skill verifies test coverage and readiness before refactoring to reduce regression risk. It maps current tests, identifies coverage gaps, and produces prioritized recommendations and verification checkpoints. The goal is to make refactoring safe, measurable, and incremental.

How this skill works

The skill inspects test suites and source files in the refactoring scope, classifies tests as unit, integration, or brittle implementation-dependent tests, and highlights untested code paths. It outputs a gap analysis with impact ratings, recommends characterization and golden-master tests, and defines stepwise verification gates and post-deployment checks.

When to use it

  • Before starting any non-trivial refactor of existing code
  • When migrating modules, APIs, or shared libraries
  • Prior to changing business logic, error handling, or async/concurrent code
  • To validate readiness for large-scale cleanup or performance optimizations
  • When preparing a safe rollout with incremental verification checkpoints

Best practices

  • Map coverage per file and per behavior, not just overall percentage
  • Prioritize tests for critical paths and public APIs first
  • Add characterization or golden-master tests for complex or poorly understood behavior
  • Convert brittle tests to behavior-driven assertions that avoid implementation details
  • Define test gates and smoke tests for each migration step and include performance checks

Example use cases

  • Verify tests cover authentication, authorization, and payment flows before refactoring core services
  • Identify missing integration tests between frontend rendering and backend APIs before UI refactor
  • Create golden-master tests to lock complex serialization formats before changing serializers
  • Plan test gates and smoke tests when splitting a monolith into services
  • Add contract tests for public APIs before modifying endpoints or payload shapes

FAQ

A prioritized report that maps coverage, lists gaps with Impact ratings (Breaking/High/Medium/Low), recommends pre-refactoring tests, and defines verification checkpoints.

How do you rate impact?

Impact is based on whether missing tests affect critical user paths or public contracts: Breaking (unsafe), High (must fix), Medium (address during refactor), Low (acceptable risk).

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
refactor-test skill by shotaiuchi/dotclaude | VeilStrat