context_mastery
Installation
SKILL.md
Context Mastery & Token Optimization Protocol
1. The "Grep-First" Rule (Token Saver)
- Problem:
read_fileon a 2000-line file consumes ~500-1000 tokens instantly. - Solution: Always use
greporread_file_rangefirst to inspect specific functions or imports. - Banned:
catorread_fileon 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:
- Summarize what has been achieved in the last 10 turns.
- Write it to
scratchpad.mdoractive_task.md. - 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
More from cityfish91159/maihouses
agentic_architecture
Enforces high-level architectural thinking, separation of concerns, and scalability checks before coding.
19code-review-excellence
程式碼審查最佳實踐指南。當進行 PR review、代碼審查或用戶提到「review」、「審查」時使用。
19nasa_typescript_safety
Adapts NASA's "Power of 10" safety rules for high-reliability TypeScript code.
18frontend_mastery
Advanced React patterns, performance optimization, and state management rules.
18code-simplifier
|
18type-checker
執行 TypeScript 類型檢查並修復類型錯誤。當遇到類型錯誤、需要類型定義、或用戶提到「type」、「類型」時使用。
18