slash-tokens

CLI proxy that reduces LLM token consumption by 60-90%. Prefix any dev command with 'rtk' to get filtered, compact output. Use for all Bash commands to save context window.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "slash-tokens" with this command: npx skills add 2233admin/slash-tokens

Slash Tokens — 你的 AI 编程账单砍九成

故事

有个哥们用 Claude Code 写代码,一个月烧了 $200。他不理解——明明就改了几个文件,钱去哪了?

他翻了翻对话记录,发现了一个惊人的事实:80% 的 token 不是他写的代码,是工具输出。

git log 吐了 200 行,Claude 只需要看最后 5 行。npm install 输出了 800 行进度条,Claude 一行都不需要。docker ps 带了一堆格式化边框,全是废话。

这些垃圾输出塞满了 context window,Claude 被迫"阅读"每一行,然后 Anthropic 按 token 收费。

就好比你请了个律师,按小时收费,然后你让他坐在那儿读你的垃圾邮件。

于是他写了 rtk。

一个 Rust 写的 CLI 代理,4MB,零依赖。在命令前面加个 rtk,输出就被过滤成 AI 真正需要看的部分。

git status 吐 30 行?rtk git status 给你 3 行。 npm test 输出 500 行?rtk test 只给你失败的那 2 个。 kubectl get pods 带一堆表格边框?rtk kubectl get pods 干干净净。

结果:月账单从 $200 掉到 $40。省了 80%。

那个哥们后来把 rtk 开源了。现在支持 61 个命令,覆盖你日常用的所有工具。

Install

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/2233admin/rtk/main/install.sh | bash

# Windows (scoop)
scoop install rtk

# ClawHub (skill only, binary installed separately)
clawhub install slash-tokens

Core Usage

在命令前加 rtk,完事:

rtk git status          # 30 行 → 3 行
rtk git log --oneline   # 去掉装饰符
rtk gh pr list          # token 友好的 PR 列表
rtk npm test            # 只看失败
rtk docker ps           # 紧凑容器列表
rtk pytest              # 只看红的
rtk kubectl get pods    # 去掉表格边框

Key Commands

CommandWhat it does
rtk gitGit with compact output
rtk ghGitHub CLI, token-optimized
rtk test / rtk pytest / rtk vitestTests — only show failures
rtk err <cmd>Run anything, show only errors/warnings
rtk diffUltra-condensed diff (changed lines only)
rtk json <file>Compact JSON, --schema for structure only
rtk findCompact file tree
rtk grepStrips whitespace, truncates, groups by file
rtk curlAuto-JSON detection + schema output
rtk summary <cmd>Run anything, get 2-line heuristic summary
rtk gainShow token savings stats
rtk discoverFind missed savings from past sessions

Supported Tools (61 commands)

git, gh, docker, kubectl, cargo, npm, npx, pnpm, pip, go, pytest, vitest, playwright, ruff, mypy, tsc, next, lint, prettier, prisma, psql, aws, curl, dotnet, rake, rubocop, rspec, golangci-lint, and more.

When to use

Prefix ALL Bash commands with rtk to save 60-90% tokens. If rtk doesn't have a specialized filter for a command, use rtk err (errors only) or rtk summary (2-line summary) as fallbacks.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

airq

Check air quality, AQI, PM2.5, PM10, pollution levels for any city from the terminal using airq CLI. Installs, configures, and runs air quality queries. Use...

Registry SourceRecently Updated
3630Profile unavailable
Coding

AnyoneCLI

CLI identity for humans and AI agents. Register a terminal-style profile page at anyonecli.com with one POST — instant, free, no approval needed. Use when: c...

Registry SourceRecently Updated
2320Profile unavailable
Coding

Voyage AI CLI

Voyage AI embedding and reranking CLI integrated with MongoDB Atlas Vector Search. Use for: generating text embeddings, reranking search results, storing embeddings in Atlas, performing vector similarity search, creating vector search indexes, listing available models, comparing text similarity, bulk ingestion, interactive demos, and learning about AI concepts. Triggers: embed text, generate embeddings, vector search, rerank documents, voyage ai, semantic search, similarity search, store embeddings, atlas vector search, embedding models, cosine similarity, bulk ingest, explain embeddings.

Registry SourceRecently Updated
1.9K0Profile unavailable
Coding

Claude Code CLI for OpenClaw

Install, authenticate, and use Claude Code CLI as a native coding tool for any OpenClaw agent system.

Registry SourceRecently Updated
4920Profile unavailable