Declarative .mdcกฎ Cursor/Claude/Windsurf และเวิร์กโฟลว์ n8nทักษะตัวแทนตรวจสอบการรั่วไหลแบบ Zero-Secret แล้ว

ทักษะทางวิศวกรรมระบบป้องกันสนิม Tokio + Axum

ทักษะ CLAUDE.md และ .mdc ที่ประกาศ ป้องกันการตื่นตระหนก .unwrap() ในตัวจัดการ HTTP/MCP ปกป้อง tokio::select! ความปลอดภัยในการยกเลิก และการเข้าคิวช่องสัญญาณ

ไฟล์กฎตัวแทนและ 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
```

หมายเหตุการตั้งค่าชุมชนและบทวิจารณ์การผลิต (0)

ยังไม่มีบันทึกของชุมชน แบ่งปันเคล็ดลับการกำหนดค่าการใช้งานจริงของคุณด้านล่าง

โพสต์บันทึกการตั้งค่าหรือเคล็ดลับการยืนยัน

เครื่องมือ MCP ที่เปิดเผยและตัวตรวจสอบสคีมาทรัพยากร

เครื่องมือ / ตัวระบุทรัพยากรพารามิเตอร์อินพุตพฤติกรรมการดำเนินการ
forbid_handler_unwrapsrc/**/*.rsEnforces typed thiserror/IntoResponse error propagation instead of unwrap()/expect().