Agent skill · writing content · erichowens
automatic-stateful-prompt-improver
Automatically intercepts and optimizes prompts using the prompt-learning MCP server. Learns from performance over time via embedding-indexed history. Uses APE, OPRO, DSPy patterns. Activate
Why this skill is useful
Adds a series of automated optimization scripts for prompt engineering that enhance the AI's ability to refine complex requests based on historical performance.
What it needs
Requires mcp installed locally. Requires mcp account access. About 3k tokens when loaded. Last updated 2026-07-14. 180 stars on the source repository.
What this skill does
Automatic Stateful Prompt Improver MANDATORY AUTOMATIC BEHAVIOR When this skill is active, I MUST follow these rules: Auto-Optimization Triggers I AUTOMATICALLY call mcpprompt-learningoptimizeprompt BEFORE responding when: 1. Complex task (multi-step, requires reasoning) 2. Technical output (code, analysis, structured data) 3. Reusable content (system prompts, templates, instructions) 4. Explicit request ("improve", "better", "optimize") 5. Ambiguous requirements (underspecified, multiple interpretations) 6. Precision-critical (code, legal, medical, financial) Auto-Optimization Process Do NOT Optimize Simple questions ("what is X?") Direct commands ("run npm install") Conversational responses ("hello", "thanks") File operations without reasoning Already-optimized prompts Learning Loop (Post-Response) After completing ANY significant task: Quick Reference Iteration Decision Factor Low (3-5) Medium (5-10) High (10-20) -------- ----------- --------------- -------------- Complexity Simple Multi-step Agent/pipeline Ambiguity Clear Some Underspecified Domain Known Moderate Novel Stakes Low Moderate Critical Convergence (When to Stop) Improvement < 1% for 3 iterations User satisfied Token budget exhausted 20 iterations reached Validation score > 0.95 Performance Expectations Scenario Improvement Iterations ---------- ------------- ------------ Simple task 10-20% 3-5 Complex reasoning 20-40% 10-15 Agent/pipeline 30-50% 15-20 With history +10-15% bonus Varies Anti-Patterns Over-Optimization What it looks like Why it's wrong -------------------- ---------------- Prompt becomes overly complex with many constraints Causes brittleness, model confusion, token waste Instead: Apply Occam's Razor - simplest sufficient prompt wins Template Obsession What it looks like Why it's wrong -------------------- ---------------- Focusing on templates rather than task understanding Templates don't generalize; understanding does Instead: Focus on WHAT the task requires, not HOW to format …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills erichowens/automatic-stateful-prompt-improver