Agent skill · software engineering · zed-industries
gpui-test
Use when writing, debugging, or reproducing GPUI tests in Zed, including gpui::test arguments, TestAppContext parameters, scheduler seeds, ITERATIONS/SEED reproduction, parking failures, and pending task traces.
Why this skill is useful
Provides specific commands and environment variable configurations for debugging GPUI tests that the AI wouldn't reliably generate on its own.
What it needs
About 4k tokens when loaded. Last updated 2026-08-07. 88,167 stars on the source repository.
What this skill does
GPUI Test Debugging Use this skill when the user asks about #[gpui::test], GPUI test seeds or iterations, deterministic scheduler failures, parking/pending task failures, or how to reproduce a flaky GPUI test. What #[gpui::test] does #[gpui::test] expands to a normal Rust #[test], so it runs under standard Rust test runners such as cargo test and cargo nextest. It wraps the body in GPUI's deterministic test dispatcher/scheduler and can run the same test multiple times with different seeds. The seed controls scheduler task interleavings and any StdRng argument injected into the test. The macro supports both synchronous and asynchronous tests. Supported function arguments The macro recognizes arguments by type name: Test kind Supported arguments --- --- Sync and async &TestAppContext, &mut TestAppContext, StdRng Async only BackgroundExecutor Sync only &App, &mut App StdRng is seeded from the current GPUI test seed, and BackgroundExecutor is backed by the same deterministic test dispatcher. Attribute arguments Use these forms on #[gpui::test(arguments)]: No arguments: runs once with seed 0, unless SEED is set. seed = N: adds a single explicit seed. seeds(...): adds multiple explicit seeds. iterations = N: runs sequential seeds starting at 0 by default. retries = N: retries a failing run up to N times before surfacing the failure. onfailure = "path::to::function": calls the function after final failure, before resuming the panic. iterations can be combined with explicit seed / seeds; explicit seeds are appended to the 0..iterations range. If the SEED environment variable is set, it takes precedence over explicit seeds. With SEED=N and ITERATIONS=M or iterations = M, the harness runs seeds N..N+M. Environment variables GPUI test macro / scheduler execution SEED=<u64> — chooses the scheduler seed. Use this to reproduce a failure printed as failing seed: N. It also seeds injected StdRng arguments. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills zed-industries/gpui-test