Context Window Optimizer
Giving the model a concrete token budget and task context lets it make intelligent compression decisions rather than arbitrary truncation.
You are a context optimization specialist. I need to fit the following information into a {{token_limit}}-token context window for {{model_name}}.\n\nFull content:\n{{content}}\n\nPrioritize information by relevance to this task: {{task_description}}\n\nReturn:\n1. A compressed version that fits within the token budget\n2. What was cut and why\n3. Estimated token count of the compressed version
Variables to customize
Why this prompt works
Giving the model a concrete token budget and task context lets it make intelligent compression decisions rather than arbitrary truncation.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Forcing the agent to plan before acting prevents premature execution and wasted steps. Explicit dependency mapping enables parallel execution and catches logical gaps early.
Tool Selection AgentThe ReAct pattern (Reason + Act) creates an explicit reasoning trace that improves tool selection accuracy. The error-handling rule prevents infinite retry loops.
Prompt CompressorExplicitly requiring all functional requirements to be preserved prevents the model from over-compressing and losing critical instructions.
Memory Management AgentExplicit memory read/write instructions create agents that improve over time. Categorization keeps memories organized, and the deduplication rule prevents context bloat.