Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add curiositech/some_claude_skills --skill automatic-stateful-prompt-improvergit clone --depth 1 https://github.com/curiositech/some_claude_skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/curiositech/some_claude_skills/automatic-stateful-prompt-improver)<a href="https://agentmods.dev/skills/curiositech/some_claude_skills/automatic-stateful-prompt-improver"><img src="https://agentmods.dev/badge/skills/curiositech/some_claude_skills/automatic-stateful-prompt-improver/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/curiositech/some_claude_skills/automatic-stateful-prompt-improver"><img src="https://agentmods.dev/badge/skills/curiositech/some_claude_skills/automatic-stateful-prompt-improver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00102 | $0.01157 |
| Opus 5.5 | $0.00041 | $0.00463 |
| Sonnet 5.5 | $0.00020 | $0.00231 |
| Haiku 4.5 | $0.00010 | $0.00116 |
Grade A, and why
automatic-stateful-prompt-improver scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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:
- Complex task (multi-step, requires reasoning)
- Technical output (code, analysis, structured data)
- Reusable content (system prompts, templates, instructions)
- Explicit request ("improve", "better", "optimize")
- Ambiguous requirements (underspecified, multiple interpretations)
- 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
- 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:
1. ASSESS: Did the response achieve the goal?
2. CALL: mcp__prompt-learning__record_feedback
- prompt_id: [from optimization response]
- success: [true/false]
- quality_score: [0.0-1.0]
3. This enables future retrievals to learn from outcomes
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
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- .claude-plugin/plugin.json 549 B
- CHANGELOG.md 835 B
- references/ape-opro-implementation.md 20 KB
- references/dspy-patterns.md 12 KB
- references/embedding-architecture.md 16 KB
- references/iteration-strategy.md 2.7 KB
- references/learning-architecture.md 2.5 KB
- references/mcp-server-spec.md 17 KB
- references/optimization-techniques.md 3.0 KB
- SETUP.md 9.9 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 144 lines · 102 tokens per session scan A a618f9010720
automatic-stateful-prompt-improver is a skill published in the GitHub repository curiositech/some_claude_skills (278 stars, last pushed 3d ago), licensed MIT. It adds 102 tokens to every session and 1,157 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
automatic-stateful-prompt-improver compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| automatic-stateful-prompt-improvercuriositech/some_claude_skills | Skill | 278 | 3d ago | MIT | A | 102 | Claude Code |
| llm-app-patternsdavila7/claude-code-templates | Skill | 34k | yesterday | MIT | A | 54 | Claude Code, Codex |
| enhance-promptgoogle-labs-code/stitch-skills | Skill | 14k | yesterday | Apache-2.0 | A | 41 | Claude Code |
| prompt-engineerJeffallan/claude-skills | Skill | 13k | today | MIT | A | 93 | Claude Code |
| prompt-optimizationlangwatch/langwatch | Skill | 5.1k | yesterday | Apache-2.0 | A | 105 | Claude Code, Codex |
| prompt-library-for-startupsaws/agent-toolkit-for-aws | Skill | 3.6k | yesterday | Apache-2.0 | A | 244 | Claude Code |
| hve-buildermicrosoft/hve-core | Skill | 1.6k | 4d ago | MIT | A | 54 | Claude Code |