{"id":"63d1f765-ddfe-49a9-a0f6-2dedeb6b01cd","shortId":"K2C7kN","kind":"skill","title":"Optimize prompt and agent pipelines with DSPy programs and evaluators","tagline":"Use DSPy to define modular LLM programs, metrics, and evaluation sets so an agent can optimize prompts and pipeline behavior with measurable feedback instead of ad hoc prompt editing.","description":"# Optimize prompt and agent pipelines with DSPy programs and evaluators\n\nUse DSPy to define modular LLM programs, metrics, and evaluation sets so an agent can optimize prompts and pipeline behavior with measurable feedback instead of ad hoc prompt editing.\n\n## Prerequisites\n\nPython, DSPy, task examples, scoring metric or evaluator, target LLM provider credentials\n\n## Installation\n\nUse the upstream install or setup path that matches your environment:\n- pip install dspy\n- pip install git+https://github.com/stanfordnlp/dspy.git\n\nRequirements and caveats from upstream:\n- DSPy stands for Declarative Self-improving Python. Instead of brittle prompts, you write compositional _Python code_ and use DSPy to **teach your LM to deliver high-quality outputs**. Learn more via our [official docu...\n\nBasic usage or getting-started notes:\n- bash\n- To install the very latest from main:\n- ## 📜 Citation & Reading More\n\n- Source: https://github.com/stanfordnlp/dspy\n- Extracted from upstream docs: https://raw.githubusercontent.com/stanfordnlp/dspy/HEAD/README.md\n\n## Documentation\n\n- https://dspy.ai/\n\n## Source\n\n- [Agent Skill Exchange](https://agentskillexchange.com/skills/optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators/)","tags":["optimize","prompt","and","agent","pipelines","with","dspy","programs","evaluators","skills","agentskillexchange","agent-skills"],"capabilities":["skill","source-agentskillexchange","skill-optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators","topic-agent-skills","topic-ai-agents","topic-ai-tools","topic-awesome-list","topic-claude-code","topic-codex","topic-cursor","topic-llm","topic-mcp","topic-npx-skills","topic-openclaw","topic-skills-catalog"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/agentskillexchange/skills/optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add agentskillexchange/skills","source_repo":"https://github.com/agentskillexchange/skills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (1,242 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:11:35.582Z","embedding":null,"createdAt":"2026-05-18T13:18:09.550Z","updatedAt":"2026-05-18T19:11:35.582Z","lastSeenAt":"2026-05-18T19:11:35.582Z","tsv":"'/skills/optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators/)':191 '/stanfordnlp/dspy':175 '/stanfordnlp/dspy.git':112 '/stanfordnlp/dspy/head/readme.md':182 'ad':36,75 'agent':4,24,43,63,186 'agentskillexchange.com':190 'agentskillexchange.com/skills/optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators/)':189 'bash':161 'basic':154 'behavior':30,69 'brittl':128 'caveat':115 'citat':169 'code':134 'composit':132 'credenti':91 'declar':121 'defin':14,53 'deliv':143 'doc':179 'docu':153 'document':183 'dspi':7,12,46,51,81,106,118,137 'dspy.ai':184 'edit':39,78 'environ':103 'evalu':10,20,49,59,87 'exampl':83 'exchang':188 'extract':176 'feedback':33,72 'get':158 'getting-start':157 'git':109 'github.com':111,174 'github.com/stanfordnlp/dspy':173 'github.com/stanfordnlp/dspy.git':110 'high':145 'high-qual':144 'hoc':37,76 'improv':124 'instal':92,96,105,108,163 'instead':34,73,126 'latest':166 'learn':148 'llm':16,55,89 'lm':141 'main':168 'match':101 'measur':32,71 'metric':18,57,85 'modular':15,54 'note':160 'offici':152 'optim':1,26,40,65 'output':147 'path':99 'pip':104,107 'pipelin':5,29,44,68 'prerequisit':79 'program':8,17,47,56 'prompt':2,27,38,41,66,77,129 'provid':90 'python':80,125,133 'qualiti':146 'raw.githubusercontent.com':181 'raw.githubusercontent.com/stanfordnlp/dspy/head/readme.md':180 'read':170 'requir':113 'score':84 'self':123 'self-improv':122 'set':21,60 'setup':98 'skill':187 'skill-optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators' 'sourc':172,185 'source-agentskillexchange' 'stand':119 'start':159 'target':88 'task':82 'teach':139 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-tools' 'topic-awesome-list' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-llm' 'topic-mcp' 'topic-npx-skills' 'topic-openclaw' 'topic-skills-catalog' 'upstream':95,117,178 'usag':155 'use':11,50,93,136 'via':150 'write':131","prices":[{"id":"c5952c8e-dabc-4cfe-8a24-faf0990c5517","listingId":"63d1f765-ddfe-49a9-a0f6-2dedeb6b01cd","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"agentskillexchange","category":"skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:18:09.550Z"}],"sources":[{"listingId":"63d1f765-ddfe-49a9-a0f6-2dedeb6b01cd","source":"github","sourceId":"agentskillexchange/skills/optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators","sourceUrl":"https://github.com/agentskillexchange/skills/tree/main/skills/optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators","isPrimary":false,"firstSeenAt":"2026-05-18T13:18:09.550Z","lastSeenAt":"2026-05-18T19:11:35.582Z"}],"details":{"listingId":"63d1f765-ddfe-49a9-a0f6-2dedeb6b01cd","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"agentskillexchange","slug":"optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators","github":{"repo":"agentskillexchange/skills","stars":8,"topics":["agent-skills","ai-agents","ai-tools","awesome-list","claude-code","codex","cursor","llm","mcp","npx-skills","openclaw","skills-catalog"],"license":"mit","html_url":"https://github.com/agentskillexchange/skills","pushed_at":"2026-05-18T19:02:17Z","description":"The open catalog of AI agent skills — 2,000+ security-scanned skills for Claude Code, Cursor, Codex, and more.","skill_md_sha":"a45e746a4ae5deba9bade8c3325ebbe0f11f1fe9","skill_md_path":"skills/optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/agentskillexchange/skills/tree/main/skills/optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators"},"layout":"multi","source":"github","category":"skills","frontmatter":{"name":"Optimize prompt and agent pipelines with DSPy programs and evaluators","description":"Use DSPy to define modular LLM programs, metrics, and evaluation sets so an agent can optimize prompts and pipeline behavior with measurable feedback instead of ad hoc prompt editing."},"skills_sh_url":"https://skills.sh/agentskillexchange/skills/optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators"},"updatedAt":"2026-05-18T19:11:35.582Z"}}