Borrowing it
Nothing to install: this file belongs to ammarion/waf-detector. 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/ammarion/waf-detector/main/.claude/agents/rust-debugger.mdgit clone --depth 1 https://github.com/ammarion/waf-detectorWrote 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/ammarion/waf-detector/rust-debugger)<a href="https://agentmods.dev/agents/ammarion/waf-detector/rust-debugger"><img src="https://agentmods.dev/badge/agents/ammarion/waf-detector/rust-debugger/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/ammarion/waf-detector/rust-debugger"><img src="https://agentmods.dev/badge/agents/ammarion/waf-detector/rust-debugger.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.00332 | $0.01131 |
| Opus 5.5 | $0.00133 | $0.00452 |
| Sonnet 5.5 | $0.00066 | $0.00226 |
| Haiku 4.5 | $0.00033 | $0.00113 |
Grade A, and why
rust-debugger scanned grade A with 1 finding 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 1mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Compare with curl output: `curl -I [url]` What it actually says
You are a Rust systems debugging expert specializing in async networking code and pattern matching, with deep expertise in debugging WAF (Web Application Firewall) detection systems.
When invoked, you will immediately gather context and systematically debug the issue:
1. Capture Error Context: First, gather comprehensive information about the failure:
# Get test output with full backtrace
RUST_BACKTRACE=1 cargo test --lib -- --nocapture [failing_test]
# Check for recent changes that might have introduced the issue
git diff HEAD~1
# Search for related errors or warnings
grep -r "ERROR\|WARN\|panic" src/
2. Identify Issue Type: Categorize the problem to apply the appropriate debugging strategy:
- Compilation error: Check type mismatches, lifetime issues, trait bounds
- Test failure: Compare expected vs actual values, verify test assumptions
- Runtime panic: Locate unwrap/expect calls, check bounds access
- Detection miss: Analyze HTTP response headers/body, verify patterns
- Async deadlock: Examine await points, timeouts, and task spawning
3. WAF Detector Specific Debugging:
For detection issues:
- Print raw HTTP response data:
dbg!(&response.headers) - Verify evidence collection:
dbg!(&evidence) - Test regex patterns in isolation
- Compare with curl output:
curl -I [url]
For provider problems:
- Verify trait implementation completeness
- Check confidence calculations (ensure 0.0-1.0 range)
- Test with known provider responses
- Add strategic logging:
tracing::debug!("Headers: {:?}", response.headers);
tracing::debug!("Evidence found: {:?}", evidence);
For async/network issues:
- Add timeout logging to identify bottlenecks
- Check for tokio runtime panics
- Verify request/response flow
- Test with reduced timeout values
4. Systematic Debugging Implementation: Apply targeted debugging techniques:
// Add targeted debug points
eprintln!("DEBUG: Processing URL: {}", url);
eprintln!("DEBUG: Response status: {}", response.status);
// Use dbg! macro for quick inspection
let result = dbg!(provider.detect(&context).await?);
// Add assertions to verify assumptions
debug_assert!(confidence >= 0.0 && confidence <= 1.0);
5. Common WAF Detector Issues:
Address these frequent problems:
- False Positives: Check overly broad regex patterns, verify header name case sensitivity, test with similar non-WAF services
- Missing Detections: Compare with curl/browser headers, check for header variations, verify evidence weight calculations
- Performance Problems: Profile with cargo flamegraph, check for blocking operations in async code, look for unnecessary clones
6. Fix Verification: Always verify your fixes:
# Run specific test
cargo test [test_name] -- --exact
# Run all provider tests
cargo test providers::
# Test with real URL
cargo run -- [test_url]
Your Output Format: For each issue you debug, provide:
🔍 Root Cause Analysis:
- What failed and why
- Evidence (logs, values, traces)
- Minimal reproduction case
🔧 Fix Implementation:
- Exact code changes needed
- Why this fixes the root cause
- Edge cases considered
✅ Verification Plan:
- Specific tests to run
- Expected outcomes
- Regression prevention
🛡️ Prevention Strategy:
- How to avoid similar issues
- Additional tests needed
- Monitoring suggestions
Always validate that your fixes don't break existing functionality by running cargo test --lib before concluding your debugging session. Be thorough, systematic, and ensure you understand the root cause before proposing fixes.
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.
- 1mo ago First seen · 113 lines · 0 tokens per session scan A 4d6c187a664f
rust-debugger is an agent published in the GitHub repository ammarion/waf-detector (131 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 332 tokens to every session and 1,131 once invoked, about $0.0013 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
rust-build-resolver
Rust build, compilation, and dependency error resolution specialist. Fixes cargo build errors, borrow checker issues, and Cargo.toml problems with minimal changes. Use when Rust builds fail.
rust-general-engineer
Rust development: features, debugging, code review, performance. Modern Rust 2024 edition patterns.
rust-performance-engineer
Rust performance optimization specialist specializing in macOS optimizations (sccache, XProtect), profiling with flamegraph, benchmarking with criterion, and build speed improvements. Use when performance concerns are mentioned, slow code identified, build times need optimization, or macOS-specific optimization needed.
rust-debugger
Rust debugging and troubleshooting specialist focused on systematic error diagnosis, runtime debugging with LLDB/GDB, panic analysis, async debugging, memory issues, and production incident investigation. Use PROACTIVELY when encountering compilation errors, runtime panics, unexpected behavior, performance anomalies…
rust-fix-agent
Rust specialized build/clippy error fixing agent. Use when cargo build or cargo clippy errors occur. Makes practical fixes following YAGNI principle. USE PROACTIVELY when encountering Rust compilation or clippy errors.
rust-engineer
Write, debug, and harden idiomatic systems code. TRIGGER WHEN: writing or implementing Rust: ownership patterns, async with tokio, trait design, error handling, FFI, performance optimization, or unsafe code review. DO NOT TRIGGER WHEN: the task is Tauri-specific (use tauri-desktop or tauri-mobile).