automatic-stateful-prompt-improver

Intercept and optimize prompts via the prompt-learning MCP server.

181|30|Updated Nov 16, 2025
One-click install
npx skills add https://github.com/erichowens/some_claude_skills --skill automatic-stateful-prompt-improver
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: automatic-stateful-prompt-improver
Source: https://github.com/erichowens/some_claude_skills/tree/main/.claude/skills/automatic-stateful-prompt-improver
Command: npx skills add https://github.com/erichowens/some_claude_skills --skill automatic-stateful-prompt-improver

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the tedious process of crafting and refining prompts. It automatically intercepts user requests, optimizes prompts using a persistent stateful learning loop via an MCP server, and stores performance data to improve future outcomes. It reduces time spent on trial-and-error prompting and increases result quality by learning from feedback across conversations and tasks.

Core Features & Use Cases

  • Auto-intercept and optimize prompts before responding to complex tasks
  • Stateful learning through embedding-indexed history and performance metrics
  • Integration with MCP servers and Claude Code for persistent learning
  • Clear convergence thresholds and iterative budgets for predictable improvements
  • Suitable for system prompts, templates, and multi-step instructions
  • Supports feedback and analytics to continuously improve prompt quality

Quick Start

  • Ensure your prompt-learning MCP server is running and properly configured in Claude Code.
  • Invoke with: "optimize this prompt: [your prompt here]".
  • Review the optimized prompt and improvement details, then use the refined prompt for your task.

Frequently Asked Questions about automatic-stateful-prompt-improver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically optimize prompts for complex tasks?

Prompt optimization automatically intercepts and refines your instructions using an MCP server and embedding-indexed history. It applies iterative improvement patterns like APE and OPRO to enhance multi-step reasoning tasks, reducing trial-and-error cycles and improving output quality across conversations.

What setup do I need to run prompt optimization with an MCP server?

You need a configured prompt-learning MCP server, a vector store like Qdrant or Chroma for embeddings, Redis for session metrics, and Claude Code integration. These components work together to maintain stateful learning and track performance data across optimization cycles.

Can I use this for system prompts and prompt templates?

Yes, prompt optimization works with system prompts, templates, and multi-step instructions. It's designed for complex reasoning tasks across domains and automatically learns from feedback to refine instructions, making it suitable for recurring or template-based workflows.

How does stateful learning improve prompt results over time?

Stateful learning stores performance metrics and embedding-indexed history in persistent storage. Each optimization cycle converges toward better prompts using defined budgets, so future requests benefit from what worked in past tasks without restarting from scratch.

What triggers prompt optimization automatically?

Optimization activates on requests containing keywords like 'optimize this prompt', 'improve this prompt', or 'prompt engineering', plus other complex instructions. Once triggered, it intercepts the prompt, refines it using the learning loop, and applies the improved version to your task.

What are the limits of prompt optimization budgets?

Optimization runs within defined iteration budgets and convergence thresholds to keep improvements predictable and cost-controlled. Once thresholds are met, the system stops refining and returns the optimized prompt, preventing runaway iteration cycles.