hotpath-rs is a Rust profiler that measures where programs spend time, use CPU and memory, wait on I/O, and perform database, HTTP, or asynchronous operations. Rust developers use it to locate performance bottlenecks and inspect timing, allocation, and async-flow data.
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 skills/pawurb/hotpath-rs/hotpath_initnpx skills add pawurb/hotpath-rs --skill hotpath_initgit clone --depth 1 https://github.com/pawurb/hotpath-rsWrote 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/pawurb/hotpath-rs/hotpath_init)<a href="https://agentmods.dev/skills/pawurb/hotpath-rs/hotpath_init"><img src="https://agentmods.dev/badge/skills/pawurb/hotpath-rs/hotpath_init.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00088 | $0.03569 |
| Opus 5 | $0.00044 | $0.01784 |
| Sonnet 5 | $0.00018 | $0.00714 |
| Haiku 4.5 | $0.00009 | $0.00357 |
Grade A, and why
hotpath_init 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.
How it starts
The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Initialize hotpath Profiling
Set up hotpath profiling in the current Rust project. The setup is fully feature-gated: zero compile-time and runtime overhead unless the hotpath feature is explicitly enabled. All macros are noops when the feature is off, so no cfg_attr wrapping is needed.
Steps
1. Inspect the project
- Find the binary crate(s) and the
mainfunction. If there is nomainyou control (e.g. a library or a test harness), use theHotpathGuardBuilderAPI instead of#[hotpath::main](see step 3). - Detect the async runtime (
tokio,smol, none) and which instrumentable primitives the code uses: channels (tokio::sync::mpsc/oneshot,std::sync::mpsc,crossbeam_channel,flume,async-channel,futures_channel),MutexandRwLock(std/parking_lot/tokio/async-lock), futures streams, sqlx, diesel, reqwest clients (async only; note which reqwest major - 0.12 or 0.13), axum 0.8 routers (find where theRouteris finished and passed toaxum::serve), byte-level I/O values implementingstd::io::Read/Writeortokio::io::AsyncRead/AsyncWrite(files, sockets, compression codecs).
2. Add the dependency and feature passthrough
In the target crate's Cargo.toml:
[dependencies]
hotpath = "0.25"
[features]
hotpath = ["hotpath/hotpath"]
hotpath-alloc = ["hotpath/hotpath-alloc"]
hotpath-prometheus = ["hotpath/hotpath-prometheus"]
Enable extra hotpath cargo features on the dependency based on what the project uses:
tokio- fortokio::syncchannel instrumentation, asyncio!traits (AsyncRead/AsyncWrite), andhotpath::tokio_runtime!()metrics:hotpath = { version = "0.25", features = ["tokio"] }crossbeam- forcrossbeam_channelinstrumentationfutures- forfutures_channelinstrumentationflume- forflumechannel instrumentationasync-channel- forasync-channelinstrumentationparking_lot- forparking_lotRwLock/Mutexinstrumentationasync-lock- forasync-lockRwLock/Mutexinstrumentationsqlx- for SQL query profiling viahotpath::sqlx_tracing_layer()diesel- for SQL query profiling viahotpath::instrument_diesel_sql()reqwest-0-12/reqwest-0-13- for HTTP request profiling viahotpath::http!(client); pick the feature matching the project's reqwest major versionaxum-0-8- for server-side response time profiling per axum 0.8 route viahotpath::axum!(router)
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.
- today Changed · +1 lines 4d9e2d42a182
- 5d ago First seen · 166 lines · 88 tokens per session scan A a3b5e92d8c57
hotpath_init is a skill published in the GitHub repository pawurb/hotpath-rs (1,709 stars, last pushed today), licensed MIT. It adds 88 tokens to every session and 3,569 once invoked, about $0.0004 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-30.
Other skills, from other repositories
rust-systems-programming
Complete guide for Rust systems programming including ownership, borrowing, concurrency, async programming, unsafe code, and performance optimization.
Rust Expert
Rust Expert delivers production-grade technical work with clear architecture, tests, maintainability, and operational awareness.
lint-js
Lint JS/TS code only. Use before opening a PR when only JavaScript or TypeScript files were changed (no Rust).
rust-patterns
Idiomatic Rust patterns, ownership, error handling, traits, concurrency, and best practices for building safe, performant applications.
rust-code-quality
Run a focused Rust quality review when the user requests one, when reviewing a Rust PR/commit, or when another selected review workflow delegates Rust-specific checks. Do not auto-load for every implementation edit.
switchyard-rust-review
Review Switchyard Rust changes for correctness and maintainability. Use for pull requests or diffs touching crates, PyO3 bindings, async runtime behavior, streaming, protocol types, translation, algorithms, or LLM clients.