/odin-native:rust-async-internalsfrom ODIN Native
Explains Rust's async/await model including Future poll, Pin/Unpin, tokio scheduling, and debugging with tokio-console. Helps diagnose blocking calls, waker leaks, and select!/join! pitfalls.
Ships in ODIN Native. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Field | Bound contract |
|---|---|
| Trigger | The user asks how Rust async/await works, implements a Future, diagnoses a slow or stuck async task, uses tokio-console, or fixes a blocking call or select!/join! pitfall. |
| Authority | Reversible local: writes only local Rust source, Cargo.toml instrumentation, and diagnostic reports; rollback is git checkout -- or rm for new files. No remote mutation. |
| Side effect | Local source or Cargo.toml may gain temporary tracing; chat emits guidance and diagnostic findings. |
| Done | The async behavior is explained, the task is instrumented and verified, or the pitfall is named with a concrete fix. |
Future, diagnose Pin/Unpin, debug with tokio-console, or fix blocking/select!/join! issues.tokio on Rust 1.98.1.rustc --version and cargo tree -i tokio. Confirm the project uses tokio or another executor. Done when: the runtime and version are known.Future poll model. Describe the Future trait, Poll::Ready and Poll::Pending, the Context waker, and the executor loop. Done when: the user can trace how .await maps to poll() calls and wakeups.Future if asked. Write a type that stores state and returns Poll::Pending until an event, then clones and wakes the waker. Done when: the custom Future compiles and runs under cargo test or the example binary.Pin and Unpin. State that Pin<P> prevents moving the value behind P, that async state machines are self-referential, and that Box::pin or std::pin::pin! creates a pinned reference. Done when: the user can pick the correct pinning method for a stack, heap, or trait object future.tokio::spawn, tokio::task::spawn_blocking, tokio::task::yield_now, and tokio::task::LocalSet for !Send futures. Done when: the user can choose the right spawn method for CPU, blocking I/O, or local futures.tokio-console if asked. Add console-subscriber to Cargo.toml, initialize it before the runtime, build with RUSTFLAGS="--cfg tokio_unstable" cargo run, and run tokio-console in another terminal. Done when: tokio-console shows tasks and poll times.std::thread::sleep with tokio::time::sleep(...).await, std::fs reads with tokio::fs, and heavy CPU calls with tokio::task::spawn_blocking. Done when: the async task no longer blocks a runtime thread.select! and join! pitfalls. Explain that select! completes when the first branch wins and drops the others, join! waits for all, biased; changes polling order, and Fuse is needed for polling a future repeatedly. Done when: the user can rewrite the branch or loop safely.| Failure class | Behavior |
|---|---|
| Async code blocks the runtime | Move blocking calls to tokio::task::spawn_blocking or replace them with async equivalents. |
| Future cannot be polled after completion | Use Fuse or re-create the future inside the loop. |
Pin error at an await point | Check for self-referential borrows; pin the future with Box::pin or pin! before awaiting. |
tokio-console shows no tasks | Confirm console-subscriber is initialized before the runtime and tokio_unstable is set. |
select! drops an in-progress branch | Accept the cancellation semantics or guard cleanup with tokio::select! and a drop guard. |
Pin, or tokio task model as requested.Cargo.toml with console-subscriber when diagnostics are needed.select!/join! fix.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
138 skills in this plugin
/abi-and-calling-conventionsUse when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi./adc-dac-baremetalUse when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal./af-xdpUse when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk./apple-siliconUse when tuning or profiling native code on Apple M-series Macs: unified memory, 16 KiB pages, Accelerate and Metal for matrix work, xctrace and leaks, Rosetta 2, or sysctl hardware queries./arm-sveUse when writing or porting AArch64 SIMD to SVE or SVE2: arm_sve.h intrinsics, predicates, vector-length-agnostic loops, auto-vectorization, or SVE registers in GDB. Not for NEON: use simd-intrinsics./assembly-armUse when reading or writing AArch64 or AArch32 Thumb assembly, inline asm in C, AAPCS64 register roles, or NEON and SVE vector code. Not for ABI detail across ISAs: use abi-and-calling-conventions.npx claudepluginhub outlinedriven/odin-claude-plugin --plugin odin-nativeOther plugins' skills for the same job