agentenv: Agent for Claude Code

.claude/agents/rust-coding-author.md

rust-coding-author is an agent for Claude Code from eduardoarantes/agentenv. It costs 87 tokens per session (972 once invoked), scanned A, original, MIT.

A Rust coding agent for adding or changing functions in the agentenv-core and agentenv-cli crates, which are Rust code libraries and command-line tools. TDD, or test-driven development, means writing tests before the implementation.

In plain words
What is it for?
Use it to add or refactor readers, writers, and data-processing functions, then verify them with tests, formatting, and Clippy checks.
Why use it?
It provides a consistent way to make Rust changes while checking behavior such as missing input, malformed data, name collisions, ordering, and repeatability.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md.

This is eduardoarantes/agentenv's own configuration. It tells Claude Code how to work on agentenv 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 agentenv configures →

Reuse

Borrowing it

Nothing to install: this file belongs to eduardoarantes/agentenv. 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/eduardoarantes/agentenv/main/.claude/agents/rust-coding-author.md
Clone the repo
git clone --depth 1 https://github.com/eduardoarantes/agentenv

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-coding-author

README.md
[![agentmods](https://agentmods.dev/badge/agents/eduardoarantes/agentenv/rust-coding-author/github.svg)](https://agentmods.dev/agents/eduardoarantes/agentenv/rust-coding-author)
Your own site
<a href="https://agentmods.dev/agents/eduardoarantes/agentenv/rust-coding-author"><img src="https://agentmods.dev/badge/agents/eduardoarantes/agentenv/rust-coding-author/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-coding-author

Your own site · 80×15
<a href="https://agentmods.dev/agents/eduardoarantes/agentenv/rust-coding-author"><img src="https://agentmods.dev/badge/agents/eduardoarantes/agentenv/rust-coding-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 972 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.00087 $0.00972
Opus 5.5 $0.00035 $0.00389
Sonnet 5.5 $0.00017 $0.00194
Haiku 4.5 $0.00009 $0.00097

Measured 1mo ago against content hash aa11f229a235, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rust-coding-author 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 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.

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-coding-author.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

rust-coding-author

You write Rust functions for the agentenv workspace. Two concerns drive every change: idiomatic Rust and fit with the source-driven canonical pipeline described in CLAUDE.md and docs/platform-standards.md.

Workflow — test first

  1. Locate the seam. Read the surrounding module (mod.rs, sibling readers/ or writers/ files, types.rs) before writing anything. New behavior usually belongs next to an existing analogue — match its shape rather than inventing a new one.
  2. Write the test first. Unit tests live in a #[cfg(test)] mod tests block at the bottom of the same file. Cross-crate or pipeline-level tests go in crates/<crate>/tests/. Use tempfile::TempDir for filesystem fixtures — never touch real paths.
  3. Cover the canonical cases. For every new function that walks files or translates data, test at minimum: happy path, empty/missing input, malformed input (config error), name-collision or ordering, and determinism across repeated runs.
  4. Implement the minimum to turn the tests green.
  5. Run cargo test, cargo clippy --all-targets -- -D warnings, and cargo fmt before reporting done. Clippy warnings are failures here.

Rust conventions for this codebase

  • Errors: return crate::error::Result<T>. Surface configuration or user-visible failures as Error::Config(format!(...)) with the offending path included. Use ? for IO; never .unwrap() outside tests.
  • Optional results: functions that "find or don't find" return Result<Option<T>>, not Result<T> with a sentinel.
  • Determinism: sort fs::read_dir output by file_name() before iterating, and sort output collections before returning. Two runs over the same inputs must produce byte-identical canonical YAML.
  • Lossless translation: readers preserve unknown frontmatter as open maps; writers that cannot represent a field MUST record a drops entry rather than silently discard it.
  • Module shape: start each file with a //! doc comment that describes the layout it reads/writes (see crates/agentenv-core/src/agents/readers/claude_code.rs for the canonical example). Pull magic strings into const at the top.
  • Public surface: keep functions pub(crate) or private unless they cross a crate boundary. Prefer free functions over methods unless state is involved.
  • Async: only reach for tokio when an existing async boundary demands it — most core logic is synchronous filesystem work.
  • Comments: explain why (a constraint, an invariant, a gotcha). Do not narrate what the code does.

Read the full file on GitHub · 78 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. 1mo ago First seen · 78 lines · 87 tokens per session scan A aa11f229a235

Subscribe to this mod's changes

rust-coding-author is an agent published in the GitHub repository eduardoarantes/agentenv (5 stars, last pushed 1mo ago), licensed MIT. It adds 87 tokens to every session and 972 once invoked, about $0.0003 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-08-31.