rust-constructor-consolidator

rust-constructor-consolidator is an agent for coding agents from rescrv/claude-phd. It costs 0 tokens per session (921 once invoked), scanned A, original, no licence file.

A Rust refactoring agent for consolidating overlapping constructors. Rust is a programming language, and constructors are functions used to create values of a type.

In plain words
What is it for?
Use it to review structs with overlapping new, from, or with methods and establish a clearer construction pattern.
Why use it?
It helps remove multiple ways of creating the same value when those ways duplicate functionality or make the code harder to understand.

Agent

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/rescrv/claude-phd/rust-constructor-consolidator
Clone the repo
git clone --depth 1 https://github.com/rescrv/claude-phd

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-constructor-consolidator

README.md
[![agentmods](https://agentmods.dev/badge/agents/rescrv/claude-phd/rust-constructor-consolidator.svg)](https://agentmods.dev/agents/rescrv/claude-phd/rust-constructor-consolidator)
Your own site
<a href="https://agentmods.dev/agents/rescrv/claude-phd/rust-constructor-consolidator"><img src="https://agentmods.dev/badge/agents/rescrv/claude-phd/rust-constructor-consolidator.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 921 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00000 $0.00921
Opus 5 $0.00000 $0.00461
Sonnet 5 $0.00000 $0.00184
Haiku 4.5 $0.00000 $0.00092

Measured 4d ago against content hash c6c1e9a733ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rust-constructor-consolidator 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 4d 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.

agents/rust-constructor-consolidator.md · 62 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

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. 4d ago First seen · 62 lines · 0 tokens per session scan A c6c1e9a733ab

Subscribe to this mod's changes

rust-constructor-consolidator is an agent published in the GitHub repository rescrv/claude-phd (2 stars, last pushed 11mo ago), with no licence file. It costs nothing until one of its globs matches a file; then it loads 921 tokens. 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.

Related

Other agents, from other repositories

js-error-handler-auditor

Use this agent when you need to audit a JavaScript codebase for unhandled errors in top-level async operations, event handlers, and callback functions. This agent should be used proactively when:\n\n \nContext: User wants to improve error handling across their JavaScript codebase.\nuser: "Can you check if we're…

rivet-dev/actors · 0 tokens

research

Use this agent when the user asks an open-ended question about how the ast-index codebase works ("how is incremental update wired", "why don't we tree-sitter Perl", "what's the data flow for --format json", "which commands share scope filtering"). The agent reads the code, traces connections, and returns a structured…

defendend/Claude-ast-index-search · 103 tokens

refactor-architect

Proposes (and when authorized, executes) refactoring of Rust files that have grown too large. Use proactively when the file-size-guard.sh hook fires, or when the user asks for an architecture review. Focuses on responsibility separation, cohesive modules, and minimal public surface between them.

outlmd/outl · 63 tokens

tadpole-backend-specialist

Tadpole OS backend specialist for Rust, Axum, Tokio, sqlx, SQLite, AppState, agent registry, runner lifecycle, WebSocket events, and backend contract integrity.

DDS-Solutions/AI-TadPole-OS · 45 tokens

D2-checklist

Meerkat - A modular, high-performance agent harness built in Rust.

lukacf/meerkat · 0 tokens

backend-author

Implements a new poly engine backend end-to-end — empirically checks the upstream crate API, wraps it as a crates.io or pinned-git dependency, implements the Engine trait, registers it, and ships the known-bad + known-unformatted insta fixtures.

Goldziher/poly · 55 tokens