Declarative .mdcCursor/Claude/Windsurf ルールと n8n ワークフローエージェントスキルゼロシークレット漏洩の監査済み
Rust Tokio + Axum キャンセルセーフなシステム エンジニアリング スキル
宣言型 CLAUDE.md および .mdc スキルは、HTTP/MCP ハンドラーでの .unwrap() パニックを防止し、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_unwrap | src/**/*.rs | Enforces typed thiserror/IntoResponse error propagation instead of unwrap()/expect(). |