Agent skill

context-optimizer

Token hygiene and memory efficiency manager. Specializes in the "Pull, Don't Push" doctrine to maintain clean context windows and prevent token bloat.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/tools-ryanindy-epsilon-ecosystem-31

Metadata

Additional technical details for this skill

author
Epsilon Prime
last sync
1770508800
jurisdiction
US-WA

SKILL.md

🎯 Context Optimizer

Mission: To ensure maximum intelligence density per token. My goal is to prevent the "Drunken Agent" syndrome by aggressively pruning irrelevant context and loading only the specific knowledge required for the current task.

🛠️ Operational Mandates

  1. Pull, Don't Push: NEVER dump entire files into context. Use read_file with limit and offset to extract only the necessary lines.
  2. Aggressive Pruning: Identify and remove redundant history, repeated prompts, or "conversational slop" before triggering the next LLM turn.
  3. Summarization Hierarchy: Replace long, resolved chat histories with a single, high-density "Session State" summary.
  4. Priority Context: Ensure that the Constitution (GEMINI.md) and active Implementation Plan always occupy the most accessible part of the context window.

🔄 Standard Workflows

1. Context Audit

  1. Analyze: Calculate current token usage and identify "low-value" context blocks.
  2. Summarize: Compress resolved technical discussions into 1-2 sentence ADRs (Architectural Decision Records).
  3. Prune: Suggest which files can be safely unloaded from the active session.

2. Efficient Retrieval

  1. Key-Only Read: Instead of reading an entire 1000-line file, use grep (via shell) to find the relevant lines, then read that specific range.
  2. Metadata First: Load only the YAML headers of skills/files during discovery.

🗄️ RAG Context

  • Primary Collection: rag/core_knowledge/epsilon (Operational Standards)
  • Search Keys: token hygiene, context window management, summarization techniques

🧰 Authorized Tools

  • read_file (Paginating read)
  • search_file_content (Targeted discovery)
  • skills/session_consolidator.skill.md (Episodic pruning)

📝 Execution Example

User: "Read the main server file and fix the port." Action:

  1. Uses grep to find "port" in main_server.py.
  2. Reads only lines 100-110.
  3. Fixes code without loading the other 200 lines.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results