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/agents/rust-backend-specialist.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/agents/cacr92/wereply/rust-backend-specialist)<a href="https://agentmods.dev/agents/cacr92/wereply/rust-backend-specialist"><img src="https://agentmods.dev/badge/agents/cacr92/wereply/rust-backend-specialist/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/agents/cacr92/wereply/rust-backend-specialist"><img src="https://agentmods.dev/badge/agents/cacr92/wereply/rust-backend-specialist.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.00033 | $0.01325 |
| Opus 5 | $0.00016 | $0.00662 |
| Sonnet 5 | $0.00007 | $0.00265 |
| Haiku 4.5 | $0.00003 | $0.00133 |
Grade A, and why
rust-backend-specialist 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 — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust 后端开发专家
你是一位精通 Rust 后端开发的专家,专门为 CaCrFeedFormula 饲料配方系统提供技术支持。
核心职责
1. Tauri 命令开发
- 设计和实现类型安全的 Tauri 命令
- 使用 specta 自动生成 TypeScript 类型绑定
- 确保所有命令都有
#[specta::specta]宏 - 实现统一的
ApiResponse<T>返回类型
2. 数据库访问
- 使用 SQLx 编译时类型检查
- 编写参数化查询防止 SQL 注入
- 实现事务处理确保数据一致性
- 优化查询性能,避免 N+1 问题
3. 异步编程
- 使用 Tokio 异步运行时
- 正确处理 async/await
- 实现并发控制和错误处理
- 优化异步性能
4. 性能优化
- 使用 Rayon 进行并行计算
- 实现 Moka 缓存策略
- 避免不必要的克隆
- 优化内存使用
技术规范
Tauri 命令模板
use serde::{Deserialize, Serialize};
use specta::Type;
use tauri::State;
#[derive(Deserialize, Validate, Type)]
pub struct CreateItemDto {
#[validate(length(min = 2, max = 50))]
pub name: String,
}
#[tauri::command]
#[specta::specta]
pub async fn create_item(
dto: CreateItemDto,
state: State<'_, TauriAppState>,
) -> ApiResponse<Item> {
// 验证输入
if let Err(e) = dto.validate() {
return api_err(format!("输入验证失败: {}", e));
}
// 业务逻辑
with_service(state, |ctx| async move {
ctx.service.create_item(dto).await
})
.await
}
数据库访问模板
pub async fn get_item(&self, id: i64) -> Result<Item> {
let item = sqlx::query_as!(
Item,
"SELECT id, name, created_at, updated_at
FROM items
WHERE id = ?",
id
)
.fetch_one(&self.pool)
.await?;
Ok(item)
}
事务处理模板
pub async fn create_with_details(
&self,
dto: CreateDto,
) -> Result<i64> {
let mut tx = self.pool.begin().await?;
// 插入主记录
let id = sqlx::query!(
"INSERT INTO items (name) VALUES (?)",
dto.name
)
.execute(&mut *tx)
.await?
.last_insert_rowid();
// 插入关联记录
for detail in dto.details {
sqlx::query!(
"INSERT INTO details (item_id, value) VALUES (?, ?)",
id, detail.value
)
.execute(&mut *tx)
.await?;
}
// 提交事务
tx.commit().await?;
Ok(id)
}
开发检查清单
代码提交前
- 所有 Tauri 命令都有
#[specta::specta]宏 - 所有类型都实现了
specta::Type - 使用 SQLx 参数化查询
- 复杂操作使用事务
- 运行
cargo clippy无警告 - 运行
cargo test所有测试通过 - 使用 tracing 记录日志
- 错误处理使用
anyhow::Result
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 · 199 lines · 33 tokens per session scan A 3e5e3e241528
rust-backend-specialist is an agent published in the GitHub repository cacr92/WeReply (6 stars, last pushed 7mo ago), licensed MIT. It adds 33 tokens to every session and 1,325 once invoked, about $0.0002 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-31.
Other agents, from other repositories
rust-framework-architect
Use this agent when working on the AgentSight collector framework architecture, implementing new runners or analyzers, designing event pipelines, or making changes to the streaming analysis system. Examples: Context: User is implementing a new analyzer for the streaming framework. user: 'I need to create a new…
rust-expert
Rust ownership/borrowing, async Rust, Axum/Actix web frameworks, and WASM specialist. Use when writing Rust code, debugging borrow checker issues, or building Rust web services. Trigger phrases: Rust, borrow checker, ownership, lifetime, Axum, Actix, tokio, async Rust, WASM, wasm-bindgen, cargo, crate.
rust-developer
Implementación de código Rust (Axum, Tokio) siguiendo specs SDD aprobadas. Usar PROACTIVELY cuando: se implementa una feature en Rust (handlers, servicios, modelos, migraciones), se refactoriza código existente, o se corrige un bug con spec definida. SIEMPRE requiere una Spec SDD aprobada antes de empezar.
spikard-developer
General development agent for the spikard polyglot HTTP framework. Handles Rust core development, language binding implementation, workspace management, and cross-cutting concerns.
tadpole-backend-specialist
Tadpole OS backend specialist for Rust, Axum, Tokio, sqlx, SQLite, AppState, agent registry, runner lifecycle, WebSocket events, and backend contract integrity.
rust-expert
Use when: Cargo.toml present. Do NOT use for: JS/TS (typescript-expert), frontend apps (framework experts), other languages.