migration-validator

migration-validator is a skill for Claude Code from JuanMarchetto/agent-skills. It costs 51 tokens per session (1,183 once invoked), scanned A, original, MIT.

A checklist for checking that C code converted to Rust still compiles, behaves the same, and uses safe Rust practices.

In plain words
What is it for?
It is for reviewing C-to-Rust migrations, comparing both programs with the same inputs, and checking compilation, errors, formatting, memory safety, and unsafe blocks.
Why use it?
It helps catch changed behavior, unsafe code, missing edge cases, and differences between the original C program and its Rust version.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the migration-validator plugin — 1 skill shipped together

Good fit It is for reviewing C-to-Rust migrations, comparing both programs with the same inputs, and checking compilation, errors, formatting, memory safety, and unsafe blocks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/juanmarchetto/agent-skills/migration-validator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JuanMarchetto/agent-skills --skill migration-validator
Clone the repo
git clone --depth 1 https://github.com/JuanMarchetto/agent-skills

Made for: Claude Code.

Or install migration-validator, the plugin that ships this one along with the rest of its 1 skill.

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 migration-validator

README.md
[![agentmods](https://agentmods.dev/badge/skills/juanmarchetto/agent-skills/migration-validator.svg)](https://agentmods.dev/skills/juanmarchetto/agent-skills/migration-validator)
Your own site
<a href="https://agentmods.dev/skills/juanmarchetto/agent-skills/migration-validator"><img src="https://agentmods.dev/badge/skills/juanmarchetto/agent-skills/migration-validator.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,183 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.
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.00051 $0.01183
Opus 5 $0.00026 $0.00592
Sonnet 5 $0.00010 $0.00237
Haiku 4.5 $0.00005 $0.00118

Measured 4d ago against content hash 78fd3c84c7b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

migration-validator 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 4d ago.

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/migration-validator/SKILL.md · 88 lines

How it starts

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

Migration Validation Checklist

Compilation Check

  • Rust code compiles with rustc --edition 2024
  • No errors, only warnings acceptable if minor
  • Clippy passes with 0 warnings (cargo clippy)

Safety Check

  • Count unsafe blocks (target: 0 for easy/medium, minimize for hard)
  • Every unsafe block has a // SAFETY: comment
  • No raw pointer dereferences without bounds checking
  • No transmute unless absolutely necessary
  • No unwrap() on user-controlled data

Semantic Equivalence

  • Same function signature (equivalent types)
  • Same behavior for all valid inputs
  • Same error conditions / edge cases
  • Overflow behavior matches (wrapping vs. checked)
  • Printf format matches exactly (especially %g → custom format_g())
  • Bool/int distinction preserved (C int 0/1 ≠ Rust bool)

Differential Testing

  • Compile C with cc -std=gnu11 -lm
  • Compile Rust with rustc --edition 2024
  • Run both with identical test inputs
  • Compare outputs byte-by-byte (not just "looks similar")
  • Test edge cases: empty input, max values, null/None, negative numbers
  • Float tolerance: exact match preferred, tolerance only for known precision differences

Idiomatic Score

Enhanced formula with positive AND negative signals:

  • Base: 100
  • Negative: - (unsafe_blocks * 10) - (clippy_warnings * 2) - (unwrap_count * 3) - (as_casts * 1)
  • Positive: + min(10, result_count * 2) + min(5, option_count) + min(5, iter_usage)
  • Ranges: 90-100 Excellent, 70-89 Good, 60-69 Acceptable, <60 Needs repair

Quality Floor (P0)

  • Track baseline unsafe count from initial translation
  • NEVER allow repair to increase unsafe above baseline
  • If repair adds unsafe → reject that iteration, try again
  • This prevents the "oscillation" problem where repair trades quality for compilation

Best-Version Tracking (P1)

  • Keep the version with highest score throughout repair loop
  • If nothing passes validation, use best version as fallback (not raw c2rust)
  • Prefer: compiling version > high-score non-compiling > c2rust fallback

Read the full file on GitHub · 88 lines

Files

What ships with it

3 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. 4d ago First seen · 88 lines · 51 tokens per session scan A 78fd3c84c7b0

Subscribe to this mod's changes

migration-validator is a skill published in the GitHub repository JuanMarchetto/agent-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 51 tokens to every session and 1,183 once invoked, about $0.0003 per session on Opus 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-09-03.