Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

Merge upstream/main into fix/copilot-oauth-runtime

JerrettDavis1d440023b697
diff --cc .claude-plugin/marketplace.json
index 000000000,734d6b89e..ca48115ac
mode 000000,100644..100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@@ -1,0 -1,30 +1,30 @@@
-{
- "name": "headroom-marketplace",
- "owner": {
- "name": "Headroom Contributors"
- },
- "metadata": {
- "description": "Headroom marketplace for Claude Code and GitHub Copilot CLI plugins.",
- "version": "0.9.2"
- },
- "plugins": [
- {
- "name": "headroom",
- "source": "./plugins/headroom-agent-hooks",
- "description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
- "version": "0.9.2",
- "author": {
- "name": "Headroom Contributors",
- "url": "https://github.com/chopratejas/headroom"
- },
- "homepage": "https://github.com/chopratejas/headroom",
- "repository": "https://github.com/chopratejas/headroom",
- "keywords": [
- "headroom",
- "hooks",
- "claude-code",
- "copilot-cli"
- ]
- }
- ]
-}
++{
++ "name": "headroom-marketplace",
++ "owner": {
++ "name": "Headroom Contributors"
++ },
++ "metadata": {
++ "description": "Headroom marketplace for Claude Code and GitHub Copilot CLI plugins.",
++ "version": "0.9.2"
++ },
++ "plugins": [
++ {
++ "name": "headroom",
++ "source": "./plugins/headroom-agent-hooks",
++ "description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
++ "version": "0.9.2",
++ "author": {
++ "name": "Headroom Contributors",
++ "url": "https://github.com/chopratejas/headroom"
++ },
++ "homepage": "https://github.com/chopratejas/headroom",
++ "repository": "https://github.com/chopratejas/headroom",
++ "keywords": [
++ "headroom",
++ "hooks",
++ "claude-code",
++ "copilot-cli"
++ ]
++ }
++ ]
++}
diff --cc .github/copilot-instructions.md
index 000000000,000000000..4b79c3973
new file mode 100644
--- /dev/null
+++ b/.github/copilot-instructions.md
@@@ -1,0 -1,0 +1,42 @@@
++<!-- headroom:rtk-instructions -->
++# RTK (Rust Token Killer) - Token-Optimized Commands
++
++When running shell commands, **always prefix with `rtk`**. This reduces context
++usage by 60-90% with zero behavior change. If rtk has no filter for a command,
++it passes through unchanged � so it is always safe to use.
++
++## Key Commands
++```bash
++# Git (59-80% savings)
++rtk git status rtk git diff rtk git log
++
++# Files & Search (60-75% savings)
++rtk ls <path> rtk read <file> rtk grep <pattern>
++rtk find <pattern> rtk diff <file>
++
++# Test (90-99% savings) � shows failures only
++rtk pytest tests/ rtk cargo test rtk test <cmd>
++
++# Build & Lint (80-90% savings) � shows errors only
++rtk tsc rtk lint rtk cargo build
++rtk prettier --check rtk mypy rtk ruff check
++
++# Analysis (70-90% savings)
++rtk err <cmd> rtk log <file> rtk json <file>
++rtk summary <cmd> rtk deps rtk env
++
++# GitHub (26-87% savings)
++rtk gh pr view <n> rtk gh run list rtk gh issue list
++
++# Infrastructure (85% savings)
++rtk docker ps rtk kubectl get rtk docker logs <c>
++
++# Package managers (70-90% savings)
++rtk pip list rtk pnpm install rtk npm run <script>
++```
++
++## Rules
++- In command chains, prefix each segment: `rtk git add . && rtk git commit -m "msg"`
++- For debugging, use raw command without rtk prefix
++- `rtk proxy <cmd>` runs command without filtering but tracks usage
++<!-- /headroom:rtk-instructions -->
diff --cc .github/plugin/marketplace.json
index 000000000,734d6b89e..ca48115ac
mode 000000,100644..100644
--- a/.github/plugin/marketplace.json
+++ b/.github/plugin/marketplace.json
@@@ -1,0 -1,30 +1,30 @@@
-{
- "name": "headroom-marketplace",
- "owner": {
- "name": "Headroom Contributors"
- },
- "metadata": {
- "description": "Headroom marketplace for Claude Code and GitHub Copilot CLI plugins.",
- "version": "0.9.2"
- },
- "plugins": [
- {
- "name": "headroom",
- "source": "./plugins/headroom-agent-hooks",
- "description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
- "version": "0.9.2",
- "author": {
- "name": "Headroom Contributors",
- "url": "https://github.com/chopratejas/headroom"
- },
- "homepage": "https://github.com/chopratejas/headroom",
- "repository": "https://github.com/chopratejas/headroom",
- "keywords": [
- "headroom",
- "hooks",
- "claude-code",
- "copilot-cli"
- ]
- }
- ]
-}
++{
++ "name": "headroom-marketplace",
++ "owner": {
++ "name": "Headroom Contributors"
++ },
++ "metadata": {
++ "description": "Headroom marketplace for Claude Code and GitHub Copilot CLI plugins.",
++ "version": "0.9.2"
++ },
++ "plugins": [
++ {
++ "name": "headroom",
++ "source": "./plugins/headroom-agent-hooks",
++ "description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
++ "version": "0.9.2",
++ "author": {
++ "name": "Headroom Contributors",
++ "url": "https://github.com/chopratejas/headroom"
++ },
++ "homepage": "https://github.com/chopratejas/headroom",
++ "repository": "https://github.com/chopratejas/headroom",
++ "keywords": [
++ "headroom",
++ "hooks",
++ "claude-code",
++ "copilot-cli"
++ ]
++ }
++ ]
++}
diff --cc plugins/headroom-agent-hooks/.claude-plugin/plugin.json
index 000000000,0a6e74107..0d63bd1cd
mode 000000,100644..100644
--- a/plugins/headroom-agent-hooks/.claude-plugin/plugin.json
+++ b/plugins/headroom-agent-hooks/.claude-plugin/plugin.json
@@@ -1,0 -1,17 +1,17 @@@
-{
- "name": "headroom",
- "version": "0.9.2",
- "description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
- "author": {
- "name": "Headroom Contributors",
- "url": "https://github.com/chopratejas/headroom"
- },
- "homepage": "https://github.com/chopratejas/headroom",
- "repository": "https://github.com/chopratejas/headroom",
- "keywords": [
- "headroom",
- "hooks",
- "claude-code",
- "copilot-cli"
- ]
-}
++{
++ "name": "headroom",
++ "version": "0.9.2",
++ "description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
++ "author": {
++ "name": "Headroom Contributors",
++ "url": "https://github.com/chopratejas/headroom"
++ },
++ "homepage": "https://github.com/chopratejas/headroom",
++ "repository": "https://github.com/chopratejas/headroom",
++ "keywords": [
++ "headroom",
++ "hooks",
++ "claude-code",
++ "copilot-cli"
++ ]
++}
diff --cc plugins/headroom-agent-hooks/.github/plugin/plugin.json
index 000000000,bdb07cc0e..c43dbaf24
mode 000000,100644..100644
--- a/plugins/headroom-agent-hooks/.github/plugin/plugin.json
+++ b/plugins/headroom-agent-hooks/.github/plugin/plugin.json
@@@ -1,0 -1,18 +1,18 @@@
-{
- "name": "headroom",
- "version": "0.9.2",
- "description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
- "author": {
- "name": "Headroom Contributors",
- "url": "https://github.com/chopratejas/headroom"
- },
- "homepage": "https://github.com/chopratejas/headroom",
- "repository": "https://github.com/chopratejas/headroom",
- "keywords": [
- "headroom",
- "hooks",
- "claude-code",
- "copilot-cli"
- ],
- "hooks": "./hooks"
-}
++{
++ "name": "headroom",
++ "version": "0.9.2",
++ "description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
++ "author": {
++ "name": "Headroom Contributors",
++ "url": "https://github.com/chopratejas/headroom"
++ },
++ "homepage": "https://github.com/chopratejas/headroom",
++ "repository": "https://github.com/chopratejas/headroom",
++ "keywords": [
++ "headroom",
++ "hooks",
++ "claude-code",
++ "copilot-cli"
++ ],
++ "hooks": "./hooks"
++}