본문으로 건너뛰기
cccskills
무료GitHub에 공개

rtk-exec

Execute CLI commands through RTK proxy for token-optimized output

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Kubernetes
설치 방법 보기

포함된 파일(2)

  • SKILL.md5.8 KB
  • scripts/rtk-wrapper.cjs9.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

RTK Exec Skill

Execute CLI commands through the RTK (Rust Token Killer) proxy to reduce LLM token consumption by 60-90%. RTK is a CLI command proxy — it wraps existing shell commands and compresses their output using smart filtering, grouping, truncation, and deduplication.

Important: RTK is NOT an AI prompt tool. It is a CLI output compressor. You pass it a regular shell command and it returns compressed output.

Options

<command> [args...]   Required. CLI command to proxy through RTK (e.g., "ls .", "git status", "cargo test")
--gain               Show token savings statistics (rtk gain)
--version            Show RTK version (rtk --version)
--init               Initialize RTK for current project (rtk init -g)
--timeout <ms>       Execution timeout (default: 120000, max: 600000)
--working-dir <dir>  Working directory for command execution

Workflow

1. Pre-checks
   - Verify `rtk` binary is installed (which rtk)
   - No authentication required
2. Build command
   - Special: rtk gain | rtk --version | rtk init -g
   - Proxy: rtk <command> [args...]
3. Execute
   - Run via Bash tool with timeout (default 2min, max 10min)
   - Or use helper script: node .claude/skills/rtk-exec/scripts/rtk-wrapper.cjs
4. Parse output
   - RTK always returns plain text compressed output (no JSON modes)
   - Capture stdout and stderr
5. Report results
   - Format output with execution metadata and token savings info

Supported Commands

RTK supports 100+ CLI commands across categories:

CategoryCommands
File opsls, find, grep, cat, tree, du, diff
Gitgit status, git log, git diff, git push, git pull, git branch
Test runnerscargo test, pytest, vitest, jest, go test, bun test
Linterseslint, tsc, ruff, clippy, golangci-lint, rubocop
Package managerspnpm install, pip install, cargo build, npm install
Containersdocker build, docker ps, kubectl get, kubectl logs
Build toolsmake, cmake, gradle, mvn
Systemps, top, df, netstat, env

Output Format

Success

[RTK Exec] Completed

Command: rtk git status
Duration: 0.3s
Working Dir: /path/to/project

--- Output ---
{rtk compressed output}

Success (--gain)

[RTK Exec] Token Savings

--- Gain Report ---
{rtk gain statistics showing tokens saved per command}

Failure

[RTK Exec] Failed

Command: rtk cargo test
Error: {error_message}
Exit Code: {code}
Stderr: {stderr}
Suggested Fix: {suggestion}

Helper Script

For complex executions or programmatic use:

node .claude/skills/rtk-exec/scripts/rtk-wrapper.cjs --command "cargo test" [options]

The wrapper provides:

  • Binary availability check
  • Safe command construction
  • Timeout handling with graceful SIGTERM → SIGKILL escalation
  • Structured JSON output for programmatic consumption

Examples

# List files with compression
/rtk-exec "ls -la src/"

# Git status (often 70%+ token reduction)
/rtk-exec "git status"

# Run Rust tests
/rtk-exec "cargo test"

# Run Python tests
/rtk-exec "pytest tests/ -v"

# TypeScript type check
/rtk-exec "tsc --noEmit"

# Show token savings stats
/rtk-exec --gain

# Initialize RTK for project
/rtk-exec --init

# With timeout override
/rtk-exec "cargo build --release" --timeout 300000

# Specify working directory
/rtk-exec "git log --oneline -20" --working-dir /path/to/repo

Integration

Works with the orchestrator pattern:

  • Main conversation delegates CLI execution via this skill
  • Results are returned to the main conversation for further processing
  • Particularly effective for test runs, lint checks, and git operations where output is verbose
  • Can be chained: rtk-exec for output collection → Claude expert for analysis

Availability Check

rtk-exec requires the RTK binary to be installed. The skill is only usable when:

  1. rtk binary is found in PATH (which rtk succeeds)
  2. No authentication or API keys required

If the binary check fails, this skill cannot be used. Fall back to direct Bash tool execution.

Note: This skill is invoked via /rtk-exec command or delegated by the orchestrator. It is most useful for any task that produces verbose CLI output that would otherwise consume large amounts of context tokens.

Agent Teams Integration

When used within Agent Teams:

  1. As delegated task: orchestrator explicitly delegates CLI execution for token-efficient output
  2. Hybrid workflow: Claude team member plans → rtk-exec runs commands → Claude analyzes compressed output
  3. Batch execution: Multiple rtk-exec invocations in parallel for different commands
Orchestrator delegates CLI task
  → /rtk-exec invoked with command
  → Compressed output returned to orchestrator
  → Analyst processes compressed result
  → Iterate if needed

Token Savings

RTK uses four compression strategies:

StrategyDescriptionTypical Savings
Smart FilteringRemoves redundant/noise lines based on command type30-50%
GroupingCollapses repeated patterns into summary counts20-40%
TruncationClips excessively long lines with ellipsis10-20%
DeduplicationRemoves identical repeated output blocks15-30%

Combined effect: 60-90% token reduction on typical CLI output (git log, test results, lint reports).

Installation

# macOS via Homebrew
brew install rtk

# Universal install script
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh

# From source via Cargo
cargo install --git https://github.com/rtk-ai/rtk

# Verify installation
rtk --version

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Adversarial code review using attacker mindset — trust boundary, attack surface, business logic, and defense evaluation

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Apache Airflow best practices for DAG authoring, testing, and production deployment

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Alembic migration patterns for naming conventions, safety checks, expand-contract, env.py configuration, and CI integration

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Pre-routing ambiguity analysis — scores request clarity and asks clarifying questions when needed (inspired by ouroboros)

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

baekenough의 스킬 모두 보기

이 스킬의 문제 신고