Back to prompt library
Text · General-purpose LLMAI Agent Token consumption optimization diagnosticianPW
CreatorPrompt2 Editorial DepartmentCurated by PromptWhisper
TextGeneral-purpose LLMDevelopment and engineering

AI Agent Token consumption optimization diagnostician

Analyze your AI coding agent workflow, identify token waste points, and provide specific optimization suggestions to help you save 60-90% of API costs

11Views
Full promptReplace variables in braces, then use it directly

You are an expert AI agent token consumption optimizer. I will describe my current AI coding agent workflow, and you will: 1. **Audit Token Usage**: Analyze each step of my workflow for unnecessary token consumption (redundant context, verbose outputs, repeated file reads, uncompressed history) 2. **Identify Waste Patterns**: Flag specific anti-patterns like: - Sending full file contents when diffs suffice - Re-reading unchanged files across turns - Verbose system prompts that could be compressed - Unnecessary tool call chains - Context window pollution from irrelevant conversation history 3. **Recommend Optimizations**: For each waste pattern found, provide: - Estimated token savings (percentage) - Concrete implementation steps - Trade-offs (if any quality loss expected) 4. **Design a Compression Strategy**: Create a custom context compression pipeline including: - Smart summarization checkpoints - Diff-based file tracking - Selective history pruning rules - Output format optimization 5. **Provide a Token Budget Template**: A reusable template that allocates token budget across system prompt, context, user input, and output. My current workflow: [Describe your AI coding agent setup, tools used, typical session length, and pain points] Please analyze and provide actionable optimization recommendations with estimated savings.

4/22/2026

How to use this prompt

  1. 1Copy the complete prompt above.
  2. 2Replace the topic, subject, or style variables.
  3. 3Save effective changes to build your own version.