rust

rust is a skill for Claude Code, Codex from jnPiyush/AgentX. It costs 44 tokens per session (1,236 once invoked), scanned A, original, Apache-2.0.

A guide to building software in Rust, a programming language focused on memory safety and efficient systems code. It covers ownership, borrowing, error handling, asynchronous work, and concurrency.

In plain words
What is it for?
Use it to build Rust applications and services, design trait-based interfaces, write threaded or async code, handle Result and Option values, and serialize data.
Why use it?
It helps avoid common memory and data-race errors while keeping programs efficient. It also guides project structure, error types, async runtimes, serialization, and performance checks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build Rust applications and services, design trait-based interfaces, write threaded or async code, handle Result and Option values, and serialize data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jnpiyush/agentx/rust
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jnPiyush/AgentX --skill rust
Clone the repo
git clone --depth 1 https://github.com/jnPiyush/AgentX

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for rust

README.md
[![agentmods](https://agentmods.dev/badge/skills/jnpiyush/agentx/rust/github.svg)](https://agentmods.dev/skills/jnpiyush/agentx/rust)
Your own site
<a href="https://agentmods.dev/skills/jnpiyush/agentx/rust"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/rust/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rust

Your own site · 80×15
<a href="https://agentmods.dev/skills/jnpiyush/agentx/rust"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,236 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01236
Opus 5.5 $0.00018 $0.00494
Sonnet 5.5 $0.00009 $0.00247
Haiku 4.5 $0.00004 $0.00124

Measured 1mo ago against content hash f398cd237371, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rust 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 1mo 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.

.github/skills/languages/rust/SKILL.md · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rust Development

Purpose: Best practices for Rust development including ownership, error handling, concurrency, and safety patterns.


When to Use This Skill

  • Building Rust applications and systems
  • Working with ownership, borrowing, and lifetimes
  • Implementing error handling with Result and Option types
  • Writing concurrent code with threads and async
  • Designing trait-based abstractions

Decision Tree

Rust Project Decision
+-- Building a CLI tool?
|   +-- Argument parsing? -> clap
|   +-- Pretty output? -> anyhow + color-eyre
+-- Building a web service?
|   +-- Async HTTP? -> axum or actix-web
|   +-- Need middleware? -> tower (used by axum)
+-- Error handling strategy?
|   +-- Library code? -> thiserror (typed errors)
|   +-- Application code? -> anyhow (ergonomic errors)
+-- Async runtime?
|   +-- General purpose? -> tokio
|   +-- Lightweight? -> smol or async-std
+-- Serialization needed? -> serde + serde_json / serde_yaml
+-- Performance-critical path? -> Benchmark with criterion before optimizing

Prerequisites

  • Rust 1.94+ installed via rustup
  • Cargo package manager

Table of Contents

  1. Project Structure
  2. Ownership and Borrowing
  3. Error Handling
  4. Traits and Generics
  5. Concurrency
  6. Testing
  7. Performance
  8. Security
  9. Best Practices

Project Structure

Standard Layout

project/
+-- src/
| +-- main.rs # Binary entry point
| +-- lib.rs # Library root
| +-- config.rs # Configuration
| +-- error.rs # Error types
| +-- models/
| | +-- mod.rs
| | -- user.rs
| -- services/
| +-- mod.rs
| -- user_service.rs
+-- tests/
| -- integration_tests.rs
+-- benches/
| -- benchmarks.rs
+-- examples/
| -- basic_usage.rs
+-- Cargo.toml
+-- Cargo.lock
-- README.md

Cargo.toml

[package]
name = "myapp"
version = "0.1.0"
edition = "2021"
authors = ["Your Name <[email protected]>"]
description = "A brief description"

[dependencies]
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
thiserror = "1"
anyhow = "1"

[dev-dependencies]
tokio-test = "0.4"

[profile.release]
lto = true
opt-level = 3

Read the full file on GitHub · 173 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 1mo ago Changed f398cd237371
  2. 1mo ago First seen · 173 lines · 44 tokens per session scan A 1e6a11bd5c38

Subscribe to this mod's changes

rust is a skill published in the GitHub repository jnPiyush/AgentX (16 stars, last pushed 3d ago), licensed Apache-2.0. It adds 44 tokens to every session and 1,236 once invoked, about $0.0002 per session on Opus 5.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-09-03.