[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6998J2CZEXS9BES9S3WWFKC":3,"skill-same:01M6998J2CZEXS9BES9S3WWFKC":150},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M6998J2CZEXS9BES9S3WWFKC","migrate-to-rust",null,"Clones, analyzes, plans, and migrates legacy codebases (C++, Fortran, Java, Python, C, Shell) from a GitHub URL or local directory to a modern, high-performance, deterministic, 100% Safe Rust architecture, tracking live telemetry across every task bucket, test failure\u002Ffix cycle, and Profile-Guided Optimization (PGO) stage, and producing a first-person AI storytelling report and interactive HTML infographic. Use when migrating a GitHub repository or local codebase to Rust, porting legacy C++, Fortran, Python, or Java workloads to memory-safe Rust, designing Struct-of-Arrays (SoA) or SIMD Rust architectures, or optimizing Rust ports with LLVM PGO. Don't use for unrelated non-Rust refactoring or single-line syntax questions.","google\u002Fskills","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M698WR0H76ENHE587T9EJT89",23830,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fmigrate-to-rust\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"rust","migrate to rust","migrate","fix","when","porting","URL","high-performance","llvm","local","across","arrays","infographic","cycle","unrelated","directory","ports","soa","architecture","performance","memory","github","python","safe","2026-11-10 10:12:30",false,"---\nname: migrate-to-rust\nmetadata:\n  version: \"1.0.0\"\n  category: ApplicationDevelopment\ndescription: >-\n  Clones, analyzes, plans, and migrates legacy codebases (C++, Fortran, Java,\n  Python, C, Shell) from a GitHub URL or local directory to a modern,\n  high-performance, deterministic, 100% Safe Rust architecture, tracking live\n  telemetry across every task bucket, test failure\u002Ffix cycle, and\n  Profile-Guided Optimization (PGO) stage, and producing a first-person AI\n  storytelling report and interactive HTML infographic. Use when migrating a\n  GitHub repository or local codebase to Rust, porting legacy C++, Fortran,\n  Python, or Java workloads to memory-safe Rust, designing Struct-of-Arrays\n  (SoA) or SIMD Rust architectures, or optimizing Rust ports with LLVM PGO.\n  Don't use for unrelated non-Rust refactoring or single-line syntax questions.\n---\n\n# Migrate Legacy Codebases to Safe Rust\n\nAct as a Systems Architect, Performance Engineer, and Rust Specialist. Your goal\nis to migrate legacy codebases into 100% Safe, PGO-tuned Rust while recording\nmeasured telemetry and a first-person engineering narrative via\n[`scripts\u002Ftelemetry.py`](scripts\u002Ftelemetry.py).\n\n## Execution Contract & Portability\n\nWhen migrating a repository or local directory (`{github_url}` or\n`{codebase_path}`), follow these execution rules across agentic harnesses:\n\n1.  **Stage 0 External Code Confirmation Gate**: After cloning an external\n    repository and inspecting its build files, **present the resolved legacy\n    build command, run command, and target directory to the user and obtain\n    confirmation before compiling or executing cloned code**. (For local code\n    that the user explicitly instructed you to run, or once Stage 0 confirmation\n    is granted, proceed directly.)\n2.  **Continuous Stage 1 -> Stage 2 Progression**: Once Stage 0 baseline\n    capture is complete, proceed directly from writing the Architectural\n    Blueprint (Stage 1) into implementing and verifying the Rust workspace\n    (Stage 2) without pausing between milestones, where the host environment\n    permits autonomous tool execution.\n3.  **Bounded Automated Self-Healing (Max 5 Iterations)**: When tests, `clippy`\n    lints, or A\u002FB parity checks fail, log the failure via\n    [`scripts\u002Ftelemetry.py`](scripts\u002Ftelemetry.py), diagnose and fix the root\n    cause, and re-test automatically up to a budget of **5 self-healing\n    iterations** (or 15 minutes per phase). If any test or seed still diverges\n    after the budget is exhausted, record the partial state in\n    `migration_telemetry.json` and document the remaining gap in the final\n    report rather than looping indefinitely.\n4.  **Verification Targets & Definition of Done**:\n    -   `#![forbid(unsafe_code)]` Rust crate compiles with a target of `0`\n        `cargo clippy` warnings (any unavoidable exception must be documented).\n    -   Unit, integration, doc, and property-based (`proptest`) tests pass with\n        a target of `>= 95%` branch coverage (any unavoidable exception must be\n        documented), with every run logged in `migration_telemetry.json`.\n    -   A\u002FB differential output parity is verified across `N` deterministic\n        seeds within a documented numerical epsilon (`--max-abs-error`), with\n        any floating-point\u002FFMA\u002FPRNG divergence root-caused and logged.\n    -   All 4 benchmark stages (`legacy_baseline`, `safe_rust`, `soa_simd`,\n        `pgo_lto`) are measured and logged (or omitted cleanly if a tool such as\n        `llvm-profdata` is unavailable).\n    -   The interactive HTML infographic (`migration_infographic.html`) is\n        rendered via `scripts\u002Ftelemetry.py render-infographic`.\n\n## End-to-End Workflow Checklist\n\nCopy this checklist to track progress across the three stages (detailed command\nrecipes and architectural specifications are in\n[references\u002Fpgo_and_telemetry_guide.md](references\u002Fpgo_and_telemetry_guide.md)):\n\n```markdown\n- [ ] Stage 0: Acquire repo, initialize `migration_telemetry.json` (`discovery` bucket), scan legacy codebase, confirm resolved build\u002Frun commands, and benchmark baseline\n- [ ] Stage 1: Audit legacy code (`blueprint` bucket), log opportunities & latent legacy bugs, and generate 6-section Architectural Blueprint\n- [ ] Stage 2.1: Scaffold `#![forbid(unsafe_code)]` Rust workspace & deterministic PRNG parity layer (`rewrite` bucket)\n- [ ] Stage 2.2: Implement core domain types & SoA\u002FSIMD kernels (\u003C= 400 LOC\u002Ffile target, full rustdoc) & benchmark `safe_rust` + `soa_simd`\n- [ ] Stage 2.3: Run Verification Crucible (`test_heal` bucket, max 5 iterations) — log initial test failure % and each self-healing fix\n- [ ] Stage 2.4: Run A\u002FB differential parity harness (`parity` bucket, max 5 iterations) across N seeds within documented epsilon tolerance\n- [ ] Stage 2.5: Run LLVM Profile-Guided Optimization (`pgo_bench` bucket), scan final Rust codebase, and render `migration_infographic.html`\n```\n\n--------------------------------------------------------------------------------\n\n## Stage 0: Repository Acquisition, Telemetry Init & Legacy Baseline\n\nResolve context parameters from the repository or directory:\n\nParameter                         | Placeholder                                | Resolution Strategy\n:-------------------------------- | :----------------------------------------- | :------------------\n**Source Input**                  | `{codebase_path}` or `{github_url}`        | Accept a GitHub URL (`https:\u002F\u002Fgithub.com\u002F...`) or a local filesystem path\n**Original Language \u002F Framework** | `{legacy_language}`                        | Auto-detect from file extensions and build files (`CMakeLists.txt`, `Makefile`, `meson.build`, `pyproject.toml`, `pom.xml`, `*.f90`, `*.cpp`)\n**Baseline Run Command**          | `{baseline_run_command}`                   | Identify from `README.md`, CI workflows (`.github\u002Fworkflows\u002F*.yml`), `Makefile`, or test scripts\n**Telemetry Ledger**              | `{workspace_dir}\u002Fmigration_telemetry.json` | Initialized via `scripts\u002Ftelemetry.py init` at the start of Stage 0\n\n### Stage 0 Execution Steps\n\n1.  **Clone Repository (if GitHub URL)**: Choose a clean local directory\n    (default to `~\u002Frust_migrations\u002F{repo_name}`, or inside the current workspace\n    if requested) and run `git clone {github_url}\n    ~\u002Frust_migrations\u002F{repo_name}`.\n2.  **Initialize Telemetry & Scan Legacy Codebase**: Run `scripts\u002Ftelemetry.py\n    init --telemetry \"{workspace_dir}\u002Fmigration_telemetry.json\" --project-name\n    \"{project_name}\" --legacy-lang \"{legacy_language}\"`. Start the `discovery`\n    bucket and run `scripts\u002Ftelemetry.py scan-codebase --phase before` on the\n    legacy source directory to record baseline file count, code LOC, comment\n    density %, max file LOC, nesting depth, average function length, and raw\n    pointer\u002Fmemory hazards.\n3.  **Confirm & Benchmark Legacy Baseline**: Before executing build or run\n    commands from a cloned external repository, surface the resolved build\n    command, `{baseline_run_command}`, and working directory for user\n    confirmation. Once confirmed, compile the legacy project in release mode\n    (`-O3` \u002F `Release`), capture golden reference outputs across deterministic\n    seeds, measure baseline wall-clock runtime (ms) and peak RSS (MB), and log\n    Stage 1 via `scripts\u002Ftelemetry.py log-benchmark --stage legacy_baseline`.\n\n--------------------------------------------------------------------------------\n\n## Stage 1: Deep Audit, Opportunity Discovery & Architectural Blueprint\n\nStart the `blueprint` timer bucket (`scripts\u002Ftelemetry.py start-bucket --bucket\nblueprint`), inspect the repository, log every discovered opportunity and\n**latent legacy bug** (`scripts\u002Ftelemetry.py log-opportunity`), and generate the\n6-section Markdown blueprint defined in Section 2 of\n[references\u002Fpgo_and_telemetry_guide.md](references\u002Fpgo_and_telemetry_guide.md).\n\n**Stage 1 -> Stage 2 Transition**: Save the blueprint and proceed directly to\nStage 2 (unless the user explicitly requested a blueprint-only plan).\n\n--------------------------------------------------------------------------------\n\n## Stage 2: Phased Safe Rust Implementation, Self-Healing, PGO & Infographic\n\nFollow the command recipes and core engineering standards in\n[references\u002Fpgo_and_telemetry_guide.md](references\u002Fpgo_and_telemetry_guide.md)\nfor each step:\n\n### Step 1: Scaffold Safe Rust Workspace & Port Modules (`rewrite` Bucket)\n\n1.  Start the `rewrite` timer bucket (`scripts\u002Ftelemetry.py start-bucket\n    --bucket rewrite`).\n2.  Initialize the Rust workspace with `#![forbid(unsafe_code)]` in `src\u002Flib.rs`\n    and `src\u002Fmain.rs`.\n3.  Implement the deterministic PRNG wrapper, domain types, and modules in\n    dependency order (`\u003C= 400` LOC per file target, complete `\u002F\u002F!` and `\u002F\u002F\u002F`\n    rustdoc with runnable doc-tests).\n4.  Benchmark and log Stage 2 (`safe_rust`) and Stage 3 (`soa_simd`) via\n    `scripts\u002Ftelemetry.py log-benchmark`.\n\n### Step 2: The Verification Crucible — Test, Fail, Diagnose & Fix (`test_heal` Bucket)\n\n1.  Start the `test_heal` timer bucket (`scripts\u002Ftelemetry.py start-bucket\n    --bucket test_heal`).\n2.  Write unit tests, runnable doc-tests, and `proptest` boundary tests.\n3.  Run `cargo test --all-targets`, `cargo test --doc`, and `cargo clippy\n    --all-targets`.\n4.  **Log Every Iteration (Up to 5 Iterations)**: After Run 1 and each\n    subsequent run, invoke `scripts\u002Ftelemetry.py log-test-run` with total tests,\n    passed, failed, coverage %, clippy warnings, diagnostic summary, and fix\n    applied. Iterate until `0` failures and `0` warnings (or until the\n    5-iteration budget is reached, documenting any unavoidable exception).\n\n### Step 3: A\u002FB Differential Output Parity (`parity` Bucket)\n\n1.  Start the `parity` timer bucket (`scripts\u002Ftelemetry.py start-bucket --bucket\n    parity`).\n2.  Run the automated A\u002FB differential harness across `N` deterministic seeds\n    comparing `{baseline_run_command}` and the Rust binary within the documented\n    epsilon tolerance.\n3.  Log each parity iteration via `scripts\u002Ftelemetry.py log-parity-run`. If any\n    seed diverges beyond epsilon, bisect the first diverging step, repair the\n    discrepancy, and re-run (up to 5 iterations).\n\n### Step 4: Profile-Guided Optimization (PGO) & Final Benchmarks (`pgo_bench` Bucket)\n\n1.  Start the `pgo_bench` timer bucket (`scripts\u002Ftelemetry.py start-bucket\n    --bucket pgo_bench`).\n2.  Execute the LLVM PGO workflow in\n    [references\u002Fpgo_and_telemetry_guide.md](references\u002Fpgo_and_telemetry_guide.md):\n    build with `RUSTFLAGS=\"-Cprofile-generate=.\u002Fpgo-data\"`, run representative\n    workloads, merge profiles via `llvm-profdata`, and rebuild with\n    `RUSTFLAGS=\"-Cprofile-use=.\u002Fpgo-data\u002Fmerged.profdata\"` and `lto = \"fat\"`\n    (or use the documented `-Ctarget-cpu=native` fallback if `llvm-profdata` is\n    unavailable).\n3.  Verify that tests and A\u002FB parity still pass on the PGO binary, then measure\n    wall-clock runtime and peak RSS and log Stage 4 (`pgo_lto`) via\n    `scripts\u002Ftelemetry.py log-benchmark --stage pgo_lto`.\n\n### Step 5: Final Census, First-Person AI Story & Visual Infographic\n\n1.  Run `scripts\u002Ftelemetry.py scan-codebase --phase after` on `src\u002F` to capture\n    final LOC, `\u003C= 400` LOC compliance, comment\u002Frustdoc density, runnable\n    doc-tests, nesting depth, and `unsafe` block count.\n2.  Log a **Before vs. After Code Spotlight** (`scripts\u002Ftelemetry.py\n    log-spotlight`) and populate the **First-Person AI Story Chapters**\n    (`scripts\u002Ftelemetry.py set-story`).\n3.  End the `pgo_bench` timer bucket and render the interactive HTML infographic\n    (where `{skill_dir}` is the directory containing this `SKILL.md`):\n\n    ```bash\n    python3 \"{skill_dir}\u002Fscripts\u002Ftelemetry.py\" render-infographic \\\n      --telemetry \"{workspace_dir}\u002Fmigration_telemetry.json\" \\\n      --out \"{output_dir}\u002Fmigration_infographic.html\" \\\n      --scope-summary \"{short_summary_of_ported_modules}\"\n    ```\n4.  Output a concise executive summary referencing the generated\n    `migration_infographic.html` report and key measured before\u002Fafter metrics.\n\n--------------------------------------------------------------------------------\n\n## Bundled Resources\n\n-   **Telemetry & Infographic CLI**:\n    [`scripts\u002Ftelemetry.py`](scripts\u002Ftelemetry.py)\n-   **Engineering Standards, Blueprint Spec, PGO & Telemetry Recipes**:\n    [references\u002Fpgo_and_telemetry_guide.md](references\u002Fpgo_and_telemetry_guide.md)\n-   **Interactive HTML Infographic Template**:\n    [references\u002Finfographic_template.html](references\u002Finfographic_template.html)\n","# Migrate Legacy Codebases to Safe Rust\n\nAct as a Systems Architect, Performance Engineer, and Rust Specialist. Your goal\nis to migrate legacy codebases into 100% Safe, PGO-tuned Rust while recording\nmeasured telemetry and a first-person engineering narrative via\n[`scripts\u002Ftelemetry.py`](scripts\u002Ftelemetry.py).\n\n## Execution Contract & Portability\n\nWhen migrating a repository or local directory (`{github_url}` or\n`{codebase_path}`), follow these execution rules across agentic harnesses:\n\n1.  **Stage 0 External Code Confirmation Gate**: After cloning an external\n    repository and inspecting its build files, **present the resolved legacy\n    build command, run command, and target directory to the user and obtain\n    confirmation before compiling or executing cloned code**. (For local code\n    that the user explicitly instructed you to run, or once Stage 0 confirmation\n    is granted, proceed directly.)\n2.  **Continuous Stage 1 -> Stage 2 Progression**: Once Stage 0 baseline\n    capture is complete, proceed directly from writing the Architectural\n    Blueprint (Stage 1) into implementing and verifying the Rust workspace\n    (Stage 2) without pausing between milestones, where the host environment\n    permits autonomous tool execution.\n3.  **Bounded Automated Self-Healing (Max 5 Iterations)**: When tests, `clippy`\n    lints, or A\u002FB parity checks fail, log the failure via\n    [`scripts\u002Ftelemetry.py`](scripts\u002Ftelemetry.py), diagnose and fix the root\n    cause, and re-test automatically up to a budget of **5 self-healing\n    iterations** (or 15 minutes per phase). If any test or seed still diverges\n    after the budget is exhausted, record the partial state in\n    `migration_telemetry.json` and document the remaining gap in the final\n    report rather than looping indefinitely.\n4.  **Verification Targets & Definition of Done**:\n    -   `#![forbid(unsafe_code)]` Rust crate compiles with a target of `0`\n        `cargo clippy` warnings (any unavoidable exception must be documented).\n    -   Unit, integration, doc, and property-based (`proptest`) tests pass with\n        a target of `>= 95%` branch coverage (any unavoidable exception must be\n        documented), with every run logged in `migration_telemetry.json`.\n    -   A\u002FB differential output parity is verified across `N` deterministic\n        seeds within a documented numerical epsilon (`--max-abs-error`), with\n        any floating-point\u002FFMA\u002FPRNG divergence root-caused and logged.\n    -   All 4 benchmark stages (`legacy_baseline`, `safe_rust`, `soa_simd`,\n        `pgo_lto`) are measured and logged (or omitted cleanly if a tool such as\n        `llvm-profdata` is unavailable).\n    -   The interactive HTML infographic (`migration_infographic.html`) is\n        rendered via `scripts\u002Ftelemetry.py render-infographic`.\n\n## End-to-End Workflow Checklist\n\nCopy this checklist to track progress across the three stages (detailed command\nrecipes and architectural specifications are in\n[references\u002Fpgo_and_telemetry_guide.md](references\u002Fpgo_and_telemetry_guide.md)):\n\n```markdown\n- [ ] Stage 0: Acquire repo, initialize `migration_telemetry.json` (`discovery` bucket), scan legacy codebase, confirm resolved build\u002Frun commands, and benchmark baseline\n- [ ] Stage 1: Audit legacy code (`blueprint` bucket), log opportunities & latent legacy bugs, and generate 6-section Architectural Blueprint\n- [ ] Stage 2.1: Scaffold `#![forbid(unsafe_code)]` Rust workspace & deterministic PRNG parity layer (`rewrite` bucket)\n- [ ] Stage 2.2: Implement core domain types & SoA\u002FSIMD kernels (\u003C= 400 LOC\u002Ffile target, full rustdoc) & benchmark `safe_rust` + `soa_simd`\n- [ ] Stage 2.3: Run Verification Crucible (`test_heal` bucket, max 5 iterations) — log initial test failure % and each self-healing fix\n- [ ] Stage 2.4: Run A\u002FB differential parity harness (`parity` bucket, max 5 iterations) across N seeds within documented epsilon tolerance\n- [ ] Stage 2.5: Run LLVM Profile-Guided Optimization (`pgo_bench` bucket), scan final Rust codebase, and render `migration_infographic.html`\n```\n\n--------------------------------------------------------------------------------\n\n## Stage 0: Repository Acquisition, Telemetry Init & Legacy Baseline\n\nResolve context parameters from the repository or directory:\n\nParameter                         | Placeholder                                | Resolution Strategy\n:-------------------------------- | :----------------------------------------- | :------------------\n**Source Input**                  | `{codebase_path}` or `{github_url}`        | Accept a GitHub URL (`https:\u002F\u002Fgithub.com\u002F...`) or a local filesystem path\n**Original Language \u002F Framework** | `{legacy_language}`                        | Auto-detect from file extensions and build files (`CMakeLists.txt`, `Makefile`, `meson.build`, `pyproject.toml`, `pom.xml`, `*.f90`, `*.cpp`)\n**Baseline Run Command**          | `{baseline_run_command}`                   | Identify from `README.md`, CI workflows (`.github\u002Fworkflows\u002F*.yml`), `Makefile`, or test scripts\n**Telemetry Ledger**              | `{workspace_dir}\u002Fmigration_telemetry.json` | Initialized via `scripts\u002Ftelemetry.py init` at the start of Stage 0\n\n### Stage 0 Execution Steps\n\n1.  **Clone Repository (if GitHub URL)**: Choose a clean local directory\n    (default to `~\u002Frust_migrations\u002F{repo_name}`, or inside the current workspace\n    if requested) and run `git clone {github_url}\n    ~\u002Frust_migrations\u002F{repo_name}`.\n2.  **Initialize Telemetry & Scan Legacy Codebase**: Run `scripts\u002Ftelemetry.py\n    init --telemetry \"{workspace_dir}\u002Fmigration_telemetry.json\" --project-name\n    \"{project_name}\" --legacy-lang \"{legacy_language}\"`. Start the `discovery`\n    bucket and run `scripts\u002Ftelemetry.py scan-codebase --phase before` on the\n    legacy source directory to record baseline file count, code LOC, comment\n    density %, max file LOC, nesting depth, average function length, and raw\n    pointer\u002Fmemory hazards.\n3.  **Confirm & Benchmark Legacy Baseline**: Before executing build or run\n    commands from a cloned external repository, surface the resolved build\n    command, `{baseline_run_command}`, and working directory for user\n    confirmation. Once confirmed, compile the legacy project in release mode\n    (`-O3` \u002F `Release`), capture golden reference outputs across deterministic\n    seeds, measure baseline wall-clock runtime (ms) and peak RSS (MB), and log\n    Stage 1 via `scripts\u002Ftelemetry.py log-benchmark --stage legacy_baseline`.\n\n--------------------------------------------------------------------------------\n\n## Stage 1: Deep Audit, Opportunity Discovery & Architectural Blueprint\n\nStart the `blueprint` timer bucket (`scripts\u002Ftelemetry.py start-bucket --bucket\nblueprint`), inspect the repository, log every discovered opportunity and\n**latent legacy bug** (`scripts\u002Ftelemetry.py log-opportunity`), and generate the\n6-section Markdown blueprint defined in Section 2 of\n[references\u002Fpgo_and_telemetry_guide.md](references\u002Fpgo_and_telemetry_guide.md).\n\n**Stage 1 -> Stage 2 Transition**: Save the blueprint and proceed directly to\nStage 2 (unless the user explicitly requested a blueprint-only plan).\n\n--------------------------------------------------------------------------------\n\n## Stage 2: Phased Safe Rust Implementation, Self-Healing, PGO & Infographic\n\nFollow the command recipes and core engineering standards in\n[references\u002Fpgo_and_telemetry_guide.md](references\u002Fpgo_and_telemetry_guide.md)\nfor each step:\n\n### Step 1: Scaffold Safe Rust Workspace & Port Modules (`rewrite` Bucket)\n\n1.  Start the `rewrite` timer bucket (`scripts\u002Ftelemetry.py start-bucket\n    --bucket rewrite`).\n2.  Initialize the Rust workspace with `#![forbid(unsafe_code)]` in `src\u002Flib.rs`\n    and `src\u002Fmain.rs`.\n3.  Implement the deterministic PRNG wrapper, domain types, and modules in\n    dependency order (`\u003C= 400` LOC per file target, complete `\u002F\u002F!` and `\u002F\u002F\u002F`\n    rustdoc with runnable doc-tests).\n4.  Benchmark and log Stage 2 (`safe_rust`) and Stage 3 (`soa_simd`) via\n    `scripts\u002Ftelemetry.py log-benchmark`.\n\n### Step 2: The Verification Crucible — Test, Fail, Diagnose & Fix (`test_heal` Bucket)\n\n1.  Start the `test_heal` timer bucket (`scripts\u002Ftelemetry.py start-bucket\n    --bucket test_heal`).\n2.  Write unit tests, runnable doc-tests, and `proptest` boundary tests.\n3.  Run `cargo test --all-targets`, `cargo test --doc`, and `cargo clippy\n    --all-targets`.\n4.  **Log Every Iteration (Up to 5 Iterations)**: After Run 1 and each\n    subsequent run, invoke `scripts\u002Ftelemetry.py log-test-run` with total tests,\n    passed, failed, coverage %, clippy warnings, diagnostic summary, and fix\n    applied. Iterate until `0` failures and `0` warnings (or until the\n    5-iteration budget is reached, documenting any unavoidable exception).\n\n### Step 3: A\u002FB Differential Output Parity (`parity` Bucket)\n\n1.  Start the `parity` timer bucket (`scripts\u002Ftelemetry.py start-bucket --bucket\n    parity`).\n2.  Run the automated A\u002FB differential harness across `N` deterministic seeds\n    comparing `{baseline_run_command}` and the Rust binary within the documented\n    epsilon tolerance.\n3.  Log each parity iteration via `scripts\u002Ftelemetry.py log-parity-run`. If any\n    seed diverges beyond epsilon, bisect the first diverging step, repair the\n    discrepancy, and re-run (up to 5 iterations).\n\n### Step 4: Profile-Guided Optimization (PGO) & Final Benchmarks (`pgo_bench` Bucket)\n\n1.  Start the `pgo_bench` timer bucket (`scripts\u002Ftelemetry.py start-bucket\n    --bucket pgo_bench`).\n2.  Execute the LLVM PGO workflow in\n    [references\u002Fpgo_and_telemetry_guide.md](references\u002Fpgo_and_telemetry_guide.md):\n    build with `RUSTFLAGS=\"-Cprofile-generate=.\u002Fpgo-data\"`, run representative\n    workloads, merge profiles via `llvm-profdata`, and rebuild with\n    `RUSTFLAGS=\"-Cprofile-use=.\u002Fpgo-data\u002Fmerged.profdata\"` and `lto = \"fat\"`\n    (or use the documented `-Ctarget-cpu=native` fallback if `llvm-profdata` is\n    unavailable).\n3.  Verify that tests and A\u002FB parity still pass on the PGO binary, then measure\n    wall-clock runtime and peak RSS and log Stage 4 (`pgo_lto`) via\n    `scripts\u002Ftelemetry.py log-benchmark --stage pgo_lto`.\n\n### Step 5: Final Census, First-Person AI Story & Visual Infographic\n\n1.  Run `scripts\u002Ftelemetry.py scan-codebase --phase after` on `src\u002F` to capture\n    final LOC, `\u003C= 400` LOC compliance, comment\u002Frustdoc density, runnable\n    doc-tests, nesting depth, and `unsafe` block count.\n2.  Log a **Before vs. After Code Spotlight** (`scripts\u002Ftelemetry.py\n    log-spotlight`) and populate the **First-Person AI Story Chapters**\n    (`scripts\u002Ftelemetry.py set-story`).\n3.  End the `pgo_bench` timer bucket and render the interactive HTML infographic\n    (where `{skill_dir}` is the directory containing this `SKILL.md`):\n\n    ```bash\n    python3 \"{skill_dir}\u002Fscripts\u002Ftelemetry.py\" render-infographic \\\n      --telemetry \"{workspace_dir}\u002Fmigration_telemetry.json\" \\\n      --out \"{output_dir}\u002Fmigration_infographic.html\" \\\n      --scope-summary \"{short_summary_of_ported_modules}\"\n    ```\n4.  Output a concise executive summary referencing the generated\n    `migration_infographic.html` report and key measured before\u002Fafter metrics.\n\n--------------------------------------------------------------------------------\n\n## Bundled Resources\n\n-   **Telemetry & Infographic CLI**:\n    [`scripts\u002Ftelemetry.py`](scripts\u002Ftelemetry.py)\n-   **Engineering Standards, Blueprint Spec, PGO & Telemetry Recipes**:\n    [references\u002Fpgo_and_telemetry_guide.md](references\u002Fpgo_and_telemetry_guide.md)\n-   **Interactive HTML Infographic Template**:\n    [references\u002Finfographic_template.html](references\u002Finfographic_template.html)\n",{"name":5,"metadata":48,"description":7},{"version":49,"category":50},"1.0.0","ApplicationDevelopment","main","bb9b3f464aae37af360d079c1d863524955b0363","skills\u002Fdevelopers\u002Fmigrate-to-rust",1991,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-11 03:08:50",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add google\u002Fskills --skill migrate-to-rust",{"tool":66,"command":67},"bunx","bunx skills add google\u002Fskills --skill migrate-to-rust",{"tool":69,"command":70},"pnpm","pnpm dlx skills add google\u002Fskills --skill migrate-to-rust","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fmigrate-to-rust\u002FSKILL.md",true,[74,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144],{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fadvanced-features.md","REFERENCE","参考文档",7145,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fadvanced-features.md",{"path":81,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fagent-skills.md",7777,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fagent-skills.md",{"path":85,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fapi-reference.md",7585,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fapi-reference.md",{"path":89,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fbest-practices.md",7656,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fbest-practices.md",{"path":93,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fcicd-integration.md",7940,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fcicd-integration.md",{"path":97,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fcommon-workflows.md",2639,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fcommon-workflows.md",{"path":101,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Fconfiguration.md",8210,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fconfiguration.md",{"path":105,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":106,"sourceHtmlUrl":107},"references\u002Fenterprise-features.md",7739,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fenterprise-features.md",{"path":109,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":110,"sourceHtmlUrl":111},"references\u002Fgetting-started.md",4839,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fgetting-started.md",{"path":113,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":114,"sourceHtmlUrl":115},"references\u002Fhooks-and-plugins.md",8263,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fhooks-and-plugins.md",{"path":117,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":118,"sourceHtmlUrl":119},"references\u002Fhooks-comprehensive.md",12765,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fhooks-comprehensive.md",{"path":121,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":122,"sourceHtmlUrl":123},"references\u002Fide-integration.md",6273,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fide-integration.md",{"path":125,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":126,"sourceHtmlUrl":127},"references\u002Finfographic_template.html",63070,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fmigrate-to-rust\u002Freferences\u002Finfographic_template.html",{"path":129,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":130,"sourceHtmlUrl":131},"references\u002Fmcp-integration.md",6816,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fmcp-integration.md",{"path":133,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":134,"sourceHtmlUrl":135},"references\u002Fpgo_and_telemetry_guide.md",17673,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fmigrate-to-rust\u002Freferences\u002Fpgo_and_telemetry_guide.md",{"path":137,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":138,"sourceHtmlUrl":139},"references\u002Fslash-commands.md",8791,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Fslash-commands.md",{"path":141,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":142,"sourceHtmlUrl":143},"references\u002Ftroubleshooting.md",7665,"https:\u002F\u002Fgithub.com\u002Ffel-tte\u002Frobot-forex\u002Fblob\u002Fmain\u002Fclaude-super-kit\u002F.claude\u002Fskills\u002Fclaude-code\u002Freferences\u002Ftroubleshooting.md",{"path":145,"resourceType":146,"resourceTypeDesc":147,"sizeBytes":148,"sourceHtmlUrl":149},"scripts\u002Ftelemetry.py","SCRIPT","脚本",42399,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fmigrate-to-rust\u002Fscripts\u002Ftelemetry.py",[151,188,219,246,271,293],{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":165,"publishedAt":43},"01M6998S2EZKD3GEJ7F943RZTE","sign-in-with-google-web","Implement, configure, and secure Sign In With Google (SiwG) using Google Identity Services (GIS \u002F `https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`) across web architectures. Use when creating Google sign-in buttons, implementing Google One Tap with FedCM, integrating GIS in React\u002FNext.js\u002FAngular\u002FHTML, verifying ID tokens on backend runtimes (Python\u002FNode.js\u002FGo\u002FJava), enforcing Google Workspace domain restrictions (`hd`), securing client-side ID tokens via WebCrypto nonces or encrypted IndexedDB, embedding in cross-origin iframes via the Intermediate Iframe API (`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fintermediate`), configuring Content Security Policy (CSP), COOP, and Permissions Policy (`identity-credentials-get`) headers, or handling sign-out and revocation. Don't use for legacy Google Sign-In (`gapi.auth2`), Google Cloud IAM service accounts, or Android\u002FiOS native Credential Manager.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002FSKILL.md",[157,162],{"categoryNo":158,"categoryName":159,"taxonomyType":160,"taxonomyTypeDesc":161},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",{"categoryNo":163,"categoryName":164,"taxonomyType":160,"taxonomyTypeDesc":161},"01JBSEEDCAT000000000000010","后端与接口",[9,166,167,168,169,170,171,172,173,174,175,176,41,177,178,179,180,181,182,183,184,185,186,187],"sign in with google web","sign","with","web","android","go","security","google workspace","google cloud","implement","policy","implementing","react","iam","permissions","buttons","secure","manager","identity","architectures","domain","runtimes",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":192,"categories":193,"keywords":203,"publishedAt":43},"01M6998PHPDCAD684VW5WRG83D","dpop-adoption","Implement and debug OAuth 2.0 DPoP (RFC 9449) refresh token sender-constraining for WebCrypto, Node.js ES6, and browser runtimes integrating with Google's OAuth platform. Use when configuring non-extractable asymmetric key pairs (P-256), generating DPoP Proof JWTs for authorization code exchange and token refresh, or handling 400 use_dpop_nonce challenge retry loops at oauth2.googleapis.com\u002Ftoken. Don't use for unconstrained OAuth 2.0 flows (where refresh tokens are not bound to a client key pair), or for Google Cloud IAM \u002F service account authentication.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fdpop-adoption\u002FSKILL.md",[194,195,198],{"categoryNo":163,"categoryName":164,"taxonomyType":160,"taxonomyTypeDesc":161},{"categoryNo":196,"categoryName":197,"taxonomyType":160,"taxonomyTypeDesc":161},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":199,"categoryName":200,"taxonomyType":201,"taxonomyTypeDesc":202},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[204,205,9,174,206,207,208,209,210,211,179,212,213,214,215,216,217,184,187,218,23],"dpop adoption","adoption","es6","retry","authentication","flows","challenge","code","browser","loops","at","node","token","pair","platform",{"skillNo":220,"name":221,"nameZh":6,"description":222,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":223,"categories":224,"keywords":231,"publishedAt":43},"01M6998M72TC73EEAQH4XC7EXW","retrieving-developer-knowledge","Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI\u002FGemini, Android, Chrome, Web, Flutter, Go, Firebase, and other Google developer platforms. Integrates with the Developer Knowledge MCP server (search_documents, get_documents, answer_query) or the Developer Knowledge REST API fallback. Use when searching for gcloud CLI commands, API syntax, IAM permissions, official documentation, architectural comparisons, or product choice overviews. Don't use for local filesystem lookups or non-Google documentation.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fretrieving-developer-knowledge\u002FSKILL.md",[225,226,229,230],{"categoryNo":163,"categoryName":164,"taxonomyType":160,"taxonomyTypeDesc":161},{"categoryNo":227,"categoryName":228,"taxonomyType":160,"taxonomyTypeDesc":161},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":196,"categoryName":197,"taxonomyType":160,"taxonomyTypeDesc":161},{"categoryNo":199,"categoryName":200,"taxonomyType":201,"taxonomyTypeDesc":202},[232,233,234,235,174,236,237,238,239,240,28,241,242,23,243,244,29,179,245,180],"retrieving developer knowledge","knowledge","developer","MCP","mcp server","official","developer documentation","get","search","choice","documents","query","api","documentation",{"skillNo":247,"name":248,"nameZh":6,"description":249,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":250,"categories":251,"keywords":255,"publishedAt":43},"01M6998GCC3K29WZ82KXMB9E02","finding-google-skills","Google platform decision and setup guidance, loaded on demand from Google's skill catalog. Use when a developer is choosing or setting up part of their stack, such as where to run a service, a database, storage, messaging, authentication, analytics, ads, or AI model serving, and a Google product is a reasonable candidate - whether or not a vendor is named - or when a request names a Google product or API. Brings in the matching Google skill so the answer can weigh Google options, their trade-offs, and when they are not the right fit. Skip when the stack is already settled on another provider and no Google product is named, or the task involves no platform choice.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Ffinding-google-skills\u002FSKILL.md",[252,253,254],{"categoryNo":163,"categoryName":164,"taxonomyType":160,"taxonomyTypeDesc":161},{"categoryNo":196,"categoryName":197,"taxonomyType":160,"taxonomyTypeDesc":161},{"categoryNo":199,"categoryName":200,"taxonomyType":201,"taxonomyTypeDesc":202},[9,256,257,258,259,218,260,261,262,263,264,208,265,266,267,241,268,269,23,270,244],"finding google skills","storage","as","messaging","model","trade-offs","provider","answer","fit","catalog","up","decision","use","database","candidate",{"skillNo":272,"name":273,"nameZh":6,"description":274,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":275,"categories":276,"keywords":279,"publishedAt":43},"01M6998DWNHTH0BS6W1CY8ZXMP","workload-manager-basics","Use this skill to manage Google Cloud Workload Manager evaluations, rules, scanned resources, and validation results by using public client libraries and the REST API. Use when you need to inspect workload best-practice rules, create and run evaluations for Google Cloud general best practices, SAP, SQL Server, or custom organizational rules, review violations, export results to BigQuery, or automate Workload Manager through client libraries because no service-specific public CLI or MCP server is available. Don't use for general Google Compute Engine instance management, VPC configuration, or standard IAM auditing.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fworkload-manager-basics\u002FSKILL.md",[277,278],{"categoryNo":163,"categoryName":164,"taxonomyType":160,"taxonomyTypeDesc":161},{"categoryNo":196,"categoryName":197,"taxonomyType":160,"taxonomyTypeDesc":161},[280,281,183,282,9,235,283,174,236,284,285,286,287,23,288,244,179,289,290,291,292],"workload manager basics","workload","basics","cli","review","vpc","resources","inspect","you","create","libraries","server","run",{"skillNo":294,"name":295,"nameZh":6,"description":296,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":297,"categories":298,"keywords":299,"publishedAt":43},"01M6998BC1CC8QSEKKJSQ7VE1G","spanner-basics","Assists in provisioning instances and databases, designing performant schemas, and querying data in Cloud Spanner on Google Cloud. Use when designing primary keys, writing SQL queries or client library code, or diagnosing performance issues.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fspanner-basics\u002FSKILL.md",[],[300,282,9,301,174,38,302,303,304,305,268,23,211,306,307,308,309,310,311,312],"spanner basics","writing","sql queries","instances","databases","issues","queries","keys","sql","data","provisioning","cloud","client"]