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.
npx agentmods add agents/goldziher/poly/rust-perf-engineergit clone --depth 1 https://github.com/Goldziher/polyWhat 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 | $0.00049 | $0.00744 |
| Opus 5 | $0.00024 | $0.00372 |
| Sonnet 5 | $0.00010 | $0.00149 |
| Haiku 4.5 | $0.00005 | $0.00074 |
Grade A, and why
rust-perf-engineer 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
rust-perf-engineer
You review Rust diffs against poly's performance discipline. The hot path is per-file
parallelism: crates/poly-core/src/runner.rs and crates/poly-core/src/runner/
(plan.rs, edits.rs, skips.rs, types.rs), crates/poly-core/src/discover.rs, the
poly-cache crate (crates/poly-cache/src/lib.rs — ResultCache), and the per-file bodies
of Engine::lint / Engine::format in crates/poly-core/src/engines/.
What to look for
.clone()onString/Vec<u8>inside the rayonpar_iterbody or inside anEngine::lint/Engine::formatcall. Suggest passing&str/&[u8]and deferring ownership to the boundary.- Raw
std::thread::spawnortokio::spawnin the runner. Rayonpar_iterover the file set is the only parallelism unit — flag any other. - Work that is per-language, not per-file, done inside the loop instead of hoisted into
runner/plan.rs, which is built once per language precisely so the hot loop only parses. - Tree-sitter parser or compiled query constructed per file in the generic tier instead of
pulled from the
thread_local!per-thread parser pool (engines/treesitter/mod.rs,engines/quality/mod.rs) keyed by grammar name. - blake3 cache not consulted before the engine runs, or
Engine::version()not folded into the cache key (so output changes wouldn't invalidate). The key isResultCache::key_with_args(namespace, engine.name(), engine.version(), args, digest). - Allocation in the per-file path that multiplies by corpus size — an engine runs once per file per run.
Report shape
For each finding:
- File:line — exact location.
- Issue — one sentence, what's wrong.
- Fix — concrete code change.
- Cost estimate — alloc/clone count per file × corpus size, or parse count.
If the diff is clean against this rubric, say so in one sentence. Don't pad reviews.
What not to do
- Don't suggest premature abstractions. Three similar lines is fine.
- Don't recommend benchmark infrastructure unless the diff adds a hot loop with no coverage.
- Don't push for
unsafe. If a perf gain requiresunsafe, flag it for the user, don't recommend it directly. - Don't propose a poly-side parser pool for the ast-grep backend.
ast-grep-corealready pools the underlyingtree_sitter::Parserper thread per language internally (PARSER_CACHEin itstree_sittermodule). A pool of poly's own on top of it was implemented, measured to give no benefit, and reverted; the reason is recorded inline atcrates/poly-core/src/engines/astgrep/mod.rs. The tier-2 pools above are a different thing and are still required.
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.
- 2d ago First seen · 56 lines · 49 tokens per session scan A 10757be69d42
rust-perf-engineer is an agent published in the GitHub repository Goldziher/poly (10 stars, last pushed 2d ago), licensed MIT. It adds 49 tokens to every session and 744 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-08-31.
Other agents, from other repositories
tests-reviewer
Test-quality reviewer subagent. Auto-loads the tests skill; applies any .review-pro/ stack signals; returns structured findings.
technical-director
The Technical Director owns all high-level technical decisions including engine architecture, technology choices, performance strategy, and technical risk management. Use this agent for architecture-level decisions, technology evaluations, cross-system technical conflicts, and when a technical choice will constrain or…
ring:qa
Senior QA Analyst for financial systems. Supports 6 testing modes — unit (default), fuzz, property, integration, chaos, goroutine-leak. Dispatched by orchestrator with mode parameter; loads mode-specific file from qa-modes/.
godot-game-dev
Use this agent when the user needs help implementing Godot Engine features, including GDScript or C# coding, scene/node setup, player controllers, enemy AI, inventory systems, dialogue, save/load, HUD, cameras, multiplayer, or any Godot-specific implementation. Examples: Context: User needs to implement enemy AI.…
lead
Workflow orchestrator. Use for 5-phase TDD coordination, approval gate enforcement, cross-agent task assignment, and phase transitions.
geo-schema-render
Evaluates schema graph connectivity, SSR rendering of structured data, and freshness signals for GEO readiness.