behavior-preservation-checker

behavior-preservation-checker is a skill for Claude Code, Codex from ArabelaTso/Skills-4-SE. It costs 81 tokens per session (2,111 once invoked), scanned A, original, Apache-2.0.

A tool for checking whether a migrated or refactored codebase still behaves like the original. A migration changes a project’s technology or structure, while refactoring changes its design without intending to change results.

In plain words
What is it for?
Use it to compare original and migrated repositories, run the same tests on both, detect mismatched outputs or APIs, and investigate performance changes.
Why use it?
It finds regressions and other differences that may be introduced during a rewrite, language port, or framework upgrade. It compares tests, runtime traces, outputs, performance, and API contracts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/compare_api_outputs.py \.

Good fit Use it to compare original and migrated repositories, run the same tests on both, detect mismatched outputs or APIs, and investigate performance changes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE
agentmods
npx agentmods add skills/arabelatso/skills-4-se/behavior-preservation-checker

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for behavior-preservation-checker

README.md
[![agentmods](https://agentmods.dev/badge/skills/arabelatso/skills-4-se/behavior-preservation-checker/github.svg)](https://agentmods.dev/skills/arabelatso/skills-4-se/behavior-preservation-checker)
Your own site
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/behavior-preservation-checker"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/behavior-preservation-checker/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for behavior-preservation-checker

Your own site · 80×15
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/behavior-preservation-checker"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/behavior-preservation-checker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,111 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00081 $0.02111
Opus 5.5 $0.00032 $0.00844
Sonnet 5.5 $0.00016 $0.00422
Haiku 4.5 $0.00008 $0.00211

Measured 3mo ago against content hash 552fdaca166f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

behavior-preservation-checker scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/behavior_checker.py, scripts/compare_test_results.py, scripts/compare_traces.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/behavior-preservation-checker/SKILL.md · 344 lines

How it starts

The opening of the file, as written. The whole thing — 344 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Behavior Preservation Checker

Overview

Validate that a migrated or refactored codebase preserves the original behavior by automatically comparing runtime behavior, test results, execution traces, and observable outputs between two repository versions.

Core Workflow

1. Setup Repositories

Prepare both repositories for comparison:

# Clone or locate repositories
ORIGINAL_REPO=/path/to/original
MIGRATED_REPO=/path/to/migrated

# Ensure both are at comparable states
cd $ORIGINAL_REPO && git checkout main
cd $MIGRATED_REPO && git checkout main

2. Run Behavior Comparison

Use the comparison script to analyze behavioral differences:

python scripts/behavior_checker.py \
    --original $ORIGINAL_REPO \
    --migrated $MIGRATED_REPO \
    --output behavior_report.json

3. Review Results

Examine the generated report for:

  • Test result differences
  • Execution trace divergences
  • Output mismatches
  • Performance regressions
  • API contract violations

4. Fix Deviations

Follow actionable guidance to resolve behavioral differences.

Comparison Methods

Method 1: Test-Based Comparison

Run the same test suite on both repositories and compare results:

Workflow:

  1. Identify common test suite (or create equivalent tests)
  2. Run tests on original repository
  3. Run tests on migrated repository
  4. Compare pass/fail status, assertions, and outputs

Example:

# Run on original
cd $ORIGINAL_REPO
pytest tests/ --json-report --json-report-file=original_results.json

# Run on migrated
cd $MIGRATED_REPO
pytest tests/ --json-report --json-report-file=migrated_results.json

# Compare
python scripts/compare_test_results.py \
    original_results.json \
    migrated_results.json

Method 2: Execution Trace Comparison

Capture and compare execution traces:

Workflow:

  1. Instrument code to capture function calls, arguments, and return values
  2. Run identical inputs through both versions
  3. Compare execution traces for divergences

Read the full file on GitHub · 344 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 344 lines · 81 tokens per session scan A 552fdaca166f

Subscribe to this mod's changes

behavior-preservation-checker is a skill published in the GitHub repository ArabelaTso/Skills-4-SE (262 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 81 tokens to every session and 2,111 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

behavior-preservation-checker compared with skills from other repositories

behavior-preservation-checker next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
behavior-preservation-checkerArabelaTso/Skills-4-SESkill2623mo agoApache-2.0A81Claude Code, Codex
skill-code-qualitysaitarrun/Sdlc-ai-workflowSkill82mo agononeA34Claude Code
skill-pr-reviewsaitarrun/Sdlc-ai-workflowSkill82mo agononeA65Claude Code
teachsaitarrun/Sdlc-ai-workflowSkill82mo agononeA15Claude Code
improve-codebase-architecturesaitarrun/Sdlc-ai-workflowSkill82mo agononeA68Claude Code
skill-developer-relationssaitarrun/Sdlc-ai-workflowSkill82mo agononeA46Claude Code
diagnosesaitarrun/Sdlc-ai-workflowSkill82mo agononeA66Claude Code