/ Каталог / Песочница / dspy-skills
● Сообщество OmidZamani ⚡ Сразу

dspy-skills

автор 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.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

dspy-skill.replay ▶ готово
0/0

Установка

Выберите клиент

~/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
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.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 использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

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
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "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
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

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

Continue использует массив объектов серверов, а не map.

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

Добавьте в context_servers. Zed перезагружается автоматически.

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

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: dspy-skills

How to build your first DSPy program and optimize it

👤 ML engineers and applied researchers ⏱ ~90 min advanced

Когда использовать: You have a task where prompt quality matters and want a systematic way to improve it.

Предварительные требования
  • 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
Поток
  1. Define the signature
    Task: classify support tickets into {billing, technical, account}. Give me a DSPy signature and a simple Predict module.✓ Скопировано
    → Signature + module code
  2. Write an eval
    Add an evaluation set of 50 labeled examples and an accuracy metric.✓ Скопировано
    → Eval harness with metric callable
  3. Optimize
    Run BootstrapFewShot to compile the module against the eval set.✓ Скопировано
    → Compiled predictor + improved score

Итог: A DSPy-optimized predictor that beats a hand-written prompt, with reproducible code.

Подводные камни
  • 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
Сочетать с: filesystem

Build a RAG pipeline with DSPy

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

Когда использовать: You want modular, optimizable RAG rather than a hand-wired chain.

Поток
  1. Define the modules
    Create a DSPy RAG pipeline: RetrieveThenRead with ColBERTv2 or a local retriever.✓ Скопировано
    → Modular pipeline with separate retrieval and generation
  2. Optimize end-to-end
    Write an eval on our QA set and run MIPRO to improve.✓ Скопировано
    → Compiled pipeline with score delta

Итог: A RAG pipeline you can improve by changing the eval, not by rewriting prompts.

Подводные камни
  • Retriever quality caps end-to-end quality — Evaluate retrieval separately (recall@k) before optimizing generation
Сочетать с: local-rag

Комбинации

Сочетайте с другими MCP — эффект 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.✓ Скопировано
dspy-skill + filesystem

Organize DSPy programs, evals, and artifacts in a repo

Lay out a DSPy project with programs/, evals/, and artifacts/ directories.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
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

Стоимость и лимиты

Во что обходится

Квота API
LLM tokens dominate during optimization runs
Токенов на вызов
Can be high — optimizations may invoke the LLM hundreds of times
Деньги
depends on provider
Совет
Use cheap models during teleprompter runs, upgrade only for final evaluation

Безопасность

Права, секреты, радиус поражения

Хранение учётных данных: LLM provider keys in env vars
Исходящий трафик: LLM provider endpoints

Устранение неполадок

Частые ошибки и исправления

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.

Альтернативы

dspy-skills в сравнении

АльтернативаКогда использоватьКомпромисс
prompt-architect-skillYou want prompt-level craft, not DSPy's programmatic approachHand-crafted vs optimized

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills