Skip to content

morganlinton/BeautifulRust / skills/rust-port

rust-port

Verified

Port code from C, C++, Python, Go, JavaScript, or TypeScript into idiomatic Rust that keeps the original behavior: ownership instead of manual memory, Result instead of error codes and exceptions, enums instead of flag ints and magic strings, and tests that prove the port matches. Use this whenever the user asks to port, translate, convert, migrate, or rewrite code in Rust ("rewrite this in Rust", "what would this look like in Rust", "move this module to Rust"), even if they don't say "port". Pairs with the rust-best-practices skill, which covers the target code's style.

FileKindSize
SKILL.mdskill md8.1 KB
evals/port-c-config-parser/case.yamlconfig663 B
evals/port-c-config-parser/files/config.cother5.1 KB
evals/port-c-config-parser/files/config.hother1.3 KB
evals/port-c-config-parser/files/test_config.cother2.9 KB
evals/port-c-config-parser/graders/01-builds-and-tests-pass.mdmarkdown114 B
evals/port-c-config-parser/graders/02-clippy-clean.mdmarkdown89 B
evals/port-c-config-parser/graders/03-no-unsafe.mdmarkdown96 B
evals/port-c-config-parser/graders/04-every-test-ported.mdmarkdown289 B
evals/port-c-config-parser/graders/05-errors-as-result.mdmarkdown209 B
evals/port-c-config-parser/graders/06-error-implements-error.mdmarkdown108 B
evals/port-c-config-parser/graders/07-option-for-absent.mdmarkdown185 B
evals/port-c-config-parser/graders/08-typed-flags.mdmarkdown144 B
evals/port-c-config-parser/graders/09-behavior-preserved.mdmarkdown320 B
evals/port-c-config-parser/graders/10-porting-notes.mdmarkdown183 B
evals/port-c-config-parser/graders/11-proportionate.mdmarkdown467 B
evals/port-c-config-parser/place-files.shexecutablescript62 B
evals/port-c-config-parser/prompt.mdmarkdown459 B
evals/port-python-task-graph/case.yamlconfig628 B
evals/port-python-task-graph/files/taskgraph.pyscript4.1 KB
evals/port-python-task-graph/files/test_taskgraph.pyscript2.7 KB
evals/port-python-task-graph/graders/01-builds-and-tests-pass.mdmarkdown114 B
evals/port-python-task-graph/graders/02-clippy-clean.mdmarkdown89 B
evals/port-python-task-graph/graders/03-every-test-ported.mdmarkdown206 B
evals/port-python-task-graph/graders/04-exceptions-as-error-enum.mdmarkdown252 B
evals/port-python-task-graph/graders/05-kind-is-enum.mdmarkdown134 B
evals/port-python-task-graph/graders/06-priority-is-option.mdmarkdown105 B
evals/port-python-task-graph/graders/07-definition-order-preserved.mdmarkdown204 B
evals/port-python-task-graph/graders/08-order-and-cycle-match.mdmarkdown187 B
evals/port-python-task-graph/graders/09-summary-every-kind-in-order.mdmarkdown146 B
evals/port-python-task-graph/graders/10-porting-notes.mdmarkdown198 B
evals/port-python-task-graph/graders/11-proportionate.mdmarkdown473 B
evals/port-python-task-graph/place-files.shexecutablescript62 B
evals/port-python-task-graph/prompt.mdmarkdown435 B

evals/port-c-config-parser/prompt.md

View on GitHub
---
tags: [rust-port]
max_turns: 40
timeout_seconds: 1200
allowed_tools: [Read, Glob, Grep, Skill, Write, Edit, Bash]
---

We're moving our config parser from C to Rust. Port config.h and config.c to an idiomatic Rust library crate with the same behavior, and port the tests in test_config.c too. Put the crate in the current directory (Cargo.toml, src/lib.rs) and add a PORTING.md with notes for the reviewer.

Input files: config.h, config.c, test_config.c
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall