characterize-before-changing

Adds focused characterization tests that document existing code behavior before refactoring or bug fixes.

1|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/0xMuluh/package-development-skills --skill characterize-before-changing-0xmuluh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: characterize-before-changing
Source: https://github.com/0xMuluh/package-development-skills/tree/main/characterize-before-changing
Command: npx skills add https://github.com/0xMuluh/package-development-skills --skill characterize-before-changing-0xmuluh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Changing poorly tested or unfamiliar code risks silently breaking behavior users rely on. This Skill establishes the current behavioral boundary with focused characterization tests before any modification, so regressions are caught instead of discovered later. ## Core Features & Use Cases - Behavioral Boundary Definition: Guides you through explicit questions about intended changes, observable behavior, and what must remain unchanged. - Focused Characterization Tests: Prescribes minimal tests covering classes, dimensions, names, ordering, metadata, errors, and numerical tolerances rather than freezing implementation details. - Change-Type Playbooks: Provides tailored procedures for bug fixes, refactors, migrations, dependency replacements, API renames, and optimizations. - Use Case: Before migrating a public function to another package, characterize its result class, dimensions, names, and key values, then verify parity between source and destination implementations. ## Quick Start Ask the AI to characterize the current behavior of the function you plan to change and add focused tests before making the modification.

Frequently Asked Questions about characterize-before-changing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely refactor code that has no tests?▼

Add characterization tests first that document current observable behavior such as return types, dimensions, names, and error conditions. Once that behavioral boundary is protected, refactor the implementation and confirm all characterization tests still pass unchanged.

What is a characterization test in software maintenance?▼

A characterization test documents what code currently does at a boundary that matters, rather than what it ideally should do. It provides evidence of existing behavior so changes can be evaluated against a known baseline.

When is full characterization not necessary before a change?▼

A narrow bug fix may need only one regression test plus one or two nearby preservation checks, and a documentation typo needs none. Use the smallest amount of characterization required to make the intended change safe.

Should characterization tests cover private implementation details?▼

No. Avoid asserting private helper call order, internal object structure, or exact warning sequences, since that freezes accidental internals. Tests should protect user-relevant behavior while allowing the implementation to evolve.

How do I handle a known bug found during characterization?▼

Do not write a test that permanently expects the incorrect result. Document the observed bug separately from the desired behavior, then add a regression test for the corrected behavior as part of the bug fix.