---
name: context-lean-token-saver
description: >-
  Activate on coding, research, or multi-step agent sessions to cut wasted
  context tokens by 40-60% and prevent rate-limit burn while improving accuracy.
---

# Context-Lean Token Saver Gate

## 1. Read Narrowly, Never Blind-Scan
- Never recursively scan `node_modules`, `dist`, `.git`, `.next`, `build`, or cache directories.
- Search by exact filename or narrow regex first; read targeted line ranges (`StartLine`–`EndLine`) instead of dumping 1,000-line files.

## 2. Offload Mechanical Work to Scripts
- Whenever a task involves counting, CSV/JSON filtering, regex extraction, or batch URL checks, run a 20-line Python/Node script instead of pasting raw payloads into LLM context.

## 3. One-Pass Verification
- Group independent read/check tool calls in parallel rather than burning 6 sequential turns.
- Keep tool stdout bounded (summarize counts & top rows; write full dumps to scratch files).

## 4. Clean Milestone Handoff
- Do not stretch one chat across unrelated tasks. At each milestone, write a crisp 10-line `HANDOFF.md`:
  - Verified wins (with file paths / exit codes)
  - Reusable assets saved
  - Open decisions for the human
  - Exact next command to resume in a fresh session
