dspy-bootstrap-fewshot
This skill should be used when the user asks to "bootstrap few-shot examples", "generate demonstrations", "use BootstrapFewShot", "optimize with limited data", "create training demos automatically", mentions "teacher model for few-shot", "10-50 training examples", or wants automatic demonstration generation for a DSPy program without extensive compute.
npx skills add majiayu000/claude-skill-registry --skill dspy-bootstrap-fewshot --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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](../dspy-miprov2-optimizer/SKILL.md) - For agentic systems: [dspy-gepa-reflective](../dspy-gepa-reflective/SKILL.md) - Measure improvements: [dspy-evaluation-suite](../dspy-evaluation-suite/SKILL.md) ## 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_s
- Goal
- When to Use
- Related Skills
- Inputs
- Outputs
- Workflow
- Phase 1: Setup
- Phase 2: Define Program and Metric
- Phase 3: Compile
- Phase 4: Use and Save
- Production Example
- Best Practices
- Limitations
- Official Documentation
What does the dspy-bootstrap-fewshot skill do?
This skill should be used when the user asks to "bootstrap few-shot examples", "generate demonstrations", "use BootstrapFewShot", "optimize with limited data", "create training demos automatically", mentions "teacher model for few-shot", "10-50 training examples", or wants automatic demonstration generation for a DSPy program without extensive compute.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill dspy-bootstrap-fewshot --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
