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.
Scanned 6/8/2026
Install via CLI
openskills install agentskillexchange/skills---
name: "Optimize prompt and agent pipelines with DSPy programs and evaluators"
slug: "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."
github_stars: 34308
verification: "security_reviewed"
source: "https://github.com/stanfordnlp/dspy"
author: "Stanford NLP"
publisher_type: "open_source_project"
category: "Code Quality & Review"
framework: "Multi-Framework"
tool_ecosystem:
github_repo: "stanfordnlp/dspy"
github_stars: 34308
---
# Optimize prompt and agent pipelines with DSPy programs and evaluators
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.
## Prerequisites
Python, DSPy, task examples, scoring metric or evaluator, target LLM provider credentials
## Installation
Use the upstream install or setup path that matches your environment:
- pip install dspy
- pip install git+https://github.com/stanfordnlp/dspy.git
Requirements and caveats from upstream:
- 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...
Basic usage or getting-started notes:
- bash
- To install the very latest from main:
- ## 📜 Citation & Reading More
- Source: https://github.com/stanfordnlp/dspy
- Extracted from upstream docs: https://raw.githubusercontent.com/stanfordnlp/dspy/HEAD/README.md
## Documentation
- https://dspy.ai/
## Source
- [Agent Skill Exchange](https://agentskillexchange.com/skills/optimize-prompt-and-agent-pipelines-with-dspy-programs-and-evaluators/)
No comments yet. Be the first to comment!
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...
**Complete production-ready guide for Google Gemini embeddings API** This skill provides comprehensive coverage of the `gemini-embedding-001` model for generating text embeddings, including SDK usage, REST API patterns, batch processing, RAG integration with Cloudflare Vectorize, and advanced use cases like semantic search and document clustering. ---
Interview, source-challenge, verify, save, and ADR-gate fuzzy coding requests into Codex-ready implementation specs. Use when a feature, bugfix, refactor, migration, repo-wide change, or architecture task needs user-verified requirements, source-backed decisions, durable architecture decisions, acceptance criteria, validation commands, rollout notes, saved spec/ADR files, and a Codex execution prompt. Do not use when already fully specified or when the user wants direct implementation now.
Use when a repo needs CodeGraph plus ast-grep for Codex MCP setup, exploration, impact analysis, structural search, or safe refactor planning.