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 Stijnman/grok-custom-skills --skill dspy-prompt-optimizergit clone --depth 1 https://github.com/Stijnman/grok-custom-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/stijnman/grok-custom-skills/dspy-prompt-optimizer)<a href="https://agentmods.dev/skills/stijnman/grok-custom-skills/dspy-prompt-optimizer"><img src="https://agentmods.dev/badge/skills/stijnman/grok-custom-skills/dspy-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/stijnman/grok-custom-skills/dspy-prompt-optimizer"><img src="https://agentmods.dev/badge/skills/stijnman/grok-custom-skills/dspy-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.00039 | $0.00351 |
| Opus 5 | $0.00019 | $0.00176 |
| Sonnet 5 | $0.00008 | $0.00070 |
| Haiku 4.5 | $0.00004 | $0.00035 |
Grade A, and why
dspy-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 11d 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.
What it actually says
DSPy Prompt Optimizer
When to Use
- User says optimize this prompt or task matches this capability
- User says dspy tune or task matches this capability
- User says improve prompt with reflection or task matches this capability
Workflow
- Capture baseline prompt and 2-3 example inputs with desired outputs.
- Run baseline; score outputs against criteria.
- Generate 3 prompt variants addressing failures.
- Test variants; pick best by score.
- Return optimized prompt with before/after metrics.
Integrations
self-refine-loopauto-testerhyper-skill-tester
Error Handling
| Failure | Response |
|---|---|
| No examples | Ask for 2 input/output pairs minimum. |
| Overfitting one example | Require 3+ diverse examples. |
Gotchas
- Keep prompt under 2000 tokens unless user needs longer.
Example
Input: User request matching triggers above. Output: Structured result per workflow with integrations invoked as needed.
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.
- 11d ago First seen · 49 lines · 39 tokens per session scan A 2d361b969d8f
dspy-prompt-optimizer is a skill published in the GitHub repository Stijnman/grok-custom-skills (9 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 351 once invoked, about $0.0002 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
ai-engineering-toolkit
6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching.
guidance
Control LLM output with regex and grammars, guarantee valid JSON/XML/code generation, enforce structured formats, and build multi-step workflows with Guidance - Microsoft Research's constrained generation framework.
outlines
Guarantee valid JSON/XML/code structure during generation, use Pydantic models for type-safe outputs, support local models (Transformers, vLLM), and maximize inference speed with Outlines - dottxt.ai's structured generation library.
prompt-master
Generates optimized prompts for AI tools. Activates only when the user explicitly asks to write, fix, improve, or adapt a prompt for a specific AI tool (LLM, Cursor, Midjourney, image AI, video AI, coding agents, etc.). Does not activate for general conversation, coding tasks, document writing, or other…
prompt-context-engineer
Transform any rough prompt, request, or idea into a well-structured, context-engineered prompt using Andrej Karpathy's context engineering principles. Use this skill whenever the user asks to improve, rewrite, restructure, optimize, or "engineer" a prompt; mentions prompt engineering or context engineering; pastes a…
forensic-prompt-compiler
Forensic image-to-prompt compiler for image generation models. Use this skill whenever the user wants to: convert/describe an existing image into a generation prompt, reconstruct a scene as a prompt, generate prompts from reference images for AI image tools (Midjourney, FLUX, Stable Diffusion, DALL-E, or any diffusion…