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 build-with-dhiraj/ai-workflow-framework-portability-kit --skill dspy-gepa-reflectivegit clone --depth 1 https://github.com/build-with-dhiraj/ai-workflow-framework-portability-kitWrote 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/build-with-dhiraj/ai-workflow-framework-portability-kit/dspy-gepa-reflective)<a href="https://agentmods.dev/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/dspy-gepa-reflective"><img src="https://agentmods.dev/badge/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/dspy-gepa-reflective/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/build-with-dhiraj/ai-workflow-framework-portability-kit/dspy-gepa-reflective"><img src="https://agentmods.dev/badge/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/dspy-gepa-reflective.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.00080 | $0.01808 |
| Opus 5.5 | $0.00032 | $0.00723 |
| Sonnet 5.5 | $0.00016 | $0.00362 |
| Haiku 4.5 | $0.00008 | $0.00181 |
Grade A, and why
dspy-gepa-reflective 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 — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
DSPy GEPA Optimizer
Goal
Optimize complex agentic systems using LLM reflection on full execution traces with Pareto-based evolutionary search.
When to Use
- Agentic systems with tool use
- When you have rich textual feedback on failures
- Complex multi-step workflows
- Instruction-only optimization needed
Related Skills
- For non-agentic programs: dspy-miprov2-optimizer, dspy-bootstrap-fewshot
- Measure improvements: dspy-evaluation-suite
Inputs
| Input | Type | Description |
|---|---|---|
program |
dspy.Module |
Agent or complex program |
trainset |
list[dspy.Example] |
Training examples |
metric |
callable |
Accepts five arguments and returns dspy.Prediction(score=..., feedback=...) |
reflection_lm |
dspy.LM |
Strong LM for reflection (GPT-4) |
auto |
str |
"light", "medium", "heavy" |
Outputs
| Output | Type | Description |
|---|---|---|
compiled_program |
dspy.Module |
Reflectively optimized program |
Workflow
Phase 1: Define Feedback Metric
GEPA requires metrics that return textual feedback:
def gepa_metric(example, pred, trace=None, pred_name=None, pred_trace=None):
"""Return score and actionable feedback for GEPA reflection."""
is_correct = example.answer.lower() in pred.answer.lower()
if is_correct:
feedback = "Correct. The answer accurately addresses the question."
else:
feedback = f"Incorrect. Expected '{example.answer}' but got '{pred.answer}'. The model may have misunderstood the question or retrieved irrelevant information."
return dspy.Prediction(score=float(is_correct), feedback=feedback)
Phase 2: Setup Agent
import dspy
def search(query: str) -> list[str]:
"""Search knowledge base for relevant information."""
rm = dspy.ColBERTv2(url='http://20.102.90.50:2017/wiki17_abstracts')
results = rm(query, k=3)
return results if isinstance(results, list) else [results]
def calculate(expression: str) -> float:
"""Safely evaluate mathematical expressions."""
with dspy.PythonInterpreter() as interp:
return interp(expression)
agent = dspy.ReAct("question -> answer", tools=[search, calculate])
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 · 206 lines · 80 tokens per session scan A 364b19eab03a
dspy-gepa-reflective is a skill published in the GitHub repository build-with-dhiraj/ai-workflow-framework-portability-kit (5 stars, last pushed 1mo ago), licensed MIT. It adds 80 tokens to every session and 1,808 once invoked, about $0.0003 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-09-21.
dspy-gepa-reflective compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dspy-gepa-reflectivebuild-with-dhiraj/ai-workflow-framework-portability-kit | Skill | 5 | 1mo ago | MIT | A | 80 | Claude Code |
| omni-compressiondiegosouzapw/OmniRoute | Skill | 91k | yesterday | MIT | A | 42 | Claude Code, Codex |
| cli-compressiondiegosouzapw/OmniRoute | Skill | 91k | yesterday | MIT | A | 34 | Claude Code, Codex |
| claude-api-in-prototypesasgeirtj/system_prompts_leaks | Skill | 74k | yesterday | CC0-1.0 | A | 19 | Claude Code |
| prompt-librarydavila7/claude-code-templates | Skill | 34k | today | MIT | A | 57 | Claude Code, Codex |
| ai-productdavila7/claude-code-templates | Skill | 34k | today | MIT | A | 71 | Claude Code, Codex |
| huggingface-llm-trainerwaybarrios/opencode-power-pack | Skill | 562 | 7d ago | MIT | A | 65 | Claude Code |