Skills for Real Engineers. Straight from my .agents directory.
rust-port
Agent skill frommorganlinton/BeautifulRust
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.
How to install rust-port
npx skills add morganlinton/BeautifulRust# or add only this skill to Claude Code: copy the folder
skills/rust-port/
# into
~/.claude/skills/rust-port/ (all projects)
.claude/skills/rust-port/ (one project)
1# Rust port23The goal is the Rust a Rust developer would have written to solve the same problem, with4the same observable behavior. A line-by-line transliteration (C written in Rust syntax,5or Python with `Box<dyn Any>`) compiles but keeps every problem the original had and adds6the borrow checker on top. Port the behavior, not the structure.78## 1. Understand the original before writing anything9101. **Read the code and its tests**, and anything that calls it, if you have it.112. **List the observable behavior**: every public function, its inputs, its outputs, and12 every way it can fail. Include the quiet parts, which are where ports go wrong:13 ordering of results, how ties break, what happens on empty input, whitespace and case14 handling, integer limits, and what counts as an error versus a valid edge case.153. **Note what is incidental**, meaning things the original only does because of its16 language: manual memory management, out-parameters, `NULL` returns, global state,17 fixed-size buffers, a class that exists only to group functions, or `isinstance`18 checks. These don't carry over.194. If the original has a bug or an ambiguity, keep its behavior, flag it in the porting20 notes, and let the user decide. A port is not the place to silently fix things.2122## 2. Port the tests first2324Translate the original tests into Rust tests before porting the implementation. Keep one25Rust test per original test, with a name that maps back to it, so a reader can check26…
Excerpt shown under the repository's MIT license.
More skills in BeautifulRust
Similar skill repositories
An agentic skills framework & software development methodology that works.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Production-grade engineering skills for AI coding agents.
The open-source app everyone uses to manage agents at work
