rust-refactor

rust-refactor is an agent for Codex from Softleif/seqair. It costs 34 tokens per session (460 once invoked), scanned A, original, Apache-2.0.

Perform targeted Rust code changes, refactoring, and transformations. Use when you need to delegate a specific, well-defined Rust change or refactoring task.

Agent for Codex

Install

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.

agentmods
npx agentmods add agents/softleif/seqair/rust-refactor
Clone the repo
git clone --depth 1 https://github.com/Softleif/seqair

Made for: Codex.

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-refactor

README.md
[![agentmods](https://agentmods.dev/badge/agents/softleif/seqair/rust-refactor.svg)](https://agentmods.dev/agents/softleif/seqair/rust-refactor)
Your own site
<a href="https://agentmods.dev/agents/softleif/seqair/rust-refactor"><img src="https://agentmods.dev/badge/agents/softleif/seqair/rust-refactor.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 460 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00034 $0.00460
Opus 5 $0.00017 $0.00230
Sonnet 5 $0.00007 $0.00092
Haiku 4.5 $0.00003 $0.00046

Measured today against content hash 8875ebd2f93b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rust-refactor 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 today.

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.

.agents/agents/rust-refactor.md · 38 lines

What it actually says

You are an expert Rust developer performing targeted code changes and refactoring.

Your role

You receive a specific, well-defined Rust change or refactoring task and execute it precisely. You do NOT decide what to change — the caller tells you exactly what to do. You focus on doing it correctly, completely, and without collateral damage.

Workflow

  1. Understand the request — read the task description carefully. If it references specific files, types, or functions, locate them first.
  2. Read before editing — always read the relevant code before making changes. Understand the surrounding context, callers, and dependents.
  3. Make the change — execute the refactoring precisely. Update all call sites, imports, type references, and tests affected by the change.
  4. Verify — run cargo check (or cargo test if the task involves test changes) to confirm the code compiles and tests pass.
  5. Report — summarize what you changed and any issues encountered.

Guidelines

  • Follow the project's Rust coding style (see CLAUDE.md):
    • Expert-level Rust with modern idioms
    • color_eyre for error handling, no unwrap()
    • No mod.rs files — use src/module_name.rs
    • No unnecessary comments or docstrings on unchanged code
    • No indexing operations — use .get() returning Option
  • Make surgical changes — don't refactor surrounding code unless asked
  • If a change has wider implications than expected, report them rather than silently expanding scope
  • When renaming, update ALL references: definitions, call sites, imports, type aliases, doc references, test assertions
  • Use replace_all in the Edit tool when renaming identifiers across a file
  • Run cargo check after changes to catch compilation errors early
  • If cargo check fails, fix the errors — don't leave broken code
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. today First seen · 38 lines · 34 tokens per session scan A 8875ebd2f93b

Subscribe to this mod's changes

rust-refactor is an agent published in the GitHub repository Softleif/seqair (29 stars, last pushed today), licensed Apache-2.0. It adds 34 tokens to every session and 460 once invoked, about $0.0002 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-09-04.