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 OmidZamani/dspy-skills --skill dspy-bootstrap-fewshotgit clone --depth 1 https://github.com/OmidZamani/dspy-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/omidzamani/dspy-skills/dspy-bootstrap-fewshot)<a href="https://agentmods.dev/skills/omidzamani/dspy-skills/dspy-bootstrap-fewshot"><img src="https://agentmods.dev/badge/skills/omidzamani/dspy-skills/dspy-bootstrap-fewshot/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/omidzamani/dspy-skills/dspy-bootstrap-fewshot"><img src="https://agentmods.dev/badge/skills/omidzamani/dspy-skills/dspy-bootstrap-fewshot.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00030 | $0.01282 |
| Opus 5 | $0.00015 | $0.00641 |
| Sonnet 5 | $0.00006 | $0.00256 |
| Haiku 4.5 | $0.00003 | $0.00128 |
Grade A, and why
dspy-bootstrap-fewshot 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 12d 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 — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.
DSPy Bootstrap Few-Shot Optimizer
Goal
Automatically generate and select optimal few-shot demonstrations for your DSPy program using a teacher model.
When to Use
- You have 10-50 labeled examples
- Manual example selection is tedious or suboptimal
- You want demonstrations with reasoning traces
- Quick optimization without extensive compute
Related Skills
- For more data (200+ examples): dspy-miprov2-optimizer
- For agentic systems: dspy-gepa-reflective
- Measure improvements: dspy-evaluation-suite
Inputs
| Input | Type | Description |
|---|---|---|
program |
dspy.Module |
Your DSPy program to optimize |
trainset |
list[dspy.Example] |
Training examples |
metric |
callable |
Evaluation function |
metric_threshold |
float |
Numerical threshold for accepting demos (optional) |
max_bootstrapped_demos |
int |
Max teacher-generated demos (default: 4) |
max_labeled_demos |
int |
Max direct labeled demos (default: 16) |
max_rounds |
int |
Max bootstrapping attempts per example (default: 1) |
teacher_settings |
dict |
Configuration for teacher model (optional) |
Outputs
| Output | Type | Description |
|---|---|---|
compiled_program |
dspy.Module |
Optimized program with demos |
Workflow
Phase 1: Setup
import dspy
from dspy.teleprompt import BootstrapFewShot
# Configure LMs
dspy.configure(lm=dspy.LM("openai/gpt-4o-mini"))
Phase 2: Define Program and Metric
class QA(dspy.Module):
def __init__(self):
self.generate = dspy.ChainOfThought("question -> answer")
def forward(self, question):
return self.generate(question=question)
def validate_answer(example, pred, trace=None):
return example.answer.lower() in pred.answer.lower()
Phase 3: Compile
optimizer = BootstrapFewShot(
metric=validate_answer,
max_bootstrapped_demos=4,
max_labeled_demos=4,
teacher_settings={'lm': dspy.LM("openai/gpt-4o")}
)
compiled_qa = optimizer.compile(QA(), trainset=trainset)
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.
- 12d ago First seen · 177 lines · 30 tokens per session scan A 8bf5efa33873
dspy-bootstrap-fewshot is a skill published in the GitHub repository OmidZamani/dspy-skills (123 stars, last pushed 2mo ago), licensed MIT. It adds 30 tokens to every session and 1,282 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-30.
Other skills, from other repositories
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…
dspy
Build complex AI systems with declarative programming, optimize prompts automatically, create modular RAG systems and agents with DSPy - Stanford NLP's framework for systematic LM programming.
dspy
Build complex AI systems with declarative programming, optimize prompts automatically, create modular RAG systems and agents with DSPy - Stanford NLP's framework for systematic LM programming.
Prompt Refiner
Improves AI prompts to be clearer, more specific, and produce more consistent outputs.
dspy
DSPy: declarative LM programs, auto-optimize prompts, RAG.
encargo
Use when a raw prompt needs rewriting or sharpening, when the user says "rewrite this prompt", "make this prompt better", or asks for a prompt to hand to another agent. Also use before launching any autonomous, long-running, parallel or expensive run (/loop, subagent fan-out, worktrees, overnight work), and whenever a…