skills/zmx/SKILL.md
Use when starting dev servers, watchers, tilt, or any process expected to outlive the conversation. Provides zmx session management patterns for long-lived processes.
npx skillsauth add awfixers-stuff/opencode-config zmxInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
zmx list --short before creating sessions — duplicates cause port conflicts and confusing outputgit rev-parse --show-toplevel — hardcoded names collide when multiple agent instances run concurrentlyzmx run to send commands without attaching — zmx attach blocks the agent's shell and makes it unresponsiveOne project = one session prefix. Multiple processes = multiple sessions sharing the prefix.
PROJECT=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" || basename "$PWD")
All subsequent examples assume PROJECT is set. Session names follow ${PROJECT}-<role>:
myapp-server, myapp-tests, myapp-tiltSESSION="${PROJECT}-server"
# Idempotent: skip if already running
if ! zmx list --short 2>/dev/null | grep -q "^${SESSION}$"; then
zmx run "$SESSION" 'npm run dev'
fi
For multiple processes, loop over name:command pairs:
for name_cmd in "server:npm run dev" "tests:npm run test:watch"; do
name="${name_cmd%%:*}"
cmd="${name_cmd#*:}"
SESSION="${PROJECT}-${name}"
if ! zmx list --short 2>/dev/null | grep -q "^${SESSION}$"; then
zmx run "$SESSION" "$cmd"
fi
done
# Run a command in a session (creates session if needed)
zmx run "${PROJECT}-main" 'cat README.md'
# Pipe via stdin
echo "ls -lah" | zmx r "${PROJECT}-main"
zmx history "${PROJECT}-server" # full scrollback
zmx history "${PROJECT}-server" | tail -50 # last 50 lines
zmx history "${PROJECT}-server" | rg -i "error|fail" # check for errors
zmx history "${PROJECT}-server" | rg -i "listening|ready" # check for ready
zmx wait "${PROJECT}-tests" # block until done
zmx wait "${PROJECT}-build" "${PROJECT}-lint" # wait for multiple
zmx list # all sessions
zmx list --short # names only
zmx kill "${PROJECT}-server" # kill one session
# Kill all project sessions
zmx list --short 2>/dev/null | grep "^${PROJECT}-" | while read -r s; do
zmx kill "$s"
done
| Scenario | Use zmx? |
|----------|----------|
| tilt up | Yes, always |
| Dev server (npm run dev, rails s) | Yes |
| File watcher (npm run watch) | Yes |
| Test watcher (npm run test:watch) | Yes |
| Database server | Yes |
| One-shot build (npm run build) | No |
| Quick command (<10s) | No |
| Need stdout directly in conversation | No |
for i in {1..30}; do
if zmx history "${PROJECT}-server" 2>/dev/null | tail -20 | rg -q "listening|ready"; then
echo "Server ready"
break
fi
sleep 1
done
development
Zig testing skill for writing and running tests. Use when using zig build test, writing comptime tests, using test filters, working with test allocators to detect leaks, or using Zig's built-in fuzz testing (0.14+). Activates on queries about Zig tests, zig test, zig build test, comptime testing, test allocators, Zig fuzz testing, or detecting memory leaks in Zig tests.
development
Zig debugging skill. Use when debugging Zig programs with GDB or LLDB, interpreting Zig runtime panics, using std.debug.print for tracing, configuring debug builds, or debugging Zig programs in VS Code. Activates on queries about debugging Zig, Zig panics, zig gdb, zig lldb, std.debug.print, Zig stack traces, or Zig error return traces.
tools
Zig cross-compilation skill. Use when cross-compiling Zig programs to different targets, using Zig's built-in cross-compilation for embedded, WASM, Windows, ARM, or using zig cc to cross-compile C code without a system cross-toolchain. Activates on queries about Zig cross-compilation, zig target triples, zig cc cross-compile, Zig embedded targets, or Zig WASM.
development
Zig comptime skill for compile-time evaluation and metaprogramming. Use when using comptime parameters, comptime types, generics via anytype, comptime reflection with @typeInfo, or metaprogramming patterns that replace C++ templates. Activates on queries about Zig comptime, compile-time evaluation, Zig generics, anytype, @typeInfo, comptime types, or Zig metaprogramming.