원클릭으로
rtk-recover
Use when an RTK command fails, returns a tee log path, hides needed detail, or the user asks to inspect raw command output
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when an RTK command fails, returns a tee log path, hides needed detail, or the user asks to inspect raw command output
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use BEFORE running any shell command to decide rtk_run vs native shell. Default to rtk_run for all commands EXCEPT interactive (dev servers, watch mode, REPLs), file mutations (rm/mv/cp/mkdir/chmod/touch), raw JSON/parser output, or commands the user explicitly wants unfiltered.
Use when you need a quick reference for which RTK commands exist, what they do, expected token savings per command, and which flags affect compression behavior
Use when the user asks about RTK token savings, efficiency reports, missed command opportunities, or wants to optimize their command-output workflow
Use when the user asks what RTK tools are available, how desktop RTK MCP works, which RTK skill applies to their situation, or wants an overview of RTK capabilities
Use when running non-interactive shell commands that may produce long output - tests, builds, lint, typecheck, git, search, read, package, infra, or network commands
Use when installing, verifying, or troubleshooting RTK MCP setup — binary availability, MCP config, desktop app configuration, skills, rules, or agent instructions
| name | rtk-recover |
| description | Use when an RTK command fails, returns a tee log path, hides needed detail, or the user asks to inspect raw command output |
When rtk_run fails, RTK may save the full raw output to a tee log under ~/.rtk-mcp/tee. This skill guides you through recovering detail from that log before falling back to a raw native rerun.
Core principle: Always read the tee log before rerunning raw — it usually contains everything you need.
rtk_run returned a failure with teePath in the outputdigraph recover_flow {
"RTK command failed" [shape=box];
"Has teePath?" [shape=diamond];
"Call rtk_read_log" [shape=box];
"Log sufficient?" [shape=diamond];
"Diagnose from log" [shape=doublecircle];
"Rerun raw" [shape=doublecircle];
"Diagnose from compact output" [shape=box];
"Need more detail?" [shape=diamond];
"RTK command failed" -> "Has teePath?";
"Has teePath?" -> "Call rtk_read_log" [label="yes"];
"Has teePath?" -> "Diagnose from compact output" [label="no"];
"Call rtk_read_log" -> "Log sufficient?";
"Log sufficient?" -> "Diagnose from log" [label="yes"];
"Log sufficient?" -> "Rerun raw" [label="no"];
"Diagnose from compact output" -> "Need more detail?";
"Need more detail?" -> "Rerun raw" [label="yes"];
"Need more detail?" -> "Diagnose from log" [label="no"];
}
teePath — if present, call rtk_read_log({path: teePath}).RTK's tee system saves full raw output on command failure for later inspection:
| Setting | Default | Description |
|---|---|---|
tee.enabled | true | Enable/disable tee recovery |
tee.mode | "failures" | "failures" (default), "always", or "never" |
tee.max_files | 20 | Rotation: keep last N files |
| Min size | 500 bytes | Outputs shorter than this are not saved |
| Max file size | 1 MB | Truncated above this |
Override tee directory: Set RTK_TEE_DIR env var.
Tee output format:
FAILED: 2/15 tests
[full output: ~/.local/share/rtk/tee/1707753600_cargo_test.log]
The AI assistant (you) can then call rtk_read_log with the path to get full details without re-executing.
| Situation | Action |
|---|---|
teePath in failure output | rtk_read_log({path: "..."}) |
No teePath, compact output enough | Diagnose directly |
No teePath, need more detail | Rerun with native shell |
| Log exists but is stale | Rerun with native shell |
| Tee disabled in config | Must rerun with native shell |
| Output too short (<500 bytes) | Not saved — diagnose from compact output |
Tee settings in ~/.config/rtk/config.toml:
[tee]
enabled = true
mode = "failures" # "failures", "always", "never"
max_files = 20
# directory = "/custom/tee/path" # optional override
| Mistake | Fix |
|---|---|
| Rerunning raw immediately without checking tee log | Always rtk_read_log first when teePath exists |
| Ignoring compact output and jumping to log | Read compact output first — it may suffice |
Using rtk_read_log for arbitrary file reads | This tool ONLY reads files under ~/.rtk-mcp/tee |
| Not checking if tee is enabled | If tee.mode = "never", logs won't exist |
| Rerunning repeatedly without reading logs | Each rerun wastes tokens — read the log once instead |