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.
npx agentmods add commands/thebeardedbearsas/claude-craft/setup-rtkgit clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craftWrote 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/thebeardedbearsas/claude-craft/setup-rtk)<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/setup-rtk"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/setup-rtk.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 | $0.00009 | $0.01502 |
| Opus 5 | $0.00005 | $0.00751 |
| Sonnet 5 | $0.00002 | $0.00300 |
| Haiku 4.5 | $0.00001 | $0.00150 |
Grade A, and why
setup-rtk scanned grade A with 1 finding 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 5d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
echo "Install options (the curl|bash pattern is BLOCKED by Claude Craft hooks):" How it starts
The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Token Optimization Setup
Configure RTK (Rust Token Killer) and comprehensive token optimization for Claude Code sessions.
Steps
1. Check RTK Installation
# Check if RTK is installed
if command -v rtk &>/dev/null; then
echo "RTK installed: $(rtk --version)"
echo ""
rtk gain 2>/dev/null || echo "No savings data yet"
else
echo "RTK is NOT installed"
echo ""
echo "Install options (the curl|bash pattern is BLOCKED by Claude Craft hooks):"
echo " 1. (Recommended) make install-rtk # from claude-craft root"
echo " 2. cargo install rtk-cli # if you have Rust toolchain"
echo " 3. Download release binary manually: https://github.com/rtk-ai/rtk/releases"
fi
2. Configure RTK Optimizations
If RTK is installed, apply these optimizations:
a) Enable ultra-compact mode
Check the hook at ~/.claude/hooks/rtk-rewrite.sh. The rewrite command should use --ultra-compact:
REWRITTEN=$(rtk rewrite --ultra-compact "$CMD" 2>/dev/null)
If it doesn't have --ultra-compact, update the hook file.
b) Optimize RTK limits
Check ~/.config/rtk/config.toml and recommend these limits:
[limits]
grep_max_results = 100
grep_max_per_file = 10
status_max_files = 10
status_max_untracked = 5
passthrough_max_chars = 1500
c) Add custom filters
Check ~/.config/rtk/filters.toml. If it only contains template comments, suggest filters based on the detected project stack:
- Docker projects: Add docker exec, compose, logs filters
- Node.js projects: Add npm/npx install filters
- PHP projects: Add composer filters
- Python projects: Add pip install filters
3. Configure Sub-Agent Model and Forked Subagents
Check if both env vars are set:
echo "CLAUDE_CODE_SUBAGENT_MODEL=${CLAUDE_CODE_SUBAGENT_MODEL:-NOT SET}"
echo "CLAUDE_CODE_FORK_SUBAGENT=${CLAUDE_CODE_FORK_SUBAGENT:-NOT SET}"
If not set, recommend adding to ~/.bashrc (or ~/.zshrc):
# Use Sonnet 5 for sub-agents (exploration, grep, file reading) instead of Opus
# → 40-60% cost reduction on sub-agent invocations
export CLAUDE_CODE_SUBAGENT_MODEL="claude-sonnet-5"
# Run sub-agents in isolated contexts (Claude Code 2.1.117+, see COMPATIBILITY.md)
# → Avoids polluting the main context window with sub-agent intermediate state
# → Compounds with context: fork on skills (~8-15K tokens saved per long session)
export CLAUDE_CODE_FORK_SUBAGENT=1
# Enable 1-hour prompt cache TTL (Claude Code 2.1.108+)
# → -40% cost on repetitive sessions (BMAD sprints, /team:* loops)
# → Same prompt cache key is reused for up to 1h instead of 5min default
export ENABLE_PROMPT_CACHING_1H=1
# Force 5-minute cache writes on every turn (Claude Code 2.1.108+)
# → Useful for short-burst dev loops that hit the cache repeatedly
# → Trade-off: small write overhead, large hit-rate gains on iterative work
export FORCE_PROMPT_CACHING_5M=1
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.
- 5d ago First seen · 150 lines · 9 tokens per session scan A c662b65d03ae
setup-rtk is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed 2d ago), licensed MIT. It adds 9 tokens to every session and 1,502 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
test-suite
Run comprehensive test suite with coverage analysis.
assemble-team
Assemble a pre-built agent team for parallel work - review, feature, debug, cross-platform, full-stack, or research.
standardize-claude-md
Add missing toolkit sections (Related Global Rules, Quick Start) to existing CLAUDE.md.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.