behavior-preservation-checker

Compare runtime behavior between original and migrated code repositories.

142|14|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill behavior-preservation-checker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: behavior-preservation-checker
Source: https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/behavior-preservation-checker
Command: npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill behavior-preservation-checker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automatically detects and reports behavioral differences between two versions of a codebase, ensuring that code migrations, refactorings, or updates do not introduce regressions or alter intended functionality.

Core Features & Use Cases

  • Automated Comparison: Compares test results, execution traces, and observable outputs between original and migrated codebases.
  • Regression Detection: Identifies tests that fail in the new version but passed in the old, or vice-versa.
  • Actionable Guidance: Provides specific recommendations for fixing detected behavioral deviations.
  • Use Case: After migrating a critical service from Python 2 to Python 3, use this Skill to confirm that all existing tests still pass and that the application's runtime behavior remains identical, preventing unexpected production issues.

Quick Start

Use the behavior-preservation-checker skill to compare the code in '/path/to/original/repo' with the code in '/path/to/migrated/repo' and save the report to 'comparison_report.json'.

Frequently Asked Questions about behavior-preservation-checker

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

FAQPage Schema
How do I check for behavioral regressions after a code migration?

To check for behavioral regressions after a code migration, compare test outcomes, execution traces, and observable outputs between the original and migrated codebases to detect semantic changes and ensure behavioral equivalence.

What is behavioral equivalence testing during refactoring?

Behavioral equivalence testing during refactoring is the process of analyzing runtime behavior and observable outputs between original and updated code repositories to verify that code transformations do not introduce unintended semantic changes or regressions.

Do I need pytest to run automated behavior comparison scripts?

Yes, you need pytest to run the automated behavior comparison scripts. The Skill requires pytest as a dependency to execute tests and analyze test outcomes when comparing original and migrated code repositories.

What is the best way to verify Python 2 to Python 3 migration behavior?

The best way to verify Python 2 to Python 3 migration behavior is to automatically compare test results and execution traces between the original and migrated repositories to confirm that all existing tests still pass and runtime behavior remains identical.

Why does my migrated code fail tests that previously passed?

Migrated code fails tests that previously passed due to behavioral deviations introduced during the code transformation. The Skill identifies these specific regressions by comparing test outcomes between the original and migrated codebases and provides actionable guidance for fixing them.

Can I save a code comparison report to a specific file path?

Yes, you can save a code comparison report to a specific file path. The Skill allows you to compare original and migrated repositories and save the detailed behavioral comparison output directly to a JSON file.