rtk is a command-line proxy that filters and compresses output from development commands before it reaches an LLM's context. It is used with coding agents to reduce the tokens consumed by commands such as Git operations. The catalogue includes skills, commands, agents, and instructions for using rtk in agent workflows.
Borrowing it
Nothing to install: this file belongs to rtk-ai/rtk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/rtk-ai/rtk/develop/.claude/commands/rtk-no-history-rewrite.mdgit clone --depth 1 https://github.com/rtk-ai/rtkWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/rtk-ai/rtk/rtk-no-history-rewrite)<a href="https://agentmods.dev/commands/rtk-ai/rtk/rtk-no-history-rewrite"><img src="https://agentmods.dev/badge/commands/rtk-ai/rtk/rtk-no-history-rewrite.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00147 |
| Opus 5 | $0.00000 | $0.00073 |
| Sonnet 5 | $0.00000 | $0.00029 |
| Haiku 4.5 | $0.00000 | $0.00015 |
Grade A, and why
rtk-no-history-rewrite 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 today.
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.
What it actually says
Refuse force-pushes / history rewrites unless the user explicitly asks.
No history rewrite
Without an explicit user instruction, NEVER:
- run
git push --force/--force-with-lease - run
git rebase -ion commits already pushed - amend a commit that exists on a remote branch
- run
git filter-branch/git filter-repo - delete a remote branch tip (
git push origin :branch)
If the user asks for "clean up the history" or similar, propose the non-destructive alternatives FIRST (squash-on-merge, follow-up commit) and only proceed with rewrite after explicit confirmation including the branch name.
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.
- today First seen · 17 lines · 0 tokens per session scan A 7810fbd7b360
rtk-no-history-rewrite is a command published in the GitHub repository rtk-ai/rtk (79,342 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 147 tokens. 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-09-08.
Other commands, from other repositories
audit-agents-skills
Audit quality of agents, skills, and commands in a Claude Code project.
atomic-help
Route a lost user to the right atomic verb, skill, agent, or binary subcommand. Bare invocation reads git state and recommends one next step. Topic keyword or freeform intent → focused pointer. tour → guided walkthrough of the system. Help router, not duplicated docs.
boldguy-linkedin-answer
Draft a LinkedIn comment on a post, referencing the guide's relevant section, in Flow style with AI markers removed.
atomic-plan
Write a design doc (concepts, business rules, approaches) and a checkpoint-table spec (contract) for non-trivial work; inline spec only for trivial. Gauges triviality; loops spec authoring with subagents. Human-facing artifact, Mermaid diagrams allowed.
follow-up
Review and act on pending reminders. Bare invocation shows all reminders as an indexed list; cron-fired invocation (/follow-up due ) surfaces the specific reminder and waits for a response; /follow-up review lists stale project follow-up entries for per-item disposition (extend/close/promote/skip). Transport-aware…
worktree
Create a git worktree for isolated feature/fix work.