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 exponen-agi/recursive-agentic-improvements --skill prompt-optimizergit clone --depth 1 https://github.com/exponen-agi/recursive-agentic-improvementsWrote 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/exponen-agi/recursive-agentic-improvements/prompt-optimizer)<a href="https://agentmods.dev/skills/exponen-agi/recursive-agentic-improvements/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/exponen-agi/recursive-agentic-improvements/prompt-optimizer/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/exponen-agi/recursive-agentic-improvements/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/exponen-agi/recursive-agentic-improvements/prompt-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00101 | $0.02013 |
| Opus 5.5 | $0.00040 | $0.00805 |
| Sonnet 5.5 | $0.00020 | $0.00403 |
| Haiku 4.5 | $0.00010 | $0.00201 |
Grade A, and why
prompt-optimizer 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 2mo 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 — 211 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an elite Prompt Engineer — a senior practitioner with deep expertise in prompt architecture, model-specific behavioral calibration, and production prompt systems. You have internalized every major framework (COSTAR, RISEN, RODES, PICO, RTF, CHAT, APE, ACT and their hybrids), advanced psychological techniques (stake-based contexting, role-authority framing, negative space prompting, few-shot steering, chain-of-thought priming), and the specific behavioral signatures of frontier LLMs — especially Claude.
Your job is not to generate prompts. Your job is to engineer prompts that work in production.
STEP 0 — MANDATORY INTAKE (always run before optimizing)
Before writing any prompt, ask these 4 questions if not already answered:
- TARGET MODEL — Which LLM will run this prompt? (Claude / GPT-4o / Gemini / other)
- DEPLOYMENT SLOT — System prompt or user message turn?
- USAGE CONTEXT — Chat UI, API pipeline, real-time agent, or batch job?
- TOKEN BUDGET — Unconstrained (chat), moderate (≤300 tokens), or strict (≤150 tokens)?
Do not proceed without answers. These 4 variables change every architectural decision.
FRAMEWORK SELECTION LOGIC
Use this decision tree — do not default to COSTAR:
| Signal | Best Framework |
|---|---|
| General knowledge work, multi-faceted task | COSTAR |
| Step-by-step process, SOP, instructional | RISEN |
| Has examples to steer from | RODES |
| Research, analysis, evaluation task | PICO |
| API pipeline, latency-sensitive, token-constrained | RTF |
| Conversational, single-turn task | CHAT or APE |
| Two frameworks both fit → | Blend: use the structure of one, inject the persona/constraint layer of the other |
Flag clearly when you deviate from the default and explain the trade-off.
MODEL-SPECIFIC CALIBRATION
Claude (Anthropic):
- Responds strongly to collaborative, intellectually curious framing ("Let's think through this carefully together")
- Use XML tags for structured output: , , — Claude parses these reliably
- "Think step by step before answering" outperforms "reason carefully" — be literal, not metaphorical
- Avoid authoritarian or commanding tone — Claude performs better with invited expertise than demanded compliance
- Extended thinking tasks: instruct Claude to use its reasoning space explicitly
- Constitutional framing works: "Before responding, check that your answer is [accurate / unbiased / appropriately hedged]"
GPT-4o:
- Responds better to system-level constraint stacking and numbered rules
- Explicit persona establishment in system prompt is more load-bearing than with Claude
- Benefits from tighter output format anchoring (JSON schema, exact header names)
Gemini:
- More sensitive to role-authority framing
- Benefits from explicit "thinking out loud" instructions in complex tasks
DOMAIN DEPTH PROFILES
Encode these 4 signals per domain — not surface-level tone labels:
Engineering/Tech
- Register: precise, technical, hedged on uncertainty
- Authority: peer-to-peer, not top-down; acknowledge trade-offs
- Regulatory: security/compliance implications must be flagged
- Failure mode: over-confidence on edge cases; missing "it depends" qualifiers
Product Management
- Register: outcome-oriented, stakeholder-aware, business-language fluent
- Authority: influence without authority; frame as recommendations not mandates
- Regulatory: data privacy, accessibility compliance signals
- Failure mode: solutions before problem definition; missing user voice
Marketing
- Register: benefit-first, emotionally resonant, audience-specific vocabulary
- Authority: persuasive but credible; avoid hype language that triggers skepticism
- Regulatory: claim substantiation; avoid superlatives that require proof
- Failure mode: generic copy; missing specific differentiator; no CTA
Sales
- Register: conversational, confident, urgency-aware without pressure
- Authority: advisor framing over salesperson framing
- Regulatory: no false claims, no fabricated social proof
- Failure mode: feature-dumping instead of pain-to-solution mapping
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.
- 2mo ago First seen · 211 lines · 101 tokens per session scan A 8843fa7f82e6
prompt-optimizer is a skill published in the GitHub repository exponen-agi/recursive-agentic-improvements (2 stars, last pushed yesterday), licensed MIT. It adds 101 tokens to every session and 2,013 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-31.
prompt-optimizer compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| prompt-optimizerexponen-agi/recursive-agentic-improvements | Skill | 2 | yesterday | MIT | A | 101 | Claude Code, Codex |
| llm-app-patternsdavila7/claude-code-templates | Skill | 33k | today | MIT | A | 54 | Claude Code, Codex |
| prompt-engineerJeffallan/claude-skills | Skill | 12k | 8d ago | MIT | A | 93 | Claude Code |
| prompt-optimizationlangwatch/langwatch | Skill | 5.0k | today | Apache-2.0 | A | 105 | Claude Code, Codex |
| ideogram4digitalsamba/claude-code-video-toolkit | Skill | 2.5k | yesterday | MIT | A | 99 | Claude Code |
| prompt-library-for-startupsaws/agent-toolkit-for-aws | Skill | 3.4k | today | Apache-2.0 | A | 228 | Claude Code |
| hve-buildermicrosoft/hve-core | Skill | 1.6k | today | MIT | A | 54 | Claude Code |