Declarative .mdcReglas Cursor/Claude/Windsurf y flujos de trabajo n8nHabilidad del agenteFuga de secreto cero auditada

Rust Tokio + Axum Habilidad de ingeniería de sistemas seguros para cancelación

Habilidad declarativa CLAUDE.md y .mdc que previenen pánicos .unwrap() en controladores HTTP/MCP, protegiendo tokio::select! seguridad de cancelación y colas de canales delimitadores.

Agente declarativo y archivos de reglas IDE

---
description: Zero-panic Axum handlers, bounded Tokio mpsc channels, and cancellation-safe async Rust
globs: **/*.rs,Cargo.toml
alwaysApply: false
---

# Rust Tokio & Axum Production Reliability Skill

- Forbid `.unwrap()` and `.expect()` in request handlers and MCP tool loops; propagate typed errors via `thiserror` implementing `axum::response::IntoResponse`.
- Use bounded `tokio::sync::mpsc::channel(capacity)` exclusively — never `unbounded_channel` — to enforce deterministic backpressure.
- Offload CPU-bound parsing, hashing, or synchronous I/O > 500µs onto `tokio::task::spawn_blocking` so worker reactor threads never stall.
- Audit every `tokio::select!` branch for cancellation safety; avoid partial multi-frame writes inside cancellable futures.
- Instrument async handlers with `#[tracing::instrument(skip_all, fields(req_id))]` without logging secret headers.

## Verification Check
```bash
cargo clippy --all-targets -- -D warnings && cargo test
```

Notas de configuración de la comunidad y reseñas de producción (0)

Aún no hay notas comunitarias. Comparta su consejo de configuración de producción a continuación.

Publicar una nota de configuración o un consejo de verificación

Inspector de esquema de recursos y herramientas MCP expuesto

Identificador de herramienta/recursoParámetros de entradaComportamiento de ejecución
forbid_handler_unwrapsrc/**/*.rsEnforces typed thiserror/IntoResponse error propagation instead of unwrap()/expect().