context_mastery

Installation
SKILL.md

Context Mastery & Token Optimization Protocol

1. The "Grep-First" Rule (Token Saver)

  • Problem: read_file on a 2000-line file consumes ~500-1000 tokens instantly.
  • Solution: Always use grep or read_file_range first to inspect specific functions or imports.
  • Banned: cat or read_file on entire directories or massive files (e.g., package-lock.json, giant logs) unless absolutely necessary.

2. Incremental Summarization

  • Trigger: When the conversation exceeds ~20 turns or you feel the context window filling.
  • Action:
    1. Summarize what has been achieved in the last 10 turns.
    2. Write it to scratchpad.md or active_task.md.
    3. Explicitly state "I am clearing internal context of validated steps" (if tool allows) or just rely on the scratchpad for future lookup.

3. Focused Context Loading

Related skills
Installs
17
GitHub Stars
1
First Seen
Jan 25, 2026