prompt-engineering-dspy — Claude Code skill: features and installation
Learn to structure language-model tasks with DSPy, assemble RAG workflows, and tune modules from examples. Useful when a project needs more than a hand-written prompt.
npx claude-code-templates@latest --skill ai-research/prompt-engineering-dspyWhat prompt-engineering-dspy does
This skill introduces DSPy as a way to define model tasks through their inputs and outputs. You can combine those task definitions into workflows for question answering, retrieval, and tool-using agents.
The examples cover Predict, ChainOfThought, and ReAct, along with optimizers that use training examples to adjust modules. RAG examples retrieve context before generating an answer. The listed dependencies are dspy, openai, and anthropic; model-based examples also configure a language model. Optimizers need training examples to work from.
What it helps with
- Define inputs and outputs for a language-model task
- Build a retrieval-and-answer workflow
- Give a DSPy agent a search tool
- Tune a module using training examples
Example prompts for the agent
- Design a DSPy workflow that retrieves context before answering a question.
- Show me how to use
ChainOfThoughtfor a word problem. - Add a search tool to this DSPy agent and show how to pass it a query.
How to install prompt-engineering-dspy
1claude-code-templates
npx claude-code-templates@latest --skill ai-research/prompt-engineering-dspy2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill prompt-engineering-dspy -a claude-code3Manually: put the files in place
~/.claude/skills/prompt-engineering-dspy/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/prompt-engineering-dspy/
Manually: put the files in place
.agents/skills/prompt-engineering-dspy/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/prompt-engineering-dspy/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates prompt-engineering-dspy2Manually: put the files in place
.github/skills/prompt-engineering-dspy/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/prompt-engineering-dspyManually: put the files in place
.devin/skills/prompt-engineering-dspy/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about prompt-engineering-dspy
How do I install prompt-engineering-dspy in Claude Code?
Run npx claude-code-templates@latest --skill ai-research/prompt-engineering-dspy. This is one listed installation method.
What does prompt-engineering-dspy do?
It explains how to structure language-model tasks with DSPy, combine modules into RAG workflows or agents, and tune modules using examples.
Which dependencies do the DSPy examples use?
The listed dependencies are dspy, openai, and anthropic. The model examples also configure a language model.