erichowens avatar

Automatic Stateful Prompt Improver

This intercepts your prompts before Claude responds and automatically optimizes them using the prompt-learning MCP server, which maintains an embedding-indexed history to learn what works over time. It triggers on complex tasks, technical outputs, or anything precision-critical, running 3-20 iterations of refinement using APE, OPRO, and DSPy patterns. The feedback loop records success rates to improve future optimizations. It's overkill for simple questions but genuinely useful when you're building reusable prompts or need structured output. The anti-patterns section is honest about where this goes wrong: over-optimization makes prompts brittle, and you can waste tokens chasing perfection. Requires the prompt-learning MCP server to function.

skills.sh installs
117
GitHub stars
113
last updated
Jun 3, 2026

Install

$ npx -y skills add erichowens/some_claude_skills --skill automatic-stateful-prompt-improver --agent claude-code

Installs into .claude/skills of the current project.

Files

Automatic Stateful Prompt Improver

MANDATORY AUTOMATIC BEHAVIOR

When this skill is active, I MUST follow these rules:

Auto-Optimization Triggers

I AUTOMATICALLY call mcp__prompt-learning__optimize_prompt 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

1. INTERCEPT the user's request
2. CALL: mcp__prompt-learning__optimize_prompt
   - prompt: [user's original request]
   - domain: [inferred domain]
   - max_iterations: [3-20 based on complexity]
3. RECEIVE: optimized prompt + improvement details
4. INFORM user briefly: "I've refined your request for [reason]"
5. PROCEED with the OPTIMIZED version

Do NOT Optimize

Sponsors

Details

Repository
github.com/erichowens/some_claude_skills
Category
AI & Agent Building
First seen
Jun 3, 2026

More from erichowens/some_claude_skills

All 73
1aiskillstore avataragent-skill-trust-checkaiskillstore/marketplaceProvenance or safety signals not found in the target text.0skills.sh installs
2composiohq avatarmcp-buildercomposiohq/awesome-claude-pluginsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when b0skills.sh installs
3countbot-ai avataragent-team-managercountbot-ai/countbot多智能体团队管理。创建、查看、修改、删除 CountBot 的多智能体团队,管理团队成员(角色)和团队级自定义模型配置。当用户要新建 Pipeline/Graph/Council 团队、调整成员分工、修改依赖关系、开关技能系统、设置团队专属模型时使用。0skills.sh installs
4kimtth avatarupdate-cite-countkimtth/awesome-azure-openai-llmGuidelines for updating citation counts for papers in the section files using the `update_citation_counts.py` tool. USE FOR: Updating citation counts for papers0skills.sh installs
5luochang212 avatardive-into-langgraphluochang212/dive-into-langgraphA comprehensive guide and reference for building agents using LangGraph 1.0, including ReAct agents, state graphs, and tool integrations.0skills.sh installs
6sunbigfly avatarppt-agentsunbigfly/ppt-agent-skills专业 PPT 演示文稿全流程 AI 生成助手。模拟顶级 PPT 设计公司的完整工作流(需求调研到资料搜集到大纲策划到策划稿到设计稿),输出高质量 HTML 格式演示文稿。当用户提到制作 PPT、做演示文稿、做 slides、做幻灯片、做汇报材料、做培训课件、做路演 deck、做产品介绍页面时触发此技能。即使用户只说"帮0skills.sh installs