OpenParable
Skip to content
← Back to skills

Rust Style Guide

Development
rust-style-guide

Rust Style Guide is an Agent Skill for development published in the fabro-sh/fabro repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Apply this Rust style guide when writing, reviewing, refactoring, or configuring Rust code for this project. Covers Rust 2024/MSRV, library vs application conventions, public API design, errors, panics, ownership and cloning, async/Tokio/concurrency, tracing, rustfmt/Clippy, testing with nextest, and unsafe/macro policy. Also use when setting up new Rust projects, investigating Rust performance, verifying library releases, or reviewing Rust code changes.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/fabro-sh/fabro/blob/HEAD/.fabro/skills/rust-style-guide/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/rust-style-guide, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Rust Style Guide

Use this skill to apply the project's Rust style conventions while writing, reviewing, refactoring, or configuring Rust code.

Location: This skill's supporting files live in .fabro/skills/rust-style-guide/ at the repository root. Every linked path below (guidelines.md, guidelines/*.md, workflows/*.md) is relative to that directory. Read them with that prefix — e.g. .fabro/skills/rust-style-guide/guidelines.md.

Supporting Files

Routing Examples

TaskLoad
Create a new Rust projectworkflows/new-rust-project.md, guidelines.md
Verify a reusable library releaseworkflows/reusable-library-release.md, guidelines.md
Investigate performanceworkflows/performance-investigation.md, guidelines.md
Review or refactor codeworkflows/code-review-refactor.md, guidelines.md
Define a public library error typeguidelines.md, library/application errors, error propagation, public API evolution
Handle top-level CLI/application errorsguidelines.md, library/application errors, error propagation, panics
Choose enum vs trait vs trait objectguidelines.md, enums vs traits, trait design, public API evolution
Add a domain ID or validated valueguidelines.md, newtypes, constructors, validation
Write async service codeguidelines.md, async runtime, task lifecycle, shutdown, logging
Add instrumentationguidelines.md, logging and observability, error messages
Configure formatting, lints, or testsguidelines.md, rustfmt, Clippy, Cargo, CI
Review unsafe code or macrosguidelines.md, unsafe and macros, public API evolution

Core Behavior

  • Load only the pages the task needs; guideline pages are the policy, workflow pages are the procedures.
  • Prefer concrete Rust guidance over language tutorials.
  • Keep library/application differences explicit.
  • Use the project's OO-leaning Rust default without forcing inheritance-shaped designs.
  • Prefer strong, compiler-backed types over primitive-heavy APIs.
  • Apply the loaded rules directly. Ask one focused question only when required project context is missing.