/tt-review-skills:tt-trace-reviewfrom Tenstorrent Review Skills
Reviews trace capture and replay safety in tt-metal code: host-side operations inside capture, program-cache warmup with exact signatures, allocation after capture, and device-owned autoregressive state.
Ships in Tenstorrent Review Skills. 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.
None: SKILL.md is the whole skill.
Assumes tt-review-core. Trace bugs present as an abort during capture or as a silently wrong steady
state, and both are cheap to catch by reading the capture region.
begin_trace_capture.end_trace_capture.ttnn.execute_trace.Review a capture region against this shape. Most findings are a step performed in the wrong place.
Flag any of these inside the captured region:
ttnn.from_torch(..., device=...), ttnn.as_tensor(..., device=...), ttnn.to_device,
ttnn.copy_host_to_device_tensorttnn.to_torch, .cpu(), get_device_tensors followed by host conversion, full-logits host
compositionttnn.synchronize_device, event waits, explicit readsThe last one is the subtle one: a Python if inside capture does not fail — it bakes one branch
into the trace. The trace then replays that branch forever, including for inputs that should have
taken the other. Where a path needs a host decision, it must be made before capture and bound at
construction.
Trace capture cannot compile. A cache miss inside capture forces a kernel build, which issues a
host-to-device write and aborts with Writes are not supported during trace capture. Every op in
the traced region must already be compiled with the exact signature it will have during capture.
begins / ends /
step passed to ttnn.slice are compile-time constants baked into the program hash — slicing at
a different offset, length, or start-tile alignment is a different program needing its own
warmup. When in doubt, warm with the same argument values, not just the same tensor shapes.
This is the most commonly missed case and worth checking explicitly on any diff that adds a slice.ttnn.plus_one, page and position updates, sampler trace setup,
persistent output buffer allocation. They are easy to forget because they are not "the model", but
they compile programs.begin_trace_capture.Token feedback belongs in the traced device path. Flag a sampled token read back to host and used to reconstruct the next input — that defeats the trace.
The steady-state step should be trace replay plus the minimum caller-visible readback. Rebuilding tokens, positions, RoPE indices, masks, or page tables on the host every token is an incomplete tracing implementation, not merely a slow one. Advance device-owned state inside the captured graph where possible. Host refresh belongs at request boundaries, explicit reset, or genuine scheduler-owned input changes.
Unless already proven trace-safe, the generator should be split: host-side input preparation, an explicit copy to stable device tensors, a device-only forward used for both warm compile and capture, and a traced step that refreshes inputs and executes. A diff that wraps a high-level generator method in capture is a finding even if it happens to work today.
PCC must be checked from replay output, not from the warm compile call. A test that validates the warm call and then traces has verified the thing it is not shipping. This is easy to miss in review because both calls look identical at the call site — check which output the assertion consumes.
Anything that aborts capture is MUST-FIX. A baked-in Python branch or host-side token feedback is
MUST-FIX — silently wrong or silently slow. Host refresh that could move on-device is
SHOULD-FIX.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
trace-capture, replay-safety, program-cache, tt-metal, code-review
npx claudepluginhub tenstorrent/skills --plugin tt-review-skills15 skills in this plugin
/llk-perf-audit-reviewStatic performance review of Tensix compute kernels — wasted cycles, redundant register and memory traffic, loop-invariant work, and cheaper numerically-equivalent instruction sequences. Gated by a provenance lens (sfpi-compiled versus hand-written) and a semantic-equivalence test. Use when reviewing SFPU or Tensix kernel changes under tt_metal/tt-llk./llk-race-audit-reviewReviews tt-llk kernel changes for the nine intra-kernel race hazard classes plus stale hardware config across invocations — cfg-word overlap, dataflow CB sync, instruction latency, mailbox sync, MMIO ordering, NoC sync, reconfig stalls, semaphore handshakes, and srcreg bank sync — plus the cross-class seams between them. Use when reviewing changes under tt_metal/tt-llk./tt-comment-hygiene-reviewOther plugins' skills for the same job