rtk-ai

Stars and mentions

Last 30 days, Oct 4 – Nov 2

GitHub stars2,221
mentions61
03876114152Oct 4Oct 18Nov 2
UTC days · repositories rtk-ai owns1 repositories

Package downloads

Cumulative recorded downloads

crates.io—
01234Oct 4Oct 18Nov 2No observations in this range
Oct 4crates.io: 0/1 packages observed

Across 1 known packages in repositories rtk-ai owns. Cumulative totals include recorded downloads before the selected range. Missing observations leave gaps; totals may be incomplete.

Top repositories

rtk-ai’s repositories ranked by new stars, as on trending.

Loading

Contributes to

Repositories outside rtk-ai’s account where rtk-ai opened or reviewed pull requests in the past 365 days.

Who noticed rtk-ai

Everyone who starred or forked rtk-ai’s repositories since the archive began in 2011.

Notable accounts

Ordered by the stars their own repositories have received.

Biggest fans

Accounts that starred the most of these repositories.

Breakout weeks

Each repository’s best week of new stars, with the release published around it.

Mentions

62posts
Nov 31 post
  1. ❯ rtk init --codex --global [--dry-run] RTK saved 666 tokens (68.6%), confirmed by rtk gain --history. rtk-ai/rtk

  2. agent 读命令输出,token 烧在日志里? rtk 是 Rust 单二进制代理:卡在 shell 和 agent 中间,压缩输出再给 agent 读,100+ 命令支持,最多压掉 90%。 适合天天让 agent 跑命令的人,先试最啰嗦那条。 最想压哪条命令的输出,测试还是构建? #Agent #Token @grok rtk-ai/rtk

    8 likes · 1 repost · 440 views
  3. DEV · · @dhrupo · rtk-ai/rtk

    Dev OS v2: gates, a learning loop, and agents that check agents In v1 I treated ~/.claude as an operating system around the model: a kernel (one rulebook), a scheduler (lanes), interrupts (hooks), a package manager (pinned skills). I asked you to run the starter kit for a week and tell me what broke. I ran it too, every day. 213 commits later, this is the v2 release, and its main change fits on one line: > A rule the agent reads is a request. A rule something runs is a gate. Both commenters on v1 had said the same thing. Here is what that changed, in order of how much it helped. The gates, hooks, agents and tests below ship in the kit (135 checks, bash tests/run.sh); the rest is how I run my own setup. The kit works with any agent that reads AGENTS.md (Codex, Cursor, Copilot), not only Claude Code. 1. One rulebook, every agent The kernel is the same: one CLAUDE.md whose first section says it overrides every skill, plugin and repo file. What's new is that AGENTS.md is a symlink to it. ln -s ~/.claude/CLAUDE.md ~/.codex/AGENTS.md # Codex reads ~/.codex/AGENTS.md, then one per folder, root → cwd I checked how each tool loads it on 2026-11-01: - Codex concatenates AGENTS.md files up to 32 KiB by default. A long global rulebook steals room from repo rules. Mine is capped at 136 lines by a test. - Claude Code reads AGENTS.md only in a repo with no CLAUDE.md, so CLAUDE.md stays the source. - @lessons.md imports are Claude-only. Through the link, Codex gets the rulebook but not its imports. 2. Gates beat reminders A test gate in plain git. v1's pre-commit hook only guarded ~/.claude itself. v2 installs one per project: echo 'npm test' > .dev-os-test && ~/.claude/bin/gate-install The hook it writes (condensed from bin/gate-install): TOP=$(git rev-parse --show-toplevel) unset GIT_INDEX_FILE GIT_DIR GIT_WORK_TREE GIT_PREFIX CMD=$(cat "$TOP/.dev-os-test" 2>/dev/null) if ! printf '%s' "$CMD" | grep -q '[^[:space:]]'; then echo "dev-os test gate: .dev-os-test is missing or empty; commit refused" >&2; exit 1 fi (cd "$TOP" && bash -o pipefail -c "$CMD") || { echo "dev-os test gate: commit refused" >&2; exit 1; } Every line there is a bug I hit: - pipefail: npm test | tail -5 exits with tail's 0, so a red suite commits. - Empty means refuse: a missing or empty test command fails loudly instead of passing quietly. - unset GIT_INDEX_FILE: git runs pre-commit with a temporary index during commit -a. A test suite that runs git add in a temp repo writes into your commit and breaks it with "Error building trees". - No global hooks: the installer refuses when a global core.hooksPath would turn one repo's gate into every repo's gate. Permissions the agent can't talk past. permissions.ask rules still prompt under --dangerously-skip-permissions, and compound commands are split before matching: "permissions": { "ask": ["Bash(git push:*)", "Bash(gh pr create:*)"] } One catch: rules match the command text, so git -C . push slips past Bash(git push:*). I add Bash(git -C * push *) in my own settings. Keep branch protection on the remote as the backstop. A Stop hook for the cheap way out. v1's Stop hook sent the agent back when source changed with no test. v2 adds one more case: a weakened test. That means fewer assertions, a new .skip/.only, or a deleted test file. ASSERT = re.compile(r"\bassert\w*\s*\(|\bexpect\s*\(|->assert\w*\(|\$this->assert|^[-+]\s*assert(_\w+)?\s") SKIP = re.compile(r"markTestSkipped|markTestIncomplete|->skip\(|\.(skip|only|fixme)\s*\(|\bx(it|describe|test)\s*\(") if removed_asserts > added_asserts or any(SKIP.search(l) for l in added): weakened.append(path) # → {"decision": "block", "reason": "TEST WEAKENED: …"} Codex hooks use the same Stop → {"decision":"block"} shape. 3. It learns by itself In v1, "add a line to lessons.md" depended on me remembering to do it. Now the setup logs its own mistakes: prompt starts "no, …" / "I said …" ─┐ stop-check or test gate blocks ─┼─▶ state/learn-<session>.jsonl │ Stop: learn.sh → any entry newer than the last `reflect`? → block once: "run reflect" reflect routes each mistake to the lowest layer that would have caught it: first a test or hook, then one line in the skill that owns the job, and only last a line in lessons.md. lessons.md has a 60-line budget. When it fills up, meditate audits the rules for stale, duplicate and contradicting lines, and deletes nothing without my yes. 59 of the 213 commits are Lesson: commits, and many of them removed a lesson by turning it into a check. The loop gets tested like everything else. A cold review caught the correction detector flagging "No tests exist for the parser yet" as a correction. Now no counts only when followed by punctuation, and only the first line of a prompt is read. 4. Agents check agents One agent reviewing its own diff is a student grading their own exam. The kit ships two read-only agent shapes: - scout: one angle per scout (callers, tests, history, config). Each returns file:line facts and what it couldn't check. - review-lens: Skeptic always, Architect at 50+ changed lines, Minimalist at 200+. Then one verifier per finding that starts from "false positive". Two skills run them. pre-merge-review is relay step 7 on your own branch: lenses sized by the diff, a verifier per finding, one saved report. post-pr-review is for someone else's PR: each finding must reproduce on both the base and the PR branch before it goes in a draft, and nothing is posted without a yes. /code-review stays the per-slice check inside build-check, and it never posts on other people's PRs. Every subagent brief has the same fields: goal, scope, what's known, what's been ruled out, the exact ask, the output format, what's out of scope. Parallel builders get one git worktree each, and only for plan slices that share no files. How well does this work? On the v2 kit itself, which already passed all its own tests: | Pass | Found | |---|---| | /code-review | 9 (6 fixed, 3 left with reasons) | | 3 lenses, each reproducing its findings in a temp dir | 14 more | | a cold reviewer that saw none of the above | 4 more | Every behaviour fix got a red test first. 5. Prove it by running it 9. A bug or security claim counts only when reproduced by running it. No repro, no fix. For bugs, the first job is a red-capable feedback loop, in the order from Matt Pocock's diagnosing-bugs: failing test → curl script → CLI snapshot diff → headless browser → replayed payload → harness → fuzz → git bisect run. Hypotheses come after. I also break every gate on purpose before I trust it. That caught a test that passed before the code existed. My helper matched substrings, so rc=127 ("command not found") satisfied a check for rc=1. 6. Project memory: graph first Rule 8: before grep, ask a code graph "who calls this, and what breaks if I change it?" | Tool | Used for | |---|---| | graphify query / explain / path / merge-graphs | Finding code, explaining a node, call paths, one graph across repos | | code-review-graph get_impact_radius_tool | Who else a fix reaches (the no-regressions rule) | | get_review_context_tool, get_affected_flows_tool | Review context; which E2E flows a diff touches | The scouts, review lenses and review-reply step all start there. The graph holds structure. What the project taught lives in lessons.md and in plan folders kept outside the repo. 7. Stay lean - A context budget test: rulebook plus skill descriptions, measured in bytes, against a baseline. It went from 59,287 to 46,927 while the setup grew. - Routing is tested: one rulebook sentence ("call the owner skill before any other tool") took my routing eval from 0-1 to 7-8 of 11 prompts. - Effort is a budget too: "effortLevel": "medium" by default, in every modelSettings entry as well, since a per-model value wins. High effort lives in skill frontmatter only where a wrong answer is expensive: grilling, writing and checking the plan, whole-plugin bug hunts. Hooks can read the effort level but not set it, so serious cases are handled by a rule: payment or refund, data loss, auth or a security finding mean the verifiers are spawned with effort: "high". - Smaller output: RTK trims git/gh/test output before the agent reads it. Compressed output can hide the one line you need, so "never report a result you couldn't see" is a rule. The userland Most of my 103 skills are other people's work: 39 are pinned to an upstream commit in skills.lock, with local edits in overlays that a sync script re-applies. - ponytail by Dietrich Gebert: the smallest-change ladder (YAGNI → reuse → stdlib → platform → installed dep → one line). It's rule 3 in the kit. - Matt Pocock's skills: tdd, grill-me, handoff, domain-modeling. - obra/superpowers: brainstorming and systematic-debugging. - Trail of Bits: fp-check, variant-analysis and differential-review, for security claims. - e2e-reviewer: catches E2E tests that pass while the feature is broken. Skills use the Agent Skills format. Codex reads them from .agents/skills, and Claude Code from .claude/skills, so one folder with two symlinks serves both. Upgrade or start New: follow the kit's README "Start here". The core (rulebook, test gate, plan template) takes about 10 minutes, and the Claude Code layer is optional. From v1: the README has an "Upgrading from v1" block. Nothing was renamed. Two hooks and two skills get replaced after a "Before v2" commit, so it's one git revert to undo. Same ask as v1: run it for a week and tell me what broke. And what's the one rule your agent keeps breaking? I'll tell you which gate I'd put behind it.

  4. Our agents filed seven bug reports. They sent them to themselves. Originally published on the Cloud ex Machina engineering blog. rtk is one of the tools we'd least like to give up. It sits between our coding agents and the shell and trims command output before the agent reads it, and on one laptop alone it has kept 6.7 million tokens out of agent context. This week we read every note our agents had saved for themselves, all 802 of them, and seven described rtk quietly mangling their output. Every one ended with the same workaround, and none of them had reached a person. By the time we read them, the fix had been public for 47 days. We upgraded the next morning. Why we run rtk on every shell command AI coding agents live in the shell, ours included, and every line of output they read lands in the model's context and stays there until the session ends or gets compacted. Most of it is noise, like the hundreds of lines a passing test suite prints when the agent needs one. rtk is an open-source proxy, written in Rust, that cuts that noise. A Claude Code hook rewrites git diff into rtk git diff, and rtk runs the real command and returns a version filtered for that tool, so test runs come back as their failures and git output comes back compacted, with nothing extra for the agent to do. On the author's laptop alone, rtk has kept 6.7 million tokens out of agent context, 13.8% of everything the commands it handled printed. We'd install it again tomorrow. So this isn't a post about a bad tool. Compressing output is the right trade when the agent only reads it, and it goes wrong when the output feeds something else, like a patch file, a count, or another agent, which is where our story starts. Seven agent memories, one workaround Our agents keep private notes between sessions, so that a lesson learned on Monday is still there on Tuesday. When we triaged all 802 of them, seven came from the agents of two developers and described rtk failures. | Date | What the agent recorded | |---|---| | Aug 12 | gh pr edit and gh pr comment lose their subcommand, so gh prints its usage instead | | Aug 28 | Search flags get mangled, and a commit reports success but creates nothing | | Sep 18 | git diff > patch.diff writes a summary instead of a patch, so git apply refuses it | | Sep 23 | A search returns zero hits for a pattern that matches | | Sep 28 | git log --format='%s' > file drops most of the subjects | | Sep 28 | gh pr diff N > file drops about half of the diff | | Sep 29 | A lint run reports exit 2 although the lint passed | Each memory ends by telling the agent to run the command through rtk proxy, which skips the filter, so each agent found the bug, found a way around it, and wrote both down in a memory file that only that developer's agents load, where none of us would think to look. One of these failures reached a release note. Our deployment agent writes the note from the commit subjects of the release. For the October 7 release, the first version of the note listed fewer than half of the pull requests that shipped, and a person spotted the gap and fixed it 44 minutes after the deploy. The code that shipped was right, and only its internal description was wrong. Still, no command had failed, and nothing had warned anyone. Our reviews held up better. The review skill fetches each pull request's diff inside a script, and the hook only rewrites commands an agent types itself. The truncated diff in the September 28 memory came from an agent that fetched one by hand. The workaround also turned into a habit, and a busy one. In a sample of 206,965 shell commands we pulled for this post, 7,128 went through rtk proxy. Agents of five of our six developers do it, and in the same sample only 33 of 5,952 failed shell commands mention rtk, because a failure that doesn't look like an error doesn't get looked at. In other words, our agents had built a workflow around the bug. !xkcd 1172, Workflow: an update fixes the CPU heating up when the space bar is held, and a user complains that this was their workflow xkcd 1172: Workflow by Randall Munroe, CC BY-NC 2.5. Reproducing it A memory is only the agent's own account, so on October 28 we re-ran the commands on the setup the agents had, rtk 0.37.2 and our hook script. | Command, output written to a file | Through the hook | Unfiltered | |---|---|---| | gh pr diff on a 25-file PR | 23,379 chars, 0 file headers | 58,840 chars, 25 file headers | | git log --format='%s' over a long commit range | 1% of the subjects | All of them | | git diff over 20 commits | 580 lines, 0 file headers | 2,485 lines, 62 file headers | Two memories didn't reproduce, the empty searches and a push failure whose cause went missing, so we left them out. Upstream had already fixed it !Timeline: upstream rtk fixed redirected output on September 11, five of seven agent memories came after that, and we upgraded on October 28 We were on rtk 0.37.2, released April 20, and the latest release when we checked was 1.1.0, from October 25. Our hook was older still, installed in February when rtk's hook was a shell script that did its own command matching. Current rtk ships a rtk rewrite command that decides which commands are safe to rewrite, but upgrading the binary doesn't replace a hook that's already installed, so our old script never called it. Neither side noticed. rtk init --show printed [ok] Hook: rtk hook claude (native binary command) while our settings still ran the February script. On 1.1.0, rtk rewrite leaves alone every command we tested whose output goes to a file or into wc or head. The changelog puts that work in 0.49.0, on September 11, and five of the seven memories are from after that date. One rough edge remained in 1.1.0 when we checked. When an agent reads gh pr diff directly, it sees 14 of the 25 files, and the output ends with ... (more changes truncated) and a hint to run rtk git diff --no-compact. That hint names the wrong command. In a clean checkout it prints nothing, so an agent that follows it decides there's nothing else to see, while rtk gh pr diff --no-compact prints all 25 files. The same wrong hint on git show is open as rtk#4817, and both commands share the code that prints it. Related open issues cover silent loss on large diffs, swallowed exit codes and rewritten pipe producers. Why coding agents don't report bugs rtk had bugs, and its maintainers fixed most of them while we weren't looking. For 47 days the fix was public and our agents held the evidence that we needed it, and the two never met. A developer who hits the same tool failure twice gets annoyed, and annoyance is what makes people check for an update or file an issue. An agent doesn't get annoyed. Its job ends with the task, so it writes down the workaround and moves on, and since the workaround works, nobody looks again. Seven agent sessions knew about the bug and none of us did, until we sat down and read what they had written. That reading is the part we're keeping. What we're changing Anything a machine reads, like a patch or a diff we hand to a review agent, now goes through rtk proxy or a script the hook can't reach. We upgraded to rtk 1.1.0 and regenerated the hook with rtk init -g, and the git log that kept 1% of the subjects now keeps all of them. We also pinned rtk, so it now gets updated with our other dependencies, hook included. It sees every shell command our agents run, which is reason enough to give it the same care as anything in our lockfile. We'd been treating it as part of the furniture. The bigger change is that a workaround in a memory now counts as a bug report, and the weekly memory review we're building will send each one to a ticket rather than to an instruction file. rtk was the easy case, because its maintainers had already done the fixing and all we had to do was upgrade. Across all 802 memories, 93 (12%) record a workaround for a defect, and most of those defects live in our own code and tools, where nobody upstream is going to fix anything for us. Those are the subject of our next post.

  5. How to cut Claude Code token use by up to 90% with RTK (setup in 10 minutes) If you use Claude Code on a real project, a big share of your tokens never comes from your prompts. It comes from command output: a long git log, a test run that prints every passing case, a lint pass that repeats the same warning over and over. The agent reads all of it, every time, and you pay for it in context and in limits. RTK is a single Rust binary that sits between your agent and the shell. When Claude Code runs git status, pytest or npm test, RTK filters and compresses the output before the model sees it. The README claims up to 90% smaller output across 100+ supported commands. You do not change how you prompt: the agent keeps typing normal commands. Here is the setup in about ten minutes, how to check it is really saving tokens, and the one gotcha that makes people think it is broken. Step 1: install it (and make sure it is the right rtk) brew install rtk # macOS / Linux winget install rtk-ai.rtk # Windows There is also an install script on the repo if you do not use a package manager. Then check you got the right package, because another project named "rtk" exists on crates.io: rtk --version rtk gain # must show the savings dashboard, not "command not found" If rtk gain prints a dashboard, you are good. Step 2: hook it into Claude Code rtk init -g That adds a PreToolUse hook to Claude Code (the same command covers Copilot in VS Code with --copilot). Restart Claude Code, then ask it to run git status. Behind the scenes the call is rewritten to rtk git status and the agent receives the compact version. It never has to call rtk itself. Using something else? The same idea works across 18 tools: rtk init -g --codex # Codex rtk init -g --gemini # Gemini CLI rtk init -g --agent cursor # Cursor rtk init -g --agent windsurf # Windsurf rtk init --agent cline # Cline / Roo Code Step 3: check the savings are real After a few sessions: rtk gain # summary rtk gain --graph # last 30 days as an ASCII graph rtk gain --daily # day by day rtk discover # commands you ran that RTK could have compressed but did not rtk discover is the useful one. It tells you where you are still leaking tokens. The gotcha: the hook only sees shell commands This trips up most people. The hook only fires on Bash tool calls. Claude Code's built-in Read, Grep and Glob tools do not pass through the shell, so RTK never sees them. Two fixes: - Tell the agent to prefer shell commands (cat, rg, find) for reading and searching, or - Have it call rtk read, rtk grep and rtk find directly. A line in your CLAUDE.md like "use rg and cat through Bash for search and reading" is enough for most projects. What it does to the output RTK applies four strategies depending on the command: 1. Filtering: strips comments, whitespace and boilerplate 2. Grouping: aggregates similar items, such as files by directory or errors by type 3. Truncation: keeps the relevant part, cuts the repetition 4. Deduplication: collapses repeated log lines into one line with a count Need the raw output once? rtk bypass <command> runs it unfiltered and still tracks it. Does it break Claude's prompt cache? No, according to the README: output is filtered once per command, stored in history, and cached normally on later calls. Smaller outputs also make cache writes and reads cheaper. Honest caveats - The default rtk build mixes Apache-2.0 and BUSL-1.1 code. Production use is free. If your team needs Apache-only, install rtk-oss instead (brew install rtk-ai/tap/rtk-oss). Both install a binary named rtk, so uninstall one before the other. - There is an optional rtk-proxy that compresses the API traffic itself (rtk claude launches Claude through it). It is a separate binary under BUSL-1.1. Try the plain hook first. - Compression means the agent sees less. If it starts missing details in a specific command's output, use rtk bypass for that command. Use cases with copy-paste prompts Each page has who it is for, the steps and a prompt you can paste into your coding agent. Use case: Cut your coding agent's token use from command output Use case: Set up RTK for Codex, Gemini CLI, Cursor and other agents --- Get one email every Monday with the week's hottest AI repos and exactly how to use them: subscribe free at dedupedai.com

  6. AI, sed, git, rg, cat araçlarını kullandığında context hızlı doluyor onun yerine rtk ve ast-grep araçları çok daha ekonomik, hızlı ve israfı önlüyor. özellikle json dosyaları ile çalışyorsanız 'rtk json' fark yaratır. rtk-ai/rtk, ast-grep/ast-grep

    15 likes · 1,091 views
  7. YouTube · · YouTube description · GitGemVault · rtk-ai/rtk

    Slash AI Token Waste With This Rust CLI Proxy 📉🦀 Stop letting your coding agent read massive raw bash outputs. RTK is a command line proxy built as a single Rust binary with zero dependencies that compresses shell command outputs before your LLM reads them, reducing token consumption by 60 to 90 percent. It runs with less than ten milliseconds of overhead and preserves your prompt cache. Over 100 common developer commands are supported out of the box across Git, Cargo, tests, and build tools. ✨ Intercepts shell commands and filters noise automatically ✨ Compatible with Claude Code, Cursor, GitHub Copilot, and other AI tools via rtk init ✨ Track your command history and savings with rtk gain ✨ Optional rtk proxy daemon extends optimization to provider API traffic Built for developers using AI coding assistants who want to cut down input token waste without altering local workflows. Grab the repo and start cutting down your AI agent token consumption today. ⭐ Comment 👉👉 RTK 👈👈 below and I'll drop the repo and the full install guide. 🔗 GitHub repo: rtk-ai/rtk #rtk #rtkai #aicoding #codingagents #aiagents #tokenoptimization #tokensavings #llm #llmoptimization #claudecode #cursorai #githubcopilot #developertools #developerproductivity #rustlang #rusttools #cli #commandline #terminal #terminaltools #bash #codingworkflow #aiworkflow #codingassistant #opensource #github #githubrepo #softwaredevelopment #programming #developers #automation #aitools #devtools #promptengineering #agentworkflow #codingtools #rustprogramming #terminalworkflow #llmtools #opensourceproject

    1 like · 51 views
  8. One Rust binary that shrinks what your AI coding agent reads from the shell by up to 90 percent. 🔗 rtk-ai/rtk #rtk #rust #opensource

    1 like
  9. YouTube · · YouTube description · 레포숲 (repoForest Official) · rtk-ai/rtk

    AI 코딩 토큰이 아깝다면? 명령어 결과를 줄여 주는 GitHub 오픈소스 rtk #Shorts 코딩 도우미가 읽는 긴 글을 짧게 줄여 주는 rtk-ai/rtk를 소개해요. 최대 90%까지 줄어든다고 해요. 링크는 설명란에서 확인하세요! 🔗 깃허브 프로젝트 링크: rtk-ai/rtk ※ 이 영상은 AI 음성(Supertonic-3)으로 제작했으며, 내용은 원 저장소의 README와 공개 정보를 바탕으로 합니다. #깃허브 #repo #오픈소스 #토큰절약 #클로드코드

    7 views
  10. My AI agents don't need every passing test "read out loud". I tried a small log filter (RTK) on saved output: 50 passing tests: 99 → 30 bytes big CI log: ~40 KB → 685 bytes Failures and error codes stay in. Less context. Money saved: but not finally measured yet. #AIAgents #BuildInPublic

    4 likes · 1 repost
Trending awards, every completed day and week
Gold
01st place finishes
Silver
02nd place finishes
Bronze
03rd place finishes
Awarded repositories
0Owned by rtk-ai now

No trending awards yet

None of the repositories rtk-ai owns has finished in the top three of a completed trending day or week, by stars, forks or PR authors. See who is trending now.

A repository earns an award for finishing first, second or third in a completed trending day or week, ranked by new stars, new forks or pull request authors. Awards follow a repository through renames and transfers and count toward its current owner. Weeks run Monday to Sunday, UTC.