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 heyAyushh/stacc --skill concurrencygit clone --depth 1 https://github.com/heyAyushh/staccWrote 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/heyayushh/stacc/concurrency)<a href="https://agentmods.dev/skills/heyayushh/stacc/concurrency"><img src="https://agentmods.dev/badge/skills/heyayushh/stacc/concurrency/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/heyayushh/stacc/concurrency"><img src="https://agentmods.dev/badge/skills/heyayushh/stacc/concurrency.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00040 | $0.00987 |
| Opus 5 | $0.00020 | $0.00494 |
| Sonnet 5 | $0.00008 | $0.00197 |
| Haiku 4.5 | $0.00004 | $0.00099 |
Grade A, and why
rust-concurrency 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 9d 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 — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Concurrency
Layer 1: Language Mechanics
Core Question
Is this CPU-bound or I/O-bound, and what's the sharing model?
Before choosing concurrency primitives:
- What's the workload type?
- What data needs to be shared?
- What's the thread safety requirement?
Thinking Prompt
Before adding concurrency:
-
What's the workload?
- CPU-bound → threads (
std::thread, rayon) - I/O-bound → async (tokio, async-std)
- Mixed → hybrid approach
- CPU-bound → threads (
-
What's the sharing model?
- No sharing → message passing (channels)
- Immutable sharing →
Arc<T> - Mutable sharing →
Arc<Mutex<T>>orArc<RwLock<T>>
-
What are the Send/Sync requirements?
- Cross-thread ownership →
Send - Cross-thread references →
Sync - Single-thread async →
spawn_local
- Cross-thread ownership →
Decision Flowchart
What type of work?
├─ CPU-bound → std::thread or rayon
├─ I/O-bound → async/await
└─ Mixed → hybrid (spawn_blocking)
Need to share data?
├─ No → message passing (channels)
├─ Immutable → Arc<T>
└─ Mutable →
├─ Read-heavy → Arc<RwLock<T>>
└─ Write-heavy → Arc<Mutex<T>>
└─ Simple counter → AtomicUsize
Async context?
├─ Type is Send → tokio::spawn
├─ Type is !Send → spawn_local
└─ Blocking code → spawn_blocking
Send/Sync Markers
| Marker | Meaning | Example |
|---|---|---|
Send |
Can transfer ownership between threads | Most types |
Sync |
Can share references between threads | Arc<T> |
!Send |
Must stay on one thread | Rc<T> |
!Sync |
No shared refs across threads | RefCell<T> |
Quick Reference
| Pattern | Thread-Safe | Blocking | Use When |
|---|---|---|---|
std::thread |
Yes | Yes | CPU-bound parallelism |
async/await |
Yes | No | I/O-bound concurrency |
Mutex<T> |
Yes | Yes | Shared mutable state |
RwLock<T> |
Yes | Yes | Read-heavy shared state |
mpsc::channel |
Yes | Optional | Message passing |
Arc<Mutex<T>> |
Yes | Yes | Shared mutable across threads |
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.
- 9d ago First seen · 145 lines · 40 tokens per session scan A ec615ca8787c
rust-concurrency is a skill published in the GitHub repository heyAyushh/stacc (3 stars, last pushed 2mo ago), licensed MIT. It adds 40 tokens to every session and 987 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-03.
Other skills, from other repositories
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…
clickhouse-rust-type-mismatches
Fix ClickHouse query errors in Rust when using clickhouse-rs crate. Use when: (1) "string is not valid utf8" errors - typically FixedString columns need CAST to String, (2) "tag for enum is not valid" errors - typically Option fields receiving non-NULL values, (3) Sum/count aggregations returning Float64 but Rust…
fastly-compute-rust-edition2024-fix
Fix Fastly Compute Rust build failures caused by edition2024 dependencies. Use when: (1) cargo build fails with "feature edition2024 is required", (2) wit-bindgen or wasip2 crates fail to download/parse, (3) Fastly SDK pulls in incompatible transitive dependencies, (4) Build worked before but fails after dependency…
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.