/ Annuaire / Playground / dspy-skills
● Communauté OmidZamani ⚡ Instantané

dspy-skills

par OmidZamani · OmidZamani/dspy-skills

Claude skills pack for DSPy — program language models, optimize prompts, build RAG pipelines systematically.

dspy-skills teaches Claude the DSPy mental model: signatures, modules, predictors, teleprompters, and evaluation loops. Instead of hand-crafting prompts, you describe the task via signatures and let DSPy's optimizers do the work — and Claude writes the DSPy code idiomatically rather than resorting to raw prompt templates.

Pourquoi l'utiliser

Fonctionnalités clés

Démo en direct

Aperçu en pratique

dspy-skill.replay ▶ prêt
0/0

Installer

Choisissez votre client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "dspy-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/OmidZamani/dspy-skills",
        "~/.claude/skills/dspy-skills"
      ],
      "_inferred": true
    }
  }
}

Ouvrez Claude Desktop → Settings → Developer → Edit Config. Redémarrez après avoir enregistré.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "dspy-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/OmidZamani/dspy-skills",
        "~/.claude/skills/dspy-skills"
      ],
      "_inferred": true
    }
  }
}

Cursor utilise le même schéma mcpServers que Claude Desktop. La config projet l'emporte sur la globale.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "dspy-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/OmidZamani/dspy-skills",
        "~/.claude/skills/dspy-skills"
      ],
      "_inferred": true
    }
  }
}

Cliquez sur l'icône MCP Servers dans la barre latérale Cline, puis "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "dspy-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/OmidZamani/dspy-skills",
        "~/.claude/skills/dspy-skills"
      ],
      "_inferred": true
    }
  }
}

Même format que Claude Desktop. Redémarrez Windsurf pour appliquer.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "dspy-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/OmidZamani/dspy-skills",
        "~/.claude/skills/dspy-skills"
      ]
    }
  ]
}

Continue utilise un tableau d'objets serveur plutôt qu'une map.

~/.config/zed/settings.json
{
  "context_servers": {
    "dspy-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/OmidZamani/dspy-skills",
          "~/.claude/skills/dspy-skills"
        ]
      }
    }
  }
}

Ajoutez dans context_servers. Zed recharge à chaud à la sauvegarde.

claude mcp add dspy-skill -- git clone https://github.com/OmidZamani/dspy-skills ~/.claude/skills/dspy-skills

Une seule ligne. Vérifiez avec claude mcp list. Supprimez avec claude mcp remove.

Cas d'usage

Usages concrets : dspy-skills

How to build your first DSPy program and optimize it

👤 ML engineers and applied researchers ⏱ ~90 min advanced

Quand l'utiliser : You have a task where prompt quality matters and want a systematic way to improve it.

Prérequis
  • Python 3.10+ with dspy-ai installed — pip install dspy-ai
  • Skill cloned — git clone https://github.com/OmidZamani/dspy-skills ~/.claude/skills/dspy-skills
Déroulement
  1. Define the signature
    Task: classify support tickets into {billing, technical, account}. Give me a DSPy signature and a simple Predict module.✓ Copié
    → Signature + module code
  2. Write an eval
    Add an evaluation set of 50 labeled examples and an accuracy metric.✓ Copié
    → Eval harness with metric callable
  3. Optimize
    Run BootstrapFewShot to compile the module against the eval set.✓ Copié
    → Compiled predictor + improved score

Résultat : A DSPy-optimized predictor that beats a hand-written prompt, with reproducible code.

Pièges
  • Eval too small — optimizer overfits — Minimum 100–200 examples; hold out a true test set
  • Metric doesn't capture what you care about — Spend on metric design before on model choice
Combiner avec : filesystem

Build a RAG pipeline with DSPy

👤 Engineers building retrieval-augmented systems ⏱ ~120 min advanced

Quand l'utiliser : You want modular, optimizable RAG rather than a hand-wired chain.

Déroulement
  1. Define the modules
    Create a DSPy RAG pipeline: RetrieveThenRead with ColBERTv2 or a local retriever.✓ Copié
    → Modular pipeline with separate retrieval and generation
  2. Optimize end-to-end
    Write an eval on our QA set and run MIPRO to improve.✓ Copié
    → Compiled pipeline with score delta

Résultat : A RAG pipeline you can improve by changing the eval, not by rewriting prompts.

Pièges
  • Retriever quality caps end-to-end quality — Evaluate retrieval separately (recall@k) before optimizing generation
Combiner avec : local-rag

Combinaisons

Associez-le à d'autres MCPs pour un effet X10

dspy-skill + local-rag

Plug a local retriever into DSPy's RAG modules

Swap the ColBERT retriever for a local-rag MCP as the retrieval source.✓ Copié
dspy-skill + filesystem

Organize DSPy programs, evals, and artifacts in a repo

Lay out a DSPy project with programs/, evals/, and artifacts/ directories.✓ Copié

Outils

Ce que ce MCP expose

OutilEntréesQuand appelerCoût
signature-design task spec Start of any DSPy program 0
module-authoring signatures + flow After signatures 0
teleprompter-optimization module + eval After eval is ready LLM tokens during optimization
evaluation-harness task data Before optimizing 0

Coût et limites

Coût d'exécution

Quota d'API
LLM tokens dominate during optimization runs
Tokens par appel
Can be high — optimizations may invoke the LLM hundreds of times
Monétaire
depends on provider
Astuce
Use cheap models during teleprompter runs, upgrade only for final evaluation

Sécurité

Permissions, secrets, portée

Stockage des identifiants : LLM provider keys in env vars
Sortie de données : LLM provider endpoints

Dépannage

Erreurs courantes et correctifs

Teleprompter seems to make things worse

Check metric correctness; use a held-out set; widen the example pool.

Optimization eats your budget

Cap max_bootstrapped_demos and use cheaper models during search.

Alternatives

dspy-skills vs autres

AlternativeQuand l'utiliserCompromis
prompt-architect-skillYou want prompt-level craft, not DSPy's programmatic approachHand-crafted vs optimized

Plus

Ressources

📖 Lire le README officiel sur GitHub

🐙 Voir les issues ouvertes

🔍 Parcourir les 400+ serveurs MCP et Skills