a5c-ai/babysitter/characterization-test-generator
Claude Code and agent skill by a5c-ai/babysitter
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Generate characterization tests to capture and verify existing behavior before migration
Install
npx vskill@latest install a5c-ai/babysitter/characterization-test-generatorSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as a5c-ai/babysitter/characterization-test-generator.
Characterization Test Generator Skill
Generates characterization tests (also known as golden master tests or approval tests) to capture existing system behavior before migration, ensuring functional equivalence after changes.
Purpose
Enable behavior preservation during migration through:
- Golden master test creation
- Approval test generation
- Edge case discovery
- Input/output recording
- Behavior snapshot capture
- Regression baseline establishment
Capabilities
1. Golden Master Test Creation
- Capture current system outputs for given inputs
- Store outputs as reference "golden" files
- Generate comparison test infrastructure
- Support multiple output formats
- Enable baseline versioning
2. Approval Test Generation
- Create human-reviewable test outputs
- Generate diff-based comparison tests
- Support approval workflows
- Enable incremental approval
- Track approval history
3. Edge Case Discovery
- Analyze code paths for boundary conditions
- Generate boundary value inputs
- Identify error handling scenarios
- Map exception paths
- Create comprehensive test coverage
4. Input/Output Recording
- Instrument code for I/O capture
- Record API request/response pairs
- Capture database interactions
- Log external service calls
- Store timing and sequence data
5. Behavior Snapshot
- Capture state at key points
- Record side effects
- Document non-deterministic behavior
- Identify environmental dependencies
- Map configuration impacts
6. Regression Baseline Establishment
- Create baseline test suites
- Define acceptance thresholds
- Configure tolerance levels
- Set up CI/CD integration
- Generate coverage reports
Tool Integrations
This skill can leverage the following external tools when available:
| Tool | Purpose | Integration Method | |
|---|---|---|---|
| ApprovalTests | Approval testing framework | Library | |
| Jest snapshots | JavaScript snapshot testing | Framework | |
| pytest-snapshot | Python snapshot testing | Plugin | |
| TextTest | Golden master testing | CLI | |
| Verify | .NET approval testing | Library | |
| Scientist | Safe refactoring library | Library | |
| AI Testing MCP | AI-powered test generation | MCP Server |
Usage
Basic Test Generation
Generation Workflow
- Analysis Phase
- Identify testable units (functions, methods, endpoints)
- Map input parameters and types
- Detect output formats
- Find external dependencies
- Input Discovery Phase
- Extract existing test inputs
- Generate boundary values
- Identify representative cases
- Create combinatorial inputs
- Capture Phase
- Execute code with inputs
- Record outputs and side effects
- Capture state changes
- Log external interactions
- Test Generation Phase
- Generate test code structure
- Create golden master files
- Set up comparison logic
- Configure CI integration
Output Schema
Integration with Migration Processes
This skill integrates with the following Code Migration/Modernization processes:
- migration-testing-strategy: Primary tool for test baseline creation
- code-refactoring: Ensure behavior preservation during refactoring
- framework-upgrade: Verify functionality after upgrade
- monolith-to-microservices: Validate service extraction
Configuration
Skill Configuration File
Create .characterization-tests.json in the project root:
MCP Server Integration
When AI Testing MCP Server is available:
Test Patterns
Snapshot Testing (Jest)
Approval Testing (ApprovalTests)
Recording Tests (Python)
Edge Case Categories
Boundary Values
- Minimum/maximum values
- Zero values
- Empty strings/arrays
- Null/undefined values
- Type boundaries (INT_MAX, etc.)
Error Conditions
- Invalid inputs
- Missing required fields
- Type mismatches
- Constraint violations
- Authentication failures
Concurrent Scenarios
- Race conditions
- Deadlocks
- Timeout scenarios
- Partial failures
- Retry behaviors
Environmental
- Configuration variations
- Timezone differences
- Locale changes
- Feature flag states
- Permission levels
Best Practices
- Start Before Changes: Generate characterization tests before any migration work
- Capture Everything: Record all outputs, side effects, and state changes
- Version Golden Masters: Store golden masters in version control
- Review Approvals: Human review of initial golden masters is essential
- Handle Non-Determinism: Normalize timestamps, IDs, and random values
- Incremental Updates: Update baselines incrementally as changes are approved
- CI Integration: Fail builds on unexpected behavior changes
Related Skills
test-coverage-analyzer: Analyze coverage gapsmigration-validator: Validate migration resultsstatic-code-analyzer: Identify testable code paths
Related Agents
migration-testing-strategist: Uses this skill for test strategyregression-detector: Uses this skill for regression detectionparallel-run-validator: Uses this skill for comparison testing
References
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinglibrary/specializations/code-migration-modernization/skills/characterization-test-generator/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/a5c-ai/babysitter/characterization-test-generator)