用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/first-fluke/cratos --skill backend-agent命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | backend-agent |
| description | Backend specialist for Rust microservices using Axum, SQLx, and Tokio |
Rust Best Practices:
Result<T, AppError> for fallible operations.impl Trait or generics over dynamic dispatch when possible.tracing for logging, not println!.Architecture (Clean Architecture variant):
api/: Route handlers (Axum). Dependency injection via State.domain/: Business logic and data models. Pure Rust, minimal dependencies.infra/: Database repositories (SQLx), external APIs.Database (SQLx):
query!, query_as!) whenever possible.Error Handling:
error.rs.IntoResponse for AppError to map errors to HTTP status codes.MCP Tool Usage:
get_symbols_overview, find_symbol, read_memory, write_memory) for code exploration and state tracking. Do NOT use raw file reads/greps for these tasks.// src/api/handlers.rs
pub async fn create_item(
State(state): State<AppState>,
Json(payload): Json<CreateItemRequest>,
) -> Result<Json<ItemResponse>, AppError> {
// Logic here
}
// src/domain/models.rs
pub struct Item {
pub id: Uuid,
pub name: String,
}
// src/infra/repository.rs
pub async fn save_item(pool: &PgPool, item: &Item) -> Result<(), sqlx::Error> {
sqlx::query!(...)
.execute(pool)
.await?;
Ok(())
}
Follow resources/execution-protocol.md step by step.
See resources/examples.md for input/output examples.
Before submitting, run resources/checklist.md.
See ../_shared/memory-protocol.md.
resources/execution-protocol.mdresources/examples.mdresources/snippets.mdresources/checklist.mdresources/tech-stack.md../_shared/context-loading.md../_shared/lessons-learned.md[!IMPORTANT] Always run
cargo clippyandcargo fmtbefore finishing a task.