返回顶部
s

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.34.3
安全检测
已通过
55
下载量
0
收藏
概述
安装方式
版本历史

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 ```bash # 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`,完事: ```bash 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 | Command | What it does | |---------|-------------| | `rtk git` | Git with compact output | | `rtk gh` | GitHub CLI, token-optimized | | `rtk test` / `rtk pytest` / `rtk vitest` | Tests — only show failures | | `rtk err <cmd>` | Run anything, show only errors/warnings | | `rtk diff` | Ultra-condensed diff (changed lines only) | | `rtk json <file>` | Compact JSON, `--schema` for structure only | | `rtk find` | Compact file tree | | `rtk grep` | Strips whitespace, truncates, groups by file | | `rtk curl` | Auto-JSON detection + schema output | | `rtk summary <cmd>` | Run anything, get 2-line heuristic summary | | `rtk gain` | Show token savings stats | | `rtk discover` | Find 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.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 slash-tokens-1775882355 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 slash-tokens-1775882355 技能

通过命令行安装

skillhub install slash-tokens-1775882355

下载 Zip 包

⬇ 下载 slash-tokens v0.34.3

文件大小: 566.47 KB | 发布时间: 2026-4-12 11:26

v0.34.3 最新 2026-4-12 11:26
Add origin story — how one dev cut their Claude Code bill from $200 to $40/month

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部