RIPDPI: Agent for Claude Code

.claude/agents/rust-api-auditor.md

rust-api-auditor is an agent for Claude Code from po4yka/RIPDPI. It costs 40 tokens per session (2,215 once invoked), scanned A, original, BSD-3-Clause.

A review agent for the public design of Rust crates in a native workspace. It examines exported types and functions, traits, error handling, and contention on frequently used code paths.

In plain words
What is it for?
Use it for periodic Rust crate design checks across public exports, trait definitions, error handling, and hot paths.
Why use it?
It helps find APIs that expose too much internal detail, traits that are too broad, and designs that may make crates harder to maintain or use safely.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is po4yka/RIPDPI's own configuration. It tells Claude Code how to work on RIPDPI itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything RIPDPI configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/po4yka/RIPDPI/main/.claude/agents/rust-api-auditor.md
Clone the repo
git clone --depth 1 https://github.com/po4yka/RIPDPI

Made for: Claude Code.

Wrote 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.

agentmods badge for rust-api-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/po4yka/ripdpi/rust-api-auditor/github.svg)](https://agentmods.dev/agents/po4yka/ripdpi/rust-api-auditor)
Your own site
<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.

agentmods 80×15 button for rust-api-auditor

Your own site · 80×15
<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>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,215 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured yesterday against content hash 578bf7f0f40e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.claude/agents/rust-api-auditor.md · 171 lines

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 pub items in each crate. Flag crates with > 20 public items (API surface too broad).
  • Check for pub use re-exports that leak internal types.
  • Flag pub fields on structs that should use accessor methods (breaks encapsulation).
  • Check that pub(crate) is used for internal-only items instead of bare pub.

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 + Sync bounds 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., Error enum in error.rs).
  • Flag crates that use anyhow::Error or Box<dyn Error> in public APIs (should use typed errors).
  • Flag anyhow::Result appearing in lib.rs public API — library crates MUST use thiserror-derived typed errors; anyhow is 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 — a String error type discards structure and prevents exhaustive match on the caller side. Propose a thiserror enum for the crate.
  • Count .unwrap() and .expect() in non-test code. Flag if > 5 per crate.
  • Flag panic!(), todo!(), unimplemented!() in non-test code.

Read the full file on GitHub · 171 lines

Changes

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.

  1. yesterday First seen · 171 lines · 40 tokens per session scan A 578bf7f0f40e

Subscribe to this mod's changes

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.

Related

rust-api-auditor compared with agents from other repositories

rust-api-auditor next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rust-api-auditorpo4yka/RIPDPIAgent85yesterdayBSD-3-ClauseA40Claude Code
rust-criticbug-ops/zephAgent664d agoMITA109Claude Code
rust-code-reviewerbug-ops/zephAgent664d agoMITA45Claude Code
rust-revieweruwuclxdy/agenticatAgent7yesterdayMITA66Claude Code
rust-reviewerNYTC69/review-loopAgent3todayApache-2.0A27Claude Code
rust-change-revieweradulari/forgeAgent122d agoAGPL-3.0A21Claude Code
rust-reviewerFmarzochi/EGCAgent68todayApache-2.0A40Claude Code