tokio-troubleshooting

tokio-troubleshooting is a skill for Claude Code from geoffjay/claude-plugins. It costs 35 tokens per session (2,818 once invoked), scanned A, original, MIT.

A troubleshooting guide for Tokio applications, including runtime inspection with tokio-console. It explains how to investigate deadlocks, memory leaks, task leaks, and slow or inefficient asynchronous work.

In plain words
What is it for?
Use it to inspect task activity, find blocking or CPU-heavy work, investigate lock deadlocks, and diagnose runtime performance problems.
Why use it?
Asynchronous programs can hang or behave slowly in ways that are difficult to see from ordinary logs.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rust-tokio-expert plugin — 4 skills shipped together

Good fit Use it to inspect task activity, find blocking or CPU-heavy work, investigate lock deadlocks, and diagnose runtime performance problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/geoffjay/claude-plugins/tokio-troubleshooting
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.

Any agent
npx skills add geoffjay/claude-plugins --skill tokio-troubleshooting
Clone the repo
git clone --depth 1 https://github.com/geoffjay/claude-plugins

Made for: Claude Code.

Or install rust-tokio-expert, the plugin that ships this one along with the rest of its 4 skills.

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 tokio-troubleshooting

README.md
[![agentmods](https://agentmods.dev/badge/skills/geoffjay/claude-plugins/tokio-troubleshooting/github.svg)](https://agentmods.dev/skills/geoffjay/claude-plugins/tokio-troubleshooting)
Your own site
<a href="https://agentmods.dev/skills/geoffjay/claude-plugins/tokio-troubleshooting"><img src="https://agentmods.dev/badge/skills/geoffjay/claude-plugins/tokio-troubleshooting/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.

agentmods 80×15 button for tokio-troubleshooting

Your own site · 80×15
<a href="https://agentmods.dev/skills/geoffjay/claude-plugins/tokio-troubleshooting"><img src="https://agentmods.dev/badge/skills/geoffjay/claude-plugins/tokio-troubleshooting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,818 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original 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.1 $0.00035 $0.02818
Opus 5 $0.00017 $0.01409
Sonnet 5 $0.00007 $0.00564
Haiku 4.5 $0.00003 $0.00282

Measured 6d ago against content hash a242b04e2b62, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

tokio-troubleshooting 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 6d 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.

plugins/rust-tokio-expert/skills/tokio-troubleshooting/SKILL.md · 489 lines

How it starts

The opening of the file, as written. The whole thing — 489 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tokio Troubleshooting

This skill provides techniques for debugging and troubleshooting async applications built with Tokio.

Using tokio-console for Runtime Inspection

Monitor async runtime in real-time:

// In Cargo.toml
[dependencies]
console-subscriber = "0.2"

// In main.rs
fn main() {
    console_subscriber::init();

    tokio::runtime::Builder::new_multi_thread()
        .enable_all()
        .build()
        .unwrap()
        .block_on(async {
            run_application().await
        });
}

Run console in separate terminal:

tokio-console

Key metrics to monitor:

  • Task spawn rate and total tasks
  • Poll duration per task
  • Idle vs. busy time
  • Waker operations
  • Resource utilization

Identifying issues:

  • Long poll durations: CPU-intensive work in async context
  • Many wakers: Potential contention or inefficient polling
  • Growing task count: Task leak or unbounded spawning
  • High idle time: Not enough work or blocking operations

Debugging Deadlocks and Hangs

Detect and resolve deadlock situations:

Common Deadlock Pattern

// BAD: Potential deadlock
async fn deadlock_example() {
    let mutex1 = Arc::new(Mutex::new(()));
    let mutex2 = Arc::new(Mutex::new(()));

    let m1 = mutex1.clone();
    let m2 = mutex2.clone();
    tokio::spawn(async move {
        let _g1 = m1.lock().await;
        tokio::time::sleep(Duration::from_millis(10)).await;
        let _g2 = m2.lock().await; // May deadlock
    });

    let _g2 = mutex2.lock().await;
    tokio::time::sleep(Duration::from_millis(10)).await;
    let _g1 = mutex1.lock().await; // May deadlock
}

// GOOD: Consistent lock ordering
async fn no_deadlock_example() {
    let mutex1 = Arc::new(Mutex::new(()));
    let mutex2 = Arc::new(Mutex::new(()));

    // Always acquire locks in same order
    let _g1 = mutex1.lock().await;
    let _g2 = mutex2.lock().await;
}

// BETTER: Avoid nested locks
async fn best_example() {
    // Use message passing instead
    let (tx, mut rx) = mpsc::channel(10);

    tokio::spawn(async move {
        while let Some(msg) = rx.recv().await {
            process_message(msg).await;
        }
    });

    tx.send(message).await.unwrap();
}

Read the full file on GitHub · 489 lines

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. 6d ago First seen · 489 lines · 35 tokens per session scan A a242b04e2b62

Subscribe to this mod's changes

tokio-troubleshooting is a skill published in the GitHub repository geoffjay/claude-plugins (8 stars, last pushed 10mo ago), licensed MIT. It adds 35 tokens to every session and 2,818 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.

Related

Other skills, from other repositories

rust-check

Run cargo check on the current Rust project to find compile errors.

Hmbown/CodeWhale · 15 tokens

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.

opensquilla/opensquilla · 42 tokens

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…

pawurb/hotpath-rs · 88 tokens

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.

rmyndharis/antigravity-skills · 45 tokens

windows-compat

Audit and harden this Rust repo (code-graph-mcp) for Windows correctness: path-spelling drift between producers, the 32,767-char command-line cap, index-key mismatches, and path predicates that assume one ecosystem's layout. Use whenever touching code that builds, compares, prints, or stores a filesystem path; that…

sdsrss/code-graph-mcp · 165 tokens

re-zig

A guide to examining compiled Zig programs, including how Zig-specific error handling, panics, compile-time code, and C interfaces appear in machine code. Reverse engineering means studying a compiled program to understand its behaviour.

dslsdzc/rev-skills · 57 tokens