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 skills add bahayonghang/my-ai-cli-toolkit --skill rust-build-optimizationgit clone --depth 1 https://github.com/bahayonghang/my-ai-cli-toolkitWrote 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.
[](https://agentmods.dev/skills/bahayonghang/my-ai-cli-toolkit/rust-build-optimization)<a href="https://agentmods.dev/skills/bahayonghang/my-ai-cli-toolkit/rust-build-optimization"><img src="https://agentmods.dev/badge/skills/bahayonghang/my-ai-cli-toolkit/rust-build-optimization/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.
<a href="https://agentmods.dev/skills/bahayonghang/my-ai-cli-toolkit/rust-build-optimization"><img src="https://agentmods.dev/badge/skills/bahayonghang/my-ai-cli-toolkit/rust-build-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00147 | $0.01425 |
| Opus 5.5 | $0.00059 | $0.00570 |
| Sonnet 5.5 | $0.00029 | $0.00285 |
| Haiku 4.5 | $0.00015 | $0.00143 |
Grade A, and why
rust-build-optimization 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.
How it starts
The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Build Analysis and Optimization
Diagnose slow Rust builds by measuring first, then apply the smallest fix that targets the actual bottleneck. The useful outcome is: a baseline number, a named bottleneck backed by profiler output, applied configuration changes, and a re-measured result — not a pile of speculative config.
Path note:
<skill-dir>below means this skill's own directory. Substitute the literal path announced when the skill loads; do not use$SKILL_DIR.
Hard Rules
- Never recommend a fix before at least one measurement supports it.
- Label every nightly-only or platform-specific option as such.
- Do not silently change settings that affect release runtime performance
(
codegen-units,lto,opt-levelin[profile.release]); state the tradeoff and get agreement. - Re-measure after applying changes and report before/after numbers.
Step 1 — Frame the Complaint
Establish three facts before touching anything:
- Cold or warm? Full build after
cargo clean/ dependency bump, or an incremental rebuild after a one-line change? They have different bottlenecks and different fixes. - Which profile?
dev,release, or CI. Ask, or read the command the user actually runs. - Baseline. Time the exact complained-about scenario once, e.g.
cargo build --releaseaftertouch-ing a source file for warm builds.
Also check the trivial win first: if the user's inner loop is "edit → build →
read errors", cargo check (or bacon / cargo watch -x check) skips
codegen entirely and is often the single biggest quality-of-life fix.
Step 2 — Measure
Start with the built-in profiler:
cargo build --timings # writes target/cargo-timings/cargo-timing.html
Read it for: slowest units, the concurrency graph (long single-threaded tails
mean a serialization problem), and whether the final bin crate dominates.
Known blind spot: for the warm rebuild of a bin crate, --timings shows one
opaque block — codegen and link time are not broken out. When that block is
the mystery, go deeper with -Zself-profile and measureme
(summarize / flamegraph / crox), cargo-llvm-lines, or linker timing.
Full tool guide: <skill-dir>/references/diagnostics.md.
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago First seen · 126 lines · 147 tokens per session scan A 70d5bbe48f49
rust-build-optimization is a skill published in the GitHub repository bahayonghang/my-ai-cli-toolkit (17 stars, last pushed 6d ago), licensed MIT. It adds 147 tokens to every session and 1,425 once invoked, about $0.0006 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-30.
Other skills, from other repositories
rust-doctor
Use when Rust code just changed and must not regress, when the user asks to scan, audit or health-check a Cargo workspace, says "rust-doctor", or wants one of its findings explained, tuned or switched off.
rust-check
Run cargo check on the current Rust project to find compile errors.
stack-trace-rust-probe
Internal helper for meta-stack-trace-investigator. Use when a Rust panic or backtrace needs Rust-specific Result/Option checks, cargo test guidance, and patch targets.
hotpath_init
Configure hotpath profiling in a Rust project. Adds the hotpath dependency with feature-gated setup, instruments main with hotpath::main, functions with measure/measureall, and wraps channels, mutexes, rwlocks, streams, futures, reqwest clients, axum routers and byte-level I/O with hotpath macros. Use when the user…
ast-grep
Use for ast-grep project setup, rule authoring, rule debugging, and structural search workflows.
memory-safety-patterns
Implement memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code, managing resources, or preventing memory bugs.