Skip to content

feat(skills): add RTK_DISABLED=1 opt-out skill and install via rtk init#1848

Open
bb1 wants to merge 2 commits into
rtk-ai:developfrom
bb1:feat/rtk-disabled-skill
Open

feat(skills): add RTK_DISABLED=1 opt-out skill and install via rtk init#1848
bb1 wants to merge 2 commits into
rtk-ai:developfrom
bb1:feat/rtk-disabled-skill

Conversation

@bb1
Copy link
Copy Markdown

@bb1 bb1 commented May 12, 2026

Summary

  • 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 (JSON/XML/CSV for data analysis)
  • Install the skill to ~/.agents/skills/ during rtk init --opencode (and combined Claude+OpenCode modes)
  • Show skill path in rtk status output; remove on uninstall

Motivation

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=1 env 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

Changes

File Change
skills/raw-command-output/SKILL.md New: agent-agnostic skill file
src/hooks/constants.rs Add AGENTS_DIR, SKILLS_SUBDIR, RTK_SKILL_DIR, RTK_SKILL_FILE constants
src/hooks/init.rs Add rtk_skill_path(), ensure_rtk_skill_installed(), update install/remove/status flows

Testing

  • cargo check passes (verified via Docker rust:latest)
  • Skill installs to ~/.agents/skills/raw-command-output/SKILL.md
  • Existing tests unaffected (skill install is home-relative, orthogonal to tempdir-based plugin tests)

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 12, 2026

CLA assistant check
All committers have signed the CLA.

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.
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.
@bb1
Copy link
Copy Markdown
Author

bb1 commented May 12, 2026

@pszymkowiak — would appreciate your review on this when you get a chance.

Quick context: this adds an agent-agnostic SKILL.md that teaches agents to use RTK_DISABLED=1 when they need raw command output (e.g. after retries or when parsing JSON/XML). rtk init installs it to ~/.agents/skills/ (OpenCode) and ~/.claude/skills/ (Claude Code).

One design question: currently only OpenCode and Claude Code support the skills/<name>/SKILL.md format for global skill discovery. Other agents use different conventions (Cursor .cursor/rules/*.mdc, Cline .clinerules/, Windsurf .windsurfrules, Codex AGENTS.md, etc.). Is it enough to support just Claude Code and OpenCode for now, or should we also convert the skill into agent-specific rule formats for the others?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: per-invocation escape hatch (flag/env var) so an agent can self-disable rtk rewriting when stuck

2 participants