Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/flashus/detrix/audit-crategit clone --depth 1 https://github.com/flashus/detrixWhat 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 | $0.00013 | $0.00920 |
| Opus 5 | $0.00006 | $0.00460 |
| Sonnet 5 | $0.00003 | $0.00184 |
| Haiku 4.5 | $0.00001 | $0.00092 |
Grade A, and why
audit-crate scanned grade A with 0 findings 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 2d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a senior Rust developer performing a focused code audit of a single crate in the Detrix project.
Target
Audit the crate specified in: "$ARGUMENTS"
Parse the arguments as: <crate-name> [scope]
<crate-name>is required (e.g.detrix-core,detrix-api)[scope]is optional:branch,uncommitted, orproject(default:project)
If scope is branch: only audit files changed on current branch vs main (use git diff main...HEAD -- crates/<crate-name>/).
If scope is uncommitted: only audit uncommitted changes (use git diff -- crates/<crate-name>/).
If scope is project: audit the entire crate.
Instructions
Read CLAUDE.md first to understand the architecture rules, then audit the crate thoroughly. Use Serena's symbolic tools (get_symbols_overview, find_symbol, find_referencing_symbols) to navigate efficiently — avoid reading entire files unless necessary.
Checklist
Architecture & Design
- Clean Architecture layer violations (check dependency rules: core depends on NOTHING, ports on core+config only, application on ports+core+config only, infrastructure implements port traits)
- God files / god modules (files with too many responsibilities)
- Over-complex code / doom pyramids (deeply nested if/match/loop)
- Proper component wiring — compare patterns across the crate
- Config parameter dataflow — params properly passed through layers
Error Handling
.map_err()— should useFrom/TryFromimpls instead; use extension trait pattern to keep contextunwrap()/expect()/panic!()in non-test code — app must never panic- Similar/duplicate error variants that should be consolidated
- Proper error propagation with
?operator
Type System & Constants
Arc<dyn Trait + Send + Sync>— verify proper type aliases are used- Hardcoded strings or magic numbers — should be enums/constants
- Hardcoded values where config values should be forwarded
- Default values — are they sensible? Could they cause issues?
- Constants should be defaults only; actual values from detrix.toml
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.
- 2d ago First seen · 100 lines · 13 tokens per session scan A c2a2db83a292
audit-crate is a command published in the GitHub repository flashus/detrix (23 stars, last pushed 9d ago), licensed MIT. It adds 13 tokens to every session and 920 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
rust-review
Rust code review for ownership, safety, and idiomatic patterns.
freview
Prepare PR with CI checks and Devin AI review loop.
debug-task
Debug Frontman task interactions from the database.
work
Set up a containerized worktree for a GitHub issue or PR.
rust-critique
Deep code critique — read the target Rust code and apply the full review process. Evaluates soundness, ownership, error handling, type design, async correctness, performance, and architecture. Think like a senior Rust engineer giving honest feedback.
rust-harden
Harden Rust code — replace unwrap with proper error handling, add safety comments to unsafe blocks, enable overflow checks, validate inputs at boundaries. The defensive hardening pass.