Repository navigation
Conversation
Add an agent-agnostic skill (skills/raw-command-output/SKILL.md) that teaches LLM agents to prefix commands with RTK_DISABLED=1 when they need raw, uncompressed output. This leverages the existing Rust binary override (rtk-ai#345) and works across all agent integrations. Install the skill to ~/.agents/skills/ alongside the OpenCode plugin during rtk init --opencode. Also install during combined Claude+OpenCode modes. Show skill path in rtk status output. On uninstall (rtk init --uninstall), remove the skill file alongside the plugin.
0265205 to
e93d10d
Compare
rtk init now writes SKILL.md to both ~/.agents/skills/raw-command-output/ and ~/.claude/skills/raw-command-output/ so Claude Code discovers the RTK_DISABLED opt-out skill natively. Install, uninstall, and status flows updated for both locations.
|
@pszymkowiak — would appreciate your review on this when you get a chance. Quick context: this adds an agent-agnostic One design question: currently only OpenCode and Claude Code support the |
huzvak
left a comment
There was a problem hiding this comment.
Hi @bb1 . Good initiative. I am only wondering: Is this the way to go? What if LLM/OpenCode/Claude decides to always use this prefix instead? Then the whole RTK misses the point.
Maybe my thinking is wrong, and the agents/models are smart enough not to do shortcuts, and simply not add it each time. If so, please elaborate.
|
Any progress on this PR? What's blocking it from being merged? |
|
Thanks for this, and for spelling out the retry-loop failure mode. Teaching agents about the RTK_DISABLED=1 escape hatch now ships through the awareness files added by #3372 (merged 2026-09-07): rtk init writes an awareness block for every agent according to awareness.level, and both the high and the full file document RTK_DISABLED=1 . The env var itself was already implemented in the binary, as your description notes. Two things are still open: the default awareness level does not mention the escape hatch, and rtk installs nothing into the agent skills directories, so an issue or a narrow PR for a skill channel on top of the awareness model would be welcome. Please comment or reopen if I missed a part of this. |
Summary
skills/raw-command-output/SKILL.md) that teaches LLM agents to prefix commands withRTK_DISABLED=1when they need raw, uncompressed output (JSON/XML/CSV for data analysis)~/.agents/skills/duringrtk init --opencode(and combined Claude+OpenCode modes)rtk statusoutput; remove on uninstallMotivation
When rtk compresses command output for token savings, agents sometimes cannot parse the result (e.g., JSON data for analysis). This causes infinite retry loops where the agent keeps re-issuing the same command with slight variations.
The
RTK_DISABLED=1env prefix already exists in the Rust binary (#345) but agents don't know about it. This skill teaches them to use it proactively.Related Issues
rtk git branch --show-currentloop in opencode #732 —rtk git branch --show-currentloop in OpenCodeRTK_DISABLED=1env var to bypass hooks (already implemented in binary; this PR makes agents aware of it)Changes
skills/raw-command-output/SKILL.mdsrc/hooks/constants.rsAGENTS_DIR,SKILLS_SUBDIR,RTK_SKILL_DIR,RTK_SKILL_FILEconstantssrc/hooks/init.rsrtk_skill_path(),ensure_rtk_skill_installed(), update install/remove/status flowsTesting
cargo checkpasses (verified via Dockerrust:latest)~/.agents/skills/raw-command-output/SKILL.md