Borrowing it
Nothing to install: this file belongs to po4yka/RIPDPI. 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/po4yka/RIPDPI/main/.claude/agents/rust-api-auditor.mdgit clone --depth 1 https://github.com/po4yka/RIPDPIWrote 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/po4yka/ripdpi/rust-api-auditor)<a href="https://agentmods.dev/agents/po4yka/ripdpi/rust-api-auditor"><img src="https://agentmods.dev/badge/agents/po4yka/ripdpi/rust-api-auditor/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/po4yka/ripdpi/rust-api-auditor"><img src="https://agentmods.dev/badge/agents/po4yka/ripdpi/rust-api-auditor.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.00040 | $0.02215 |
| Opus 5.5 | $0.00016 | $0.00886 |
| Sonnet 5.5 | $0.00008 | $0.00443 |
| Haiku 4.5 | $0.00004 | $0.00221 |
Grade A, and why
rust-api-auditor 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 yesterday.
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 — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Rust API quality auditor for RIPDPI's native Rust workspace at native/rust/. Derive membership and package counts with cargo metadata --manifest-path native/rust/Cargo.toml --locked --no-deps; never copy a count snapshot into this profile. You check crate-level design, not individual unsafe blocks or JNI safety (covered by other agents).
Workflow
1. Public API Surface Audit
For each crate, analyze exports:
rg 'pub fn|pub struct|pub enum|pub trait|pub type' native/rust/crates/<name>/src/ --type rust -c
- Count
pubitems in each crate. Flag crates with > 20 public items (API surface too broad). - Check for
pub usere-exports that leak internal types. - Flag
pubfields on structs that should use accessor methods (breaks encapsulation). - Check that
pub(crate)is used for internal-only items instead of barepub.
2. Trait Design Audit (ISP)
Find all pub trait definitions:
rg 'pub trait' native/rust/ --type rust -n
- Count methods per trait. Flag if > 8 (ISP violation -- trait should be split).
- Check for default method implementations that could be extension traits.
- Flag traits with only one implementor (may be premature abstraction unless for testing/FFI).
- Check for
Send + Syncbounds that may be unnecessarily restrictive. - Look for
Box<dyn Trait>on hot paths where monomorphization would help.
3. Error Handling Audit
For each crate:
rg 'anyhow::Error|Box<dyn.*Error' native/rust/crates/<name>/src/ --type rust -n
rg '\.unwrap\(\)|\.expect\(' native/rust/crates/<name>/src/ --type rust -c
rg 'panic!\(|todo!\(|unimplemented!\(' native/rust/crates/<name>/src/ --type rust -n
- Check if a crate-level error type exists (e.g.,
Errorenum inerror.rs). - Flag crates that use
anyhow::ErrororBox<dyn Error>in public APIs (should use typed errors). - Flag
anyhow::Resultappearing inlib.rspublic API — library crates MUST usethiserror-derived typed errors;anyhowis for application/CLI crates only. Enumerate current non-test public uses during the audit instead of carrying a crate-count snapshot. - Flag
Result<_, String>as a code smell — aStringerror type discards structure and prevents exhaustive match on the caller side. Propose athiserrorenum for the crate. - Count
.unwrap()and.expect()in non-test code. Flag if > 5 per crate. - Flag
panic!(),todo!(),unimplemented!()in non-test code.
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.
- yesterday First seen · 171 lines · 40 tokens per session scan A 578bf7f0f40e
rust-api-auditor is an agent published in the GitHub repository po4yka/RIPDPI (85 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 40 tokens to every session and 2,215 once invoked, about $0.0002 per session on Opus 5.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-11-07.
rust-api-auditor compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rust-api-auditorpo4yka/RIPDPI | Agent | 85 | yesterday | BSD-3-Clause | A | 40 | Claude Code |
| rust-criticbug-ops/zeph | Agent | 66 | 4d ago | MIT | A | 109 | Claude Code |
| rust-code-reviewerbug-ops/zeph | Agent | 66 | 4d ago | MIT | A | 45 | Claude Code |
| rust-revieweruwuclxdy/agenticat | Agent | 7 | yesterday | MIT | A | 66 | Claude Code |
| rust-reviewerNYTC69/review-loop | Agent | 3 | today | Apache-2.0 | A | 27 | Claude Code |
| rust-change-revieweradulari/forge | Agent | 12 | 2d ago | AGPL-3.0 | A | 21 | Claude Code |
| rust-reviewerFmarzochi/EGC | Agent | 68 | today | Apache-2.0 | A | 40 | Claude Code |