Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Rtk Optimization

CSecurity

RTK (Rust Token Killer) reduces LLM token consumption by 60-90% by filtering and compressing command outputs. Use when user asks about token savings, token optimization, RTK usage, `rtk gain`, `rtk discover`, or `rtk proxy`. Triggers on mentions of token reduction, RTK commands, or checking command cost.

16 stars
0 votes
0 copies
3 views
Added 9/5/2026
toolsrustgobashdockerdebugginggitperformance

Works with

claude codecli

Security Analysis

C63/100
criticalPipes output to a shell interpreter
mediumUses curl or wget to download content
criticalDownloads and executes remote scripts — classic supply chain attack
mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned 9/5/2026

$npx -y skills add pleaseai/claude-code-plugins --skill rtk-optimization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rtk Optimization?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Rtk Optimization
[![Security: C — Skills Directory](https://www.skillsdirectory.com/api/skills/pleaseai-rtk-optimization/badge)](https://www.skillsdirectory.com/skills/pleaseai-rtk-optimization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: RTK Token Optimization
description: RTK (Rust Token Killer) reduces LLM token consumption by 60-90% by filtering and compressing command outputs. Use when user asks about token savings, token optimization, RTK usage, `rtk gain`, `rtk discover`, or `rtk proxy`. Triggers on mentions of token reduction, RTK commands, or checking command cost.
---

# RTK Token Optimization

RTK is a high-performance CLI proxy written in Rust. It intercepts commands like `git status`, `npm install`, etc., and rewrites their output to be dramatically more token-efficient.

## Meta Commands (always use rtk directly)

```bash
rtk gain              # Show token savings analytics
rtk gain --history    # Show command usage history with savings
rtk discover          # Analyze Claude Code history for missed opportunities
rtk proxy <cmd>       # Execute raw command without filtering (for debugging)
```

### Run a specific command with RTK rewriting
```bash
rtk <command> [args...]
# Example: rtk git status
# Example: rtk npm test
```

## Installation

```bash
# Quick install (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/master/install.sh | sh

# macOS/Linux via Homebrew
brew install rtk-ai/tap/rtk

# Or via cargo (use the explicit Git URL — plain `cargo install rtk`
# may install the wrong package due to a name collision)
cargo install --git https://github.com/rtk-ai/rtk rtk
```

## Installation Verification

```bash
rtk --version         # Should show: rtk X.Y.Z
rtk gain              # Should work (not "command not found")
which rtk             # Verify correct binary
```

⚠️ **Name collision**: If `rtk gain` fails, you may have reachingforthejack/rtk (Rust Type Kit) installed instead.

## Initialization

This plugin already installs the Claude Code hook — no `rtk init` needed.

- `rtk init --global` patches `~/.claude/settings.json` with a `rtk hook claude` PreToolUse entry — the non-plugin alternative to this plugin. Don't combine them: the hook would fire twice (redundant, not harmful).
- `rtk init` (per-project) installs no hook — it only injects RTK instructions into the project `CLAUDE.md` and creates a `.rtk/filters.toml` filter template.

## How the Plugin Works

When installed as a Claude Code plugin, RTK's `PreToolUse` hook intercepts every `Bash` tool call and rewrites commands through `rtk rewrite` before execution. This is transparent to Claude — commands run normally but produce compressed, token-efficient output. All rewrite and permission logic lives in the `rtk rewrite` binary (deny rules pass through to Claude Code's native handling; ask rules rewrite but still prompt the user).

## Configuration

Config file: `~/.config/rtk/config.toml` (Linux) or `~/Library/Application Support/rtk/config.toml` (macOS). View with `rtk config`, create with `rtk config --create`.

```toml
# Exclude commands from auto-rewriting (prefix, subcommand, or ^regex)
[hooks]
exclude_commands = ["git rebase", "docker exec"]
```

- `RTK_DISABLED=1 <command>` — disable RTK for a single invocation
- `RTK_HOOK_AUDIT=1` — enable hook audit logging
- Per-project overrides: `.rtk/filters.toml` in the project root

## Requirements

- RTK >= 0.23.0
- `jq` (for JSON parsing in the hook script)
- If either is missing, the hook warns once on stderr and passes through — safe to install without RTK

## Token Savings Examples

| Command | Raw tokens | RTK tokens | Savings |
|---------|-----------|------------|---------|
| `git status` | ~800 | ~50 | 94% |
| `npm install` | ~2000 | ~200 | 90% |
| `ls -la` | ~400 | ~80 | 80% |

Attribution

pleaseaipleaseai
View sourceSee grades on GitHubMore from pleaseai →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

ucoz-landing-skill

Create and edit uCoz homepage landing pages via MCP: custom templates, hero sections, lead forms, navigation menus, SEO, and responsive layout. Includes a visual design system (style selection, layout/grid, section recipes, typography/spacing, color tokens, component states, icons, modern CSS/JS, motion, imagery, social proof, copy/voice, accessibility). Uses ucoz-mcp tools for templates, site file uploads, and site modules.

107 votes

Paperclip

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

953191 votes

Pptx

Presentation toolkit (.pptx). Create/edit slides, layouts, content, speaker notes, comments, for programmatic presentation creation and modification.

471861 votes

Daw Music

Digital Audio Workstation usage, music composition, interactive music systems, and game audio implementation for immersive soundscapes.

761 votes

Instantly Rdsthomas Mission Control

Instantly.ai cold email outreach API - manage campaigns, leads, accounts, and analytics. Use for cold email automation, lead management, campaign creation/monitoring, and email account warmup.

761 votes
View all in tools →