[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D81FG9GVCC4X0SG4VSEABR":3,"skill-same:01M7D81FG9GVCC4X0SG4VSEABR":75},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":28,"commitSha":29,"skillDirectory":5,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7D81FG9GVCC4X0SG4VSEABR","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.","tangyixiao\u002Ftangyixiao-skills","tangyixiao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F115929632?v=4","01M7D582YK6A4M63CAK4CSY4EW","Tang Yixiao","01M7D582Z64DMRSYR872SR34SA",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fmigrate-to-rust\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fmigrate-to-rust\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: migrate-to-rust\nmetadata:\n  version: 1.0.0\n  category: ApplicationDevelopment\ndescription: Clones, analyzes, plans, and migrates legacy codebases (C++, Fortran,\n  Java, Python, C, Shell) from a GitHub URL or local directory to a modern, high-performance,\n  deterministic, 100% Safe Rust architecture, tracking live telemetry across every\n  task bucket, test failure\u002Ffix cycle, and Profile-Guided Optimization (PGO) stage,\n  and producing a first-person AI storytelling report and interactive HTML infographic.\n  Use when migrating a GitHub repository or local codebase to Rust, porting legacy\n  C++, Fortran, 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. Don't\n  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":25,"description":7},{"version":26,"category":27},"1.0.0","ApplicationDevelopment","main","2a870f189175a48c39f5f7e26a6d93b0be9cd13b",0,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills","https:\u002F\u002Ftangyixiao.github.io\u002Ftangyixiao-skills\u002F","https:\u002F\u002Fgithub.com\u002Ftangyixiao","http:\u002F\u002Fwww.sxyz.net\u002F","I am Tang Yixiao, a student in Shaoxing No.1 High School. I am eager to learn on GitHub and contribute my part to this community.","2026-11-11 15:45:59",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add tangyixiao\u002Ftangyixiao-skills --skill migrate-to-rust",{"tool":43,"command":44},"bunx","bunx skills add tangyixiao\u002Ftangyixiao-skills --skill migrate-to-rust",{"tool":46,"command":47},"pnpm","pnpm dlx skills add tangyixiao\u002Ftangyixiao-skills --skill migrate-to-rust","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fmigrate-to-rust\u002FSKILL.md",true,[51,57,61,65,69],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"INSTALL-SOURCE.json","REFERENCE","参考文档",510,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fmigrate-to-rust\u002FINSTALL-SOURCE.json",{"path":58,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":16},"LICENSE","许可证",11358,{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Finfographic_template.html",63070,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fmigrate-to-rust\u002Freferences\u002Finfographic_template.html",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fpgo_and_telemetry_guide.md",17673,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fmigrate-to-rust\u002Freferences\u002Fpgo_and_telemetry_guide.md",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Ftelemetry.py","SCRIPT","脚本",42399,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fmigrate-to-rust\u002Fscripts\u002Ftelemetry.py",[76,84,93,101,109,117],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":20},"01M7D8JK8FYBFNNAJXWD89CFH7","xlsx","Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":88,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":20},"01M7D8JG8ERGGQQAMX0DWCG9GR","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","MIT","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":88,"licenseFileUrl":97,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":20},"01M7D8JE672GW3EHSE8EF185M4","writing-fragments","Writing, explore: mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":88,"licenseFileUrl":105,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":20},"01M7D8JBK572YDFMND8Q6CEYJW","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":88,"licenseFileUrl":113,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":20},"01M7D8J5QPWEXX61EGBKYH73R8","writing-clearly-and-concisely","Use when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Applies Strunk's timeless rules for clearer, stronger, more professional writing.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":88,"licenseFileUrl":121,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":20},"01M7D8J36YWC8WZS5DK5AH03CD","writing-beats","Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FSKILL.md",[],[]]