Borrowing it
Nothing to install: this file belongs to cacr92/WeReply. 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/cacr92/WeReply/main/.claude/skills/rust-optimization/SKILL.mdgit clone --depth 1 https://github.com/cacr92/WeReplyWrote 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/cacr92/wereply/rust-optimization)<a href="https://agentmods.dev/skills/cacr92/wereply/rust-optimization"><img src="https://agentmods.dev/badge/skills/cacr92/wereply/rust-optimization/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.
<a href="https://agentmods.dev/skills/cacr92/wereply/rust-optimization"><img src="https://agentmods.dev/badge/skills/cacr92/wereply/rust-optimization.svg" alt="Reviewed on agentmods" width="80" 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.00191 | $0.02087 |
| Opus 5.5 | $0.00076 | $0.00835 |
| Sonnet 5.5 | $0.00038 | $0.00417 |
| Haiku 4.5 | $0.00019 | $0.00209 |
Grade A, and why
rust-optimization 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.
How it starts
The opening of the file, as written. The whole thing — 357 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Optimization Skill
Advanced Rust optimization techniques for high-performance feed formula calculation and linear programming.
Performance Optimization Strategies
1. Caching Strategy (Moka)
Use moka::future::Cache for frequently accessed data:
use moka::future::Cache;
use std::time::Duration;
pub struct MaterialService {
cache: Cache<String, Material>,
}
impl MaterialService {
pub fn new() -> Self {
Self {
cache: Cache::builder()
.max_capacity(1000)
.time_to_live(Duration::from_secs(3600))
.build(),
}
}
pub async fn get_material(&self, code: &str) -> Result<Material> {
self.cache
.try_get_with(code.to_string(), async {
self.repository.find_by_code(code).await
})
.await
}
}
When to cache:
- Database query results that don't change often
- Computed nutrition values
- Expensive calculation results
- Reference data (materials, species standards)
2. Parallel Processing (Rayon)
Use rayon for CPU-intensive parallel computations:
use rayon::prelude::*;
pub fn calculate_nutrition_batch(
materials: &[Material],
proportions: &[f64],
) -> Vec<NutritionResult> {
materials
.par_iter() // Parallel iterator
.zip(proportions.par_iter())
.map(|(material, proportion)| {
calculate_material_nutrition(material, *proportion)
})
.collect()
}
Best practices:
- Use parallel iterators for embarrassingly parallel problems
- Benchmark to verify performance gains
- Avoid parallelizing small operations (overhead costs)
- Consider memory bandwidth limitations
3. Memory Optimization
Avoid Unnecessary Clones
// ❌ Bad - unnecessary clone
fn process(data: Vec<String>) -> Vec<String> {
data.clone()
}
// ✅ Good - transfer ownership
fn process(data: Vec<String>) -> Vec<String> {
data
}
Use References Where Possible
// ❌ Bad - takes ownership
fn calculate(materials: Vec<Material>) -> f64 {
// ...
}
// ✅ Good - borrows data
fn calculate(materials: &[Material]) -> f64 {
// ...
}
What ships with it
1 file 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.
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.
- 1mo ago First seen · 357 lines · 191 tokens per session scan A 2a804d5c73ce
rust-optimization is a skill published in the GitHub repository cacr92/WeReply (9 stars, last pushed 9mo ago), licensed MIT. It adds 191 tokens to every session and 2,087 once invoked, about $0.0008 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-08-31.
Other skills, from other repositories
rust-patterns
Idiomatic Rust patterns, ownership, error handling, traits, concurrency, and best practices for building safe, performant applications.
update-v8-version
Update Codex's pinned v8 / rustyv8 versions, validate the release-candidate path, and investigate failed V8 canary or artifact builds. Use when asked to bump V8, update rustyv8 artifacts, prepare or validate a V8 release candidate, check v8-canary, or diagnose why a V8 version update no longer builds.
dd-code-generation
Use pup CLI for immediate Datadog operations or generate code for integration into applications.
omh-rust
This is an OMH rust workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).
azure-keyvault-secrets-rust
Client library for Azure Key Vault Secrets — secure storage for passwords, API keys, and other secrets.
rust-project
Modern Rust project architecture guide for 2025. Use when creating Rust projects (CLI, web services, libraries). Covers workspace structure, error handling, async patterns, and idiomatic Rust best practices.