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 chandrudp29/skillhub --skill prompt-optimizergit clone --depth 1 https://github.com/chandrudp29/skillhubWrote 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/chandrudp29/skillhub/prompt-optimizer)<a href="https://agentmods.dev/skills/chandrudp29/skillhub/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/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/chandrudp29/skillhub/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/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.00045 | $0.01129 |
| Opus 5.5 | $0.00018 | $0.00452 |
| Sonnet 5.5 | $0.00009 | $0.00226 |
| Haiku 4.5 | $0.00005 | $0.00113 |
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 1mo 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 — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prompt Optimizer
Diagnoses why a prompt underperforms and rewrites it to be specific, grounded, and consistent.
When to Use
- Model ignores part of the instructions
- Outputs vary wildly between runs
- Responses are too verbose, too vague, or formatted wrong
- Model "hallucinates" when it should say "I don't know"
- Chain-of-thought isn't happening when it should
Diagnosis First
Before rewriting, identify the failure mode:
| Symptom | Likely cause |
|---|---|
| Ignores formatting instructions | Instructions buried in a long prompt |
| Inconsistent output structure | No example provided |
| Too verbose | No length guidance |
| Hallucinates facts | No instruction to acknowledge uncertainty |
| Misunderstands the task | Task description is ambiguous |
| Ignores constraints | Constraints mentioned once, not reinforced |
The Anatomy of a Strong Prompt
[Role / Persona] ← who the model is in this context
[Task definition] ← exactly what to do
[Context / Input] ← the data it operates on
[Constraints] ← what NOT to do, limits, format
[Output format] ← exact structure of the response
[Example] (optional) ← one concrete example of good output
Not every prompt needs all sections. A simple prompt doesn't need a persona. A structured extraction task needs an output format and example.
Common Rewrites
Vague → Specific
# Before (vague)
Summarize this text.
# After (specific)
Summarize the following text in exactly 3 bullet points.
Each bullet must be one sentence under 20 words.
Focus only on actionable findings — ignore background context.
If there are no actionable findings, write "No actionable findings."
Text:
{text}
Missing Output Format
# Before
Extract the key information from this job posting.
# After
Extract the following fields from the job posting below.
Return a JSON object with exactly these keys:
{
"title": "job title",
"company": "company name",
"location": "city, country or Remote",
"salary": "salary range or null if not mentioned",
"required_skills": ["skill1", "skill2"],
"years_experience": number or null
}
If a field is not present, use null. Do not add extra fields.
Job posting:
{text}
What ships with it
1 file 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.
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.
- 1mo ago First seen · 166 lines · 45 tokens per session scan A 5c4bbe61ddc4
prompt-optimizer is a skill published in the GitHub repository chandrudp29/skillhub (14 stars, last pushed 3mo ago), licensed MIT. It adds 45 tokens to every session and 1,129 once invoked, about $0.0002 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.
Other skills, from other repositories
c-ai
Query LLMs from the CLI — pipe text for summarization, chat interactively, use local or cloud models with llm or aichat.
dspy
DSPy: declarative LM programs, auto-optimize prompts, RAG.
outlines
Outlines: structured JSON/regex/Pydantic LLM generation.
instructor
Structured LLM outputs validated with Pydantic.
guidance
Constrain LLM output with grammars; guarantee valid JSON.
dspy
DSPy: declarative LM programs, auto-optimize prompts, RAG.