rtk copilot-instructions.md

Instructions for using RTK, a command-line tool that shortens shell-command output before it reaches an AI model's message history.

In plain words
What is it for?
They are for running common Git, Rust, search, package, and Go commands through RTK, checking token savings, and following the project's build, test, lint, and commit rules.
Why use it?
They reduce unnecessary command output and explain the required checks and commands for working on the Rust project.

Instructions file for GitHub Copilot

▶ Claude Code + RTK : Saves 90% Tokens FuturMinds · about rtk-ai/rtk · on YouTube →
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/rtk-ai/rtk/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/rtk-ai/rtk

Made for: GitHub Copilot.

Per session 846 This file is loaded in full into every session.
When invoked 846 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00846 $0.00846
Opus 5 $0.00423 $0.00423
Sonnet 5 $0.00169 $0.00169
Haiku 4.5 $0.00085 $0.00085

Measured 3d ago against content hash 429f1be86808, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rtk copilot-instructions.md 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 3d ago.

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.

.github/copilot-instructions.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Copilot Instructions for rtk

rtk (Rust Token Killer) is a CLI proxy that filters and compresses command outputs before they reach an LLM context, cutting 60-90% of bash output. It wraps common tools (git, cargo, grep, pnpm, go, etc.) and outputs condensed summaries instead of raw output. Percentages measure bash output, not billed tokens; RTK ships no tokenizer (src/core/tracking.rs estimates bytes / 4).

Using rtk in this session

Always prefix commands with rtk when running shell commands — this reduces token consumption for every operation you perform.

# Instead of:              Use:
git status                 rtk git status
git log -10                rtk git log -10
cargo test                 rtk cargo test
cargo clippy --all-targets rtk cargo clippy --all-targets
grep -r "pattern" src/     rtk grep -r "pattern" src/

rtk meta-commands (always use these directly, no prefix needed):

rtk gain              # Show token savings analytics
rtk gain --history    # Full command history with per-command savings
rtk discover          # Scan session history for missed rtk opportunities
rtk proxy <cmd>       # Run a command raw (no filtering) but still track it

Verify rtk is installed before starting:

rtk --version   # Should print: rtk X.Y.Z
rtk gain        # Should show a dashboard (not "command not found")

Name collision: rtk gain failing means you have reachingforthejack/rtk (Rust Type Kit) installed instead. Run which rtk to check.

Build, Test & Lint

cargo build                    # Development build
cargo test                     # All tests
cargo test test_name           # Single test
cargo test module::tests::     # Module tests
cargo test -- --nocapture      # With stdout

# Pre-commit gate (must all pass before any PR)
cargo fmt --all --check && cargo clippy --all-targets && cargo test

bash scripts/test-all.sh       # Smoke tests (requires installed binary)

PRs target the develop branch, not main. All commits require a DCO sign-off (git commit -s).

Read the full file on GitHub · 67 lines

Changes

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.

  1. 3d ago First seen · 67 lines · 846 tokens per session scan A 429f1be86808

Subscribe to this mod's changes

rtk copilot-instructions.md is an instructions file published in the GitHub repository rtk-ai/rtk (78,131 stars, last pushed yesterday), licensed Apache-2.0. It adds 846 tokens to every session, about $0.0042 per session on Opus 5. 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-08-30.