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 agentmods add skills/exponen-agi/recursive-agentic-improvements/prompt-optimizernpx 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.svg" alt="Measured on agentmods" 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 | $0.00051 | $0.01007 |
| Sonnet 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 5d 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.
- 5d 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.0005 per session on Opus 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.
Other skills, from other repositories
llm-app-patterns
Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.
prompt-optimization
Improve a prompt on the evaluations workbench through a measured loop. Score the baseline first, then duplicate the target column, form a hypothesis from failing rows, edit the copy's prompt draft, run, compare pass rate and cost, and repeat until the numbers hold. Use when the user asks to optimize or improve a…
enhance-prompt
Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.
prompt-engineer
Writes, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot…
omh-model-optimization
This is a Hermes-native model-optimization workflow skill.
hve-builder
Author, review, or validate Copilot prompt-engineering artifacts through independent review, behavior testing, and host checks.