Skip to content

Repository files navigation

rewrite-rs/skills: the most comprehensive agent skills for Rust and porting

Release, CI, license, last commit, stars
28 skills

The most comprehensive skill set for coding agents writing real Rust. 28 skills that teach judgment, not snippets: use the ownership system instead of working around it, design errors and APIs that survive review, and port code into Rust without losing behaviour.

Four areas. Rust craft: idioms, ownership, errors, types, async, unsafe, performance, concurrency, observability, docs. Porting: one skill per source language (C, C++, Go, Java, Python, TypeScript) over a shared migration spine. Workflow: review, testing, setup, and a router that picks the skill for you. Misc: the occasional setup and audit skills.

Installation

The two routes below are exclusive: the plugin is a managed, read-only bundle you subscribe to; npx writes editable files you own. Installing both leaves every skill duplicated. Pick one.

Claude Code
/plugin marketplace add rewrite-rs/skills
/plugin install rewrite-rs-skills@rewrite-rs
Other agents
npx skills@latest add rewrite-rs/skills

Pick the skills you want, and which coding agents to install them on.

Skills

Every skill in the set can be invoked by the user, by typing its name. The label under each bucket decides whether the agent may also pull the skill in on its own: model-invoked skills are pulled in automatically when the task matches the description; user-invoked skills never are — the agent may suggest one, but the user starts it.

Rust

Language-craft skills for writing and reviewing Rust.

Model-invoked

  • idiomatic-rust — Rust that reads like Rust, without boilerplate.
  • ownership-not-clone — Ownership and borrowing instead of clone, Rc, and RefCell.
  • rust-errors — Result over unwrap, and error types callers can act on.
  • type-driven-design — Make illegal states unrepresentable in the type system.
  • rust-api-design — Public surface, trait design, and semver discipline.
  • async-rust — Runtimes, Send bounds, cancellation safety, and blocking work.
  • unsafe-rust — Justify, document, and verify unsafe blocks with Miri.
  • rust-performance — Profile first, cut allocation, and treat codegen flags as the last five percent.
  • rust-concurrency — Threads, channels, locks, and atomics — the model that fits the workload.
  • rust-observability — Structured events with named fields, spans, and no secrets in logs.
  • rust-docs — Doc comments as API contract, with doctests that actually run.

User-invoked

None yet in this bucket.

Porting

Model-invoked

  • port-to-rust — Parity contract, phase sequence, and differential proof for a port.
  • port-from-python — Python-to-Rust construct mapping and the PyO3 boundary.
  • port-from-typescript — TypeScript and JavaScript mapping, with the napi-rs and wasm boundaries.
  • port-from-go — Go-to-Rust mapping — goroutines, channels, interfaces, and error values.
  • port-from-java — Java-to-Rust mapping — hierarchies to enums, exceptions to Result.
  • port-from-cpp — C++-to-Rust mapping — RAII, smart pointers, templates, and the cxx bridge.
  • port-from-c — C-to-Rust mapping — pointers, ownership, unions, and the bindgen boundary.

User-invoked

None yet in this bucket.

Workflow

Model-invoked

  • rust-testing — Tests that fail when behaviour changes, including port parity.
  • rust-code-review — Two-axis review — standards and spec — over a Rust diff.

User-invoked

  • setup-rust-skills — Lint, format, and recorded project posture for a Rust repo.
  • rust-skills-map — Router over the skill set — which skill owns which decision.

Misc

Occasional setup and audit skills: CI, hooks, and the dependency tree.

Model-invoked

  • rust-supply-chain — Dependency advisories, licences, and duplicates, each ending in a decision.
  • rust-macros — Macros as a last resort, by-example first, with errors that point at the caller.
  • rust-serde — Serde as the validating boundary between a wire format and a domain type.
  • rust-ffi — A translating FFI boundary with explicit ownership and no panics crossing it.

User-invoked

Why these skills exist

Rust that reads like a translation

Code ported or written without idioms native to Rust compiles and runs, but reads like whatever language it came from — index loops instead of iterators, hand-written conversions instead of From/Into, hand-written impls instead of derives. These skills push toward the shape a Rust reader expects, not just code that the compiler accepts.

clone and unwrap as design smells

clone, unwrap, expect, and Rc<RefCell<_>> all resolve a borrow-checker or type-system objection without resolving the design problem behind it. Sometimes that's the right call — but reaching for one by reflex, rather than as a deliberate tradeoff, is usually a sign the ownership structure needs rethinking rather than routing around.

States that compile, and invariants that hold

The compiler accepts every constructible combination of fields, and the test suite covers only the paths it was told to. An illegal state that compiles — a post that is draft and published at once, a connection that sends before it connects — and an unsafe block whose invariant holds for every current caller but not for the next one both pass every check until they do not. The skills in this set push the first into the type system, where the state cannot be constructed, and keep the second behind a written invariant and Miri, where a violation is a report rather than a production incident.

Ports that drift from parity

A port that compiles is not a port that matches the behaviour of its source. Without a crisply stated parity contract — what "done" means for this port — and discipline about never narrowing it silently, a port drifts: edge cases the original handled quietly stop being handled, and nobody notices until production.

Ports that never choose an end state

A port ends one of three ways: replacement, with the source implementation deleted; a permanent binding that the existing callers keep importing; or scaffold, deleted at cut-over. That choice fixes the seam and the contract before either is written, and choosing it late is what leaves a codebase stuck in two languages — Rust that was never agreed to stay, and source code that is no longer maintained but still decides what runs.

Advice that nothing enforces

The craft skills name the standard — the shape, the ownership, the error type — but a standard nothing enforces is a standard the next contributor forgets. Lint and format configuration the tooling applies, tests that fail when behaviour changes, a review that ends in a verdict, and a recorded posture file every agent reads on opening the repo are what make the standard the state the repo lives in, not advice about it.

Contributing / repo layout

See CLAUDE.md for the rules that govern authoring, editing, and reviewing a skill in this repo, and CONTEXT.md for the vocabulary this repo uses.