$npx -y skills add BANANASJIM/rdc-cli --skill _skillsUse this skill when working with RenderDoc capture files (.rdc), analyzing GPU frames, tracing shaders, inspecting draw calls, or running CI assertions against GPU captures. Trigger phrases: "open capture", "rdc file", ".rdc", "renderdoc", "shader debug", "pixel trace", "draw cal
| 1 | # rdc-cli Skill |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | rdc-cli is a Unix-friendly command-line interface for RenderDoc GPU captures. It provides a daemon-backed architecture using JSON-RPC over TCP, a virtual filesystem (VFS) path namespace for navigating capture internals, and composable commands designed for shell pipelines, scripting, and CI assertions. |
| 6 | |
| 7 | Install: `pip install rdc-cli` (requires a local RenderDoc build with Python bindings). |
| 8 | Check setup: `rdc doctor`. |
| 9 | |
| 10 | ## Core Workflow |
| 11 | |
| 12 | Follow this session lifecycle for any capture analysis task: |
| 13 | |
| 14 | 1. **Open** a capture: |
| 15 | - Local: `rdc open path/to/capture.rdc` |
| 16 | - Remote replay (Proxy): `rdc open capture.rdc --proxy host:port` |
| 17 | - Split thin-client: `rdc open --connect host:port --token TOKEN` |
| 18 | - Android device: `rdc open capture.rdc --android [--serial SERIAL]` |
| 19 | 2. **Inspect** metadata: `rdc info`, `rdc stats`, `rdc events` |
| 20 | 3. **Navigate** the VFS: `rdc ls /`, `rdc ls /textures`, `rdc cat /draws/0/pipeline/summary` |
| 21 | 4. **Analyze** specifics: `rdc shaders`, `rdc pipeline`, `rdc resources`, `rdc bindings` |
| 22 | 5. **Debug** shaders: `rdc debug pixel EID X Y`, `rdc debug vertex EID VTXID`, `rdc debug thread EID GX GY GZ` |
| 23 | 6. **Export** data: `rdc texture ID -o out.png`, `rdc rt EID`, `rdc buffer ID -o buf.bin`, `rdc cbuffer EID --stage ps --binding 0`, `rdc log` |
| 24 | 7. **Close** the session: `rdc close` |
| 25 | |
| 26 | ### Session Management |
| 27 | |
| 28 | - Default session name: `default` (or value of `$RDC_SESSION`). |
| 29 | - Override per-command: `rdc --session myname open capture.rdc`. |
| 30 | - Check active session: `rdc status`. |
| 31 | - Navigate to a specific event: `rdc goto EID`. |
| 32 | |
| 33 | ## Output Formats |
| 34 | |
| 35 | All list/table commands default to TSV (tab-separated values) with a header row, suitable for `cut`, `awk`, and `sort`. |
| 36 | |
| 37 | | Flag | Format | Use Case | |
| 38 | |------|--------|----------| |
| 39 | | *(default)* | TSV with header | Human reading, shell pipelines | |
| 40 | | `--no-header` | TSV without header | Piping to `awk`/`cut` without stripping | |
| 41 | | `--json` | JSON array | Structured processing with `jq` | |
| 42 | | `--jsonl` | Newline-delimited JSON | Streaming processing, large datasets | |
| 43 | | `-q` / `--quiet` | Minimal (single column) | Extracting IDs for loops | |
| 44 | |
| 45 | Example -- get all draw call EIDs as a plain list: |
| 46 | |
| 47 | ```bash |
| 48 | rdc draws -q |
| 49 | ``` |
| 50 | |
| 51 | Example -- JSON pipeline with jq: |
| 52 | |
| 53 | ```bash |
| 54 | rdc events --json | jq '.[] | select(.type == "DrawIndexed")' |
| 55 | ``` |
| 56 | |
| 57 | ## Render Pass Analysis |
| 58 | |
| 59 | ### List passes (Phase 8 columns) |
| 60 | |
| 61 | `rdc passes` outputs 6 columns: NAME, DRAWS, DISPATCHES, TRIANGLES, BEGIN_EID, END_EID. |
| 62 | |
| 63 | ```bash |
| 64 | rdc passes # TSV table |
| 65 | rdc passes --json # includes load_ops/store_ops per pass |
| 66 | rdc passes --deps --table # per-pass READS/WRITES/LOAD/STORE |
| 67 | ``` |
| 68 | |
| 69 | ### Inspect a single pass |
| 70 | |
| 71 | `rdc pass <name>` shows enriched attachments: resource name, format, dimensions, and load/store ops. |
| 72 | |
| 73 | ```bash |
| 74 | rdc pass GBuffer |
| 75 | rdc pass GBuffer --json |
| 76 | rdc pass 0 # by 0-based index |
| 77 | ``` |
| 78 | |
| 79 | ### Detect dead render targets |
| 80 | |
| 81 | `rdc unused-targets` finds render targets written but never consumed by visible output. Columns: ID, NAME, WRITTEN_BY, WAVE. |
| 82 | |
| 83 | ```bash |
| 84 | rdc unused-targets # TSV |
| 85 | rdc unused-targets --json # structured |
| 86 | rdc unused-targets -q # one resource ID per line (for scripting) |
| 87 | ``` |
| 88 | |
| 89 | ### Frame statistics |
| 90 | |
| 91 | `rdc stats` outputs three sections: Per-Pass Breakdown, Top Draws by Triangle Count, and Largest Resources. |
| 92 | |
| 93 | ```bash |
| 94 | rdc stats # all three sections |
| 95 | rdc stats --json # includes largest_resources array |
| 96 | ``` |
| 97 | |
| 98 | GL/GLES/D3D11 captures without native BeginPass/EndPass markers get synthetic pass inference automatically — no extra flags needed. |
| 99 | |
| 100 | ## Common Tasks |
| 101 | |
| 102 | ### Find all draw calls |
| 103 | |
| 104 | ```bash |
| 105 | rdc draws |
| 106 | rdc draws --pass "GBuffer" --json |
| 107 | ``` |
| 108 | |
| 109 | ### Trace a pixel |
| 110 | |
| 111 | ```bash |
| 112 | rdc debug pixel 1024 512 384 # EID first, then X Y |
| 113 | rdc debug pixel 1024 512 384 --json # structured output |
| 114 | rdc debug pixel 1024 512 384 --trace # full step-by-step trace |
| 115 | ``` |
| 116 | |
| 117 | ### Search shaders by name or source |
| 118 | |
| 119 | ```bash |
| 120 | rdc search "main" # regex search over shader disassembly |
| 121 | rdc search "Sample" --stage ps -C 2 |
| 122 | rdc shaders --name "GBuffer*" |
| 123 | ``` |
| 124 | |
| 125 | ### Export render targets |
| 126 | |
| 127 | ```bash |
| 128 | rdc rt EID -o output.png |
| 129 | rdc rt EID --depth -o depth.png # export the raw depth attachment |
| 130 | rdc texture ID -o tex.png # export a texture by resource ID (PNG) |
| 131 | ``` |
| 132 | |
| 133 | ### Decode a constant buffer |
| 134 | |
| 135 | ```bash |
| 136 | rdc cbuffer EID --stage ps --binding 0 # decode to JSON |
| 137 | rdc cbuffer EID --stage vs --binding 0 --raw -o cbuffer.bin |
| 138 | ``` |
| 139 | |
| 140 | ### Browse VFS paths |
| 141 | |
| 142 | ```bash |
| 143 | rdc ls / |
| 144 | rdc ls /textu |