rtk-optimizer

A guide that suggests shorter-output wrappers for verbose shell commands, using RTK to reduce the text returned to the coding agent.

In plain words
What is it for?
Use it with commands such as git log, git diff, tests, package listings, cargo commands, pytest, Go tests, and GitHub CLI queries.
Why use it?
Large command results consume the agent's context, making it harder to focus on the useful information.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/florianbruniaux/claude-code-plugins/rtk-optimizer
Any agent
npx skills add FlorianBruniaux/claude-code-plugins --skill rtk-optimizer
Clone the repo
git clone --depth 1 https://github.com/FlorianBruniaux/claude-code-plugins

Made for: Claude Code, Codex.

Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,205 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.01205
Opus 5 $0.00022 $0.00602
Sonnet 5 $0.00009 $0.00241
Haiku 4.5 $0.00004 $0.00120

Measured 2d ago against content hash 7a821397c656, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rtk-optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ai-methodology/skills/rtk-optimizer/SKILL.md · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RTK Optimizer Skill

Purpose: Automatically suggest RTK wrappers for high-verbosity commands to reduce token consumption.

How It Works

  1. Detect high-verbosity commands in user requests
  2. Suggest RTK wrapper if applicable
  3. Execute with RTK when user confirms
  4. Track savings over session

Supported Commands

Git (>70% reduction)

  • git logrtk git log (92.3% reduction)
  • git statusrtk git status (76.0% reduction)
  • findrtk find (76.3% reduction)

Medium-Value (50-70% reduction)

  • git diffrtk git diff (55.9% reduction)
  • cat <large-file>rtk read <file> (62.5% reduction)

JS/TS Stack (70-90% reduction)

  • pnpm listrtk pnpm list (82% reduction)
  • pnpm test / vitest runrtk vitest run (90% reduction)

Rust Toolchain (80-90% reduction)

  • cargo testrtk cargo test (90% reduction)
  • cargo buildrtk cargo build (80% reduction)
  • cargo clippyrtk cargo clippy (80% reduction)

Python & Go (90% reduction)

  • pytestrtk python pytest (90% reduction)
  • go testrtk go test (90% reduction)

GitHub CLI (79-87% reduction)

  • gh pr viewrtk gh pr view (87% reduction)
  • gh pr checksrtk gh pr checks (79% reduction)

File Operations

  • lsrtk ls (condensed output)
  • greprtk grep (filtered output)

Activation Examples

User: "Show me the git history" Skill: Detects git log → Suggests rtk git log → Explains 92.3% token savings

User: "Find all markdown files" Skill: Detects find → Suggests rtk find "*.md" . → Explains 76.3% savings

Installation Check

Before first use, verify RTK is installed:

rtk --version  # Should output: rtk 0.16.0+

If not installed:

# Homebrew (macOS/Linux)
brew install rtk-ai/tap/rtk

# Cargo (all platforms)
cargo install rtk

Usage Pattern

# When user requests high-verbosity command:

1. Acknowledge request
2. Suggest RTK optimization:
   "I'll use `rtk git log` to reduce token usage by ~92%"
3. Execute RTK command
4. Track savings (optional):
   "Saved ~13K tokens (baseline: 14K, RTK: 1K)"

Read the full file on GitHub · 147 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 147 lines · 44 tokens per session scan A 7a821397c656

Subscribe to this mod's changes

rtk-optimizer is a skill published in the GitHub repository FlorianBruniaux/claude-code-plugins (40 stars, last pushed 3mo ago), licensed MIT. It adds 44 tokens to every session and 1,205 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

setup

创建一个新的 Workframe 项目,或把已有项目接入 Workframe。按用户意图与目标目录状态分流(新建 / 接入),对话采集业务上下文后落骨架、订阅 core 插件、完成落盘验收。仅用于 Workframe 框架的项目初始化,不承担 npm init / create-react-app / git init 等通用脚手架。.

ryanzhao1011/workframe · 88 tokens

material-intake

存量资料的盘点、分流与结构推荐。扫描给定路径产出资料台账(形态 × 数量 × 覆盖率),按资料形态判定每一批的去向(migrate-to-modules / requirement-archiving / code-to-doc / 手动放置),并从资料聚类推荐 basic/sub 模块树。只出计划不做搬运,重型执行交给对应 skill。.

ryanzhao1011/workframe · 99 tokens

code-review

代码审查,从需求符合度/正确性/安全性/可维护性/性能五维度评审代码变更,输出风险分级的 Finding 列表.

ryanzhao1011/workframe · 40 tokens

product-metrics-design

产品度量体系设计,支持 AARRR/HEART/North Star/OKR 四框架,输出三层指标体系与监控方案.

ryanzhao1011/workframe · 37 tokens

requirement-analysis

结构化需求澄清与优先级评估:判断需求形态(Full PRD / One-Pager / Quick Brief)、6 问澄清、RICE + MoSCoW 评估;Full PRD 移交 prd-writer,中小需求输出轻量需求摘要.

ryanzhao1011/workframe · 69 tokens

technical-design

技术方案设计与实施,提供轻量路径(小改动直接落地)和完整路径(架构/数据/API/多文件高风险变更走完整方案+实施+交付)双档分流.

ryanzhao1011/workframe · 50 tokens