一键导入
rtk-gain
Use when the user asks about RTK token savings, efficiency reports, missed command opportunities, or wants to optimize their command-output workflow
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when the user asks about RTK token savings, efficiency reports, missed command opportunities, or wants to optimize their command-output workflow
用 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 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 an RTK command fails, returns a tee log path, hides needed detail, or the user asks to inspect raw command output
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-gain |
| description | Use when the user asks about RTK token savings, efficiency reports, missed command opportunities, or wants to optimize their command-output workflow |
RTK tracks how much context window you save by compacting command output. Use this skill to report savings, discover missed opportunities, and recommend workflow improvements.
Core principle: Data-driven optimization — measure before recommending changes.
digraph gain_flow {
"User asks about savings?" [shape=diamond];
"Call rtk_gain" [shape=box];
"Want history?" [shape=diamond];
"Call rtk_gain --history" [shape=box];
"Want missed opportunities?" [shape=diamond];
"Call rtk_discover" [shape=box];
"Review & recommend" [shape=doublecircle];
"User asks about savings?" -> "Call rtk_gain" [label="yes"];
"Call rtk_gain" -> "Want history?";
"Want history?" -> "Call rtk_gain --history" [label="yes"];
"Want history?" -> "Want missed opportunities?" [label="no"];
"Call rtk_gain --history" -> "Want missed opportunities?";
"Want missed opportunities?" -> "Call rtk_discover" [label="yes"];
"Want missed opportunities?" -> "Review & recommend" [label="no"];
"Call rtk_discover" -> "Review & recommend";
}
rtk_gain — shows aggregate token savings.rtk_gain({args:["--history"]}) — shows per-command breakdown.rtk_discover — finds commands that should have used RTK.| Goal | Tool | Example |
|---|---|---|
| Total savings | rtk_gain | rtk_gain() |
| Per-command breakdown | rtk_gain | rtk_gain({args:["--history"]}) |
| Day-by-day breakdown | rtk_gain | rtk_gain({args:["--daily"]}) |
| Weekly aggregation | rtk_gain | rtk_gain({args:["--weekly"]}) |
| ASCII graph (30 days) | rtk_gain | rtk_gain({args:["--graph"]}) |
| JSON export | rtk_gain | rtk_gain({args:["--all", "--format", "json"]}) |
| Missed RTK commands | rtk_discover | rtk_discover() |
| Missed (all projects, 7d) | rtk_discover | rtk_discover({args:["--all", "--since", "7"]}) |
| Session adoption rate | — | Use rtk_run({command:"rtk session"}) |
| Category | Expected Savings | Examples |
|---|---|---|
| Git operations | 70-92% | git status, git push, git log |
| Test runners | 90-99% | cargo test, jest, pytest |
| Build/Lint | 70-87% | cargo build, tsc, eslint |
| File operations | 50-95% | ls, cat → rtk read, grep |
| Package managers | 60-80% | pnpm list, pip list |
| Containers/Cloud | 60-80% | docker ps, aws ec2 |
High savings (>80%): RTK is well-adopted — focus on maintaining.
Low savings (<50%): Check:
rtk_discover.rtk_verify.Zero savings on some commands: rtk proxy <cmd> runs with 0% savings (passthrough + tracking). This is expected.
If you notice:
cat calls on large files → Suggest rtk readgit commands → Suggest routing through RTKrtk test <cmd> wrapper| Mistake | Fix |
|---|---|
| Recommending config changes without data | Always run rtk_discover first |
| Modifying instructions without user approval | Present findings, then ask before changing |
| Only checking savings without discover | Both tools together give the full picture |
Ignoring rtk session for adoption tracking | Session shows per-session adoption rate |
Not mentioning rtk_gain --graph for trends | ASCII graph reveals trends over time |