Borrowing it
Nothing to install: this file belongs to c9r-io/orchestrator. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/c9r-io/orchestrator/main/.claude/skills/rust-conventions/SKILL.mdgit clone --depth 1 https://github.com/c9r-io/orchestratorWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/c9r-io/orchestrator/rust-conventions)<a href="https://agentmods.dev/skills/c9r-io/orchestrator/rust-conventions"><img src="https://agentmods.dev/badge/skills/c9r-io/orchestrator/rust-conventions.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00013 | $0.00843 |
| Opus 5 | $0.00006 | $0.00421 |
| Sonnet 5 | $0.00003 | $0.00169 |
| Haiku 4.5 | $0.00001 | $0.00084 |
Grade A, and why
rust-conventions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Conventions
Tech Stack
These are recommended defaults; adjust to your stack.
| Component | Suggested Library |
|---|---|
| Web | axum (+ tower middleware) |
| gRPC | tonic |
| Database | sqlx |
| Async | tokio |
| Logging | tracing |
| Testing | mockall, wiremock |
Code Organization
src/
├── domain/ # Pure models with validation
├── service/ # Business logic (depends on repo traits)
├── repository/ # Data access (mockable traits)
├── api/ # HTTP handlers (thin)
├── grpc/ # gRPC handlers (thin)
└── cache/ # Cache facade + NoOp cache for tests (optional)
Error Handling
// ❌ BAD
let result = db.query().await.ok();
// ✅ GOOD - use Result with context
let result = db.query()
.await
.context("Failed to query tenant")?;
// ✅ GOOD - custom error types
#[derive(thiserror::Error, Debug)]
pub enum ServiceError {
#[error("Tenant not found: {0}")]
TenantNotFound(Uuid),
#[error("Database error: {0}")]
Database(#[from] sqlx::Error),
}
Testing - NO EXTERNAL DEPENDENCIES
All tests run fast (~1-2s) with no Docker:
| Component | Approach |
|---|---|
| Repository | Mock traits with mockall |
| Service | Unit tests with mock repos |
| gRPC | NoOpCacheManager + mocks |
| Keycloak | wiremock HTTP mocking |
Prohibited
- No testcontainers
- No real database connections
- No real Redis connections
- No faker library
Repository Mock Pattern
#[cfg_attr(test, mockall::automock)]
#[async_trait]
pub trait TenantRepository: Send + Sync {
async fn create(&self, input: &CreateTenantInput) -> Result<Tenant>;
async fn find_by_id(&self, id: StringUuid) -> Result<Option<Tenant>>;
}
Service Layer Tests
#[cfg(test)]
mod tests {
use super::*;
use crate::repository::tenant::MockTenantRepository;
#[tokio::test]
async fn test_create_tenant() {
let mut mock = MockTenantRepository::new();
mock.expect_find_by_slug()
.returning(|_| Ok(None));
mock.expect_create()
.returning(|input| Ok(Tenant { name: input.name.clone(), ..Default::default() }));
let service = TenantService::new(Arc::new(mock), None);
let result = service.create(input).await;
assert!(result.is_ok());
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 145 lines · 13 tokens per session scan A c7754f2bf6e6
rust-conventions is a skill published in the GitHub repository c9r-io/orchestrator (21 stars, last pushed 6d ago), licensed MIT. It adds 13 tokens to every session and 843 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
rust-check
Run cargo check on the current Rust project to find compile errors.
thread-outbox-provider-push
Publish a fixture thread outbox entry through the Rust thread-outbox-provider front.
cw-gates
Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.
cw-land
Use when turning verified Codewhale work into commits, branches, or a merge: choosing direct-main vs. worktree vs. integration branch, preserving contributor credit, and honoring the gate artifact before merging.
cw-slice
Use before writing code for any Codewhale feature, upgrade, or refactor: find the existing owner of the behavior, bound the change to one reviewable slice, and fix the evidence bar before you start.
contributor-onboarding
Help a new contributor get productive on this checkout - inspect sync state against main, build, run the repository's exact verification gate, and produce a local what's-new digest. Never fetches, pulls, or modifies a dirty tree on its own. Explicit-only.