Google Agent Skill for Migrating Legacy Code to Safe Rust

X postRay FernandoResource

Google published an agent skill in its "skills" repository that guides AI coding agents in porting legacy codebases to 100% safe Rust. The workflow incorporates structured analysis, A/B parity testing, and performance profiling. It assists engineers in modernizing legacy C++, C, Fortran, or Java projects.

Key points

  1. Migrates code from C++, C, Fortran, Java, Python, or Shell into a Rust workspace enforcing #![forbid(unsafe_code)].
  2. Features bounded automated self-healing capped at 5 iterations or 15 minutes per phase for failing tests or lints.
  3. Targets zero Clippy warnings, at least 95% branch coverage, and A/B differential parity across deterministic seeds.
  4. Tracks benchmarks across four stages (baseline, Safe Rust, SoA/SIMD, PGO/LTO) in migration_telemetry.json.

Why it matters

It establishes a concrete blueprint for using autonomous AI agents to execute memory-safety refactorings deterministically with strict verification targets.

Analysis

Google's google/skills open-source repository provides a specialized skill definition designed to direct autonomous AI coding harnesses through complete code rewrites. The migrate-to-rust skill defines standard operating procedures to translate legacy systems into memory-safe Rust.

Three-Stage Migration Workflow

The execution contract enforces distinct gates:

  • Stage 0 (Discovery & Confirmation Gate): The agent inspects build scripts, initiates telemetry tracking, and requires explicit user confirmation before executing external code to capture baseline performance.
  • Stage 1 (Architectural Blueprint): The agent audits the legacy repository, documents latent bugs, and creates a formal six-section migration blueprint.
  • Stage 2 (Implementation & Verification): The agent scaffolds the Rust crate, writes core domain logic using Struct-of-Arrays (SoA) or SIMD optimizations, and performs test-driven refinement.

Strict Quality Targets and Telemetry

The generated codebase strictly enforces #![forbid(unsafe_code)] with a zero-warning target for Cargo Clippy. Correctness is validated through property-based tests aiming for at least 95% branch coverage, alongside A/B differential parity checks against legacy runs. To avoid runaway execution loops, autonomous self-healing is strictly bounded to five attempts per phase. Finally, the skill runs LLVM Profile-Guided Optimization (PGO) benchmarks and outputs all performance data into an interactive HTML report.

Original post

Ray Fernando

@RayFernando1337 · 13 November 2026

How come no one told me about google's skill "Migrate Legacy Codebases to Safe Rust" t.co/wdLM155nJt

859 likes10 replies943 bookmarks40.6k views

View on X
Selected replies (5)
  • @tokifyi @RayFernando1337 @bot save this
  • @gatien7 @RayFernando1337 @jemartel98 ur favorite skills
  • @Traves_Theberge @RayFernando1337 Good shout. Didn't see that one either
  • @dakdevs @RayFernando1337 Omg wow lol
  • @SkaDeanRealm @RayFernando1337 Yo, this is a must for me. Thanks Ray sir!

Links and tools from this entry

Summary generated by AI (Gemini 3.8 Flash, 15 November 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • Repository:morganlinton/BeautifulRust

    Beautiful Rust: Agent Skills for Writing Idiomatic Rust

    Beautiful Rust provides Agent Skills and a Clippy configuration that instruct coding agents to write, review, and port idiomatic Rust code. It helps developers using AI agents ensure production-grade Rust patterns.

    1.3kstarsPython

    AI & LLMs· Tool

  • Repository:google/skills

    Agent Skills for Google Cloud and Google Technologies

    This open-source repository provides ready-to-use Agent Skills for integrating AI agents with Google Cloud and related services. It covers authentication, solution architectures, RAG, and platform operations. Skills are managed and installed via the skills.sh CLI.

    24.3kstarsPython

    AI & LLMs· Tool

  • X post:Emre Savcı

    Cloudflare Releases Security Audit Skill for Coding Agents

    Cloudflare has open-sourced security-audit-skill, a coding-agent skill designed to run multi-phase, automated security audits on codebases. It coordinates isolated agent roles across reconnaissance, vulnerability hunting, and independent verification.

    2.8kbookmarks143.6kviews

    AI & LLMs· Tool

  • Repository:cloudflare/security-audit-skill

    Cloudflare Open-Sources Security Audit Skill for Coding Agents

    Cloudflare's security-audit-skill is an open-source coding-agent workflow that orchestrates multi-phase security audits with independently verified, machine-readable findings.

    5.2kstarsJavaScript

    AI & LLMs· Tool

  • Repository:briiirussell/cybersecurity-skills

    Cybersecurity Skills: Security Workflows for AI Coding Agents

    An open-source repository provides structured cybersecurity skills for AI agents like Claude Code, Cursor, and Codex. It helps developers and security engineers run automated audits, dependency scans, and code reviews directly within agent workflows.

    479starsJavaScript

    AI & LLMs· Tool

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.