dspy-ruby

Solid

This skill should be used when working with DSPy.rb, a Ruby framework for building type-safe, composable LLM applications. Use this when implementing predictable AI features, creating LLM signatures and modules, configuring language model providers (OpenAI, Anthropic, Gemini, Ollama), building agent systems with tools, optimizing prompts, or testing LLM-powered functionality in Ruby applications.

AI & Automation 448 stars 121 forks Updated today NOASSERTION

Install

View on GitHub

Quality Score: 79/100

Stars 20%
88
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# DSPy.rb Expert ## Overview DSPy.rb is a Ruby framework that enables developers to **program LLMs, not prompt them**. Instead of manually crafting prompts, define application requirements through type-safe, composable modules that can be tested, optimized, and version-controlled like regular code. This skill provides comprehensive guidance on: - Creating type-safe signatures for LLM operations - Building composable modules and workflows - Configuring multiple LLM providers - Implementing agents with tools - Testing and optimizing LLM applications - Production deployment patterns ## Core Capabilities ### 1. Type-Safe Signatures Create input/output contracts for LLM operations with runtime type checking. **When to use**: Defining any LLM task, from simple classification to complex analysis. **Quick reference**: ```ruby class EmailClassificationSignature < DSPy::Signature description "Classify customer support emails" input do const :email_subject, String const :email_body, String end output do const :category, T.enum(["Technical", "Billing", "General"]) const :priority, T.enum(["Low", "Medium", "High"]) end end ``` **Templates**: See `assets/signature-template.rb` for comprehensive examples including: - Basic signatures with multiple field types - Vision signatures for multimodal tasks - Sentiment analysis signatures - Code generation signatures **Best practices**: - Always provide clear, specific descriptions - Use enums for constrained o...

Details

Author
davekilleen
Repository
davekilleen/Dex
Created
6 months ago
Last Updated
today
Language
Python
License
NOASSERTION

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

sota-llm-engineering

State-of-the-art LLM application engineering rules (mid-2026 baseline) for BUILDING and AUDITING LLM-powered features. Claude should use this skill whenever it is building, modifying, or reviewing anything that calls a language model — chat features, RAG pipelines, agents and tool use, structured extraction, classification, summarization, embeddings/vector search, evals and regression gates, prompt or context engineering, model selection/routing, fine-tuning decisions, or LLM cost/latency/observability work. Trigger keywords: LLM, AI feature, prompt, system prompt, context window, RAG, retrieval, embeddings, vector DB, rerank, chunking, agent, tool use, MCP, multi-agent, evals, golden set, LLM-as-judge, fine-tuning, model selection, routing, structured output, JSON schema, prompt caching, token budget, hallucination, grounding. Covers build-quality only — for prompt-injection/agent-security use sota-code-security rules/08 and sota-sandboxing rules/05.

8 Updated 2 days ago
martinholovsky
AI & Automation Solid

using-ldd

Use at the start of any conversation, and whenever the user mentions LDD, loss-driven development, loss, gradient, SGD on code, drift, refinement loop, outer loop, inner loop, method evolution, or says "LDD:" / "apply LDD". Establishes how to dispatch the ten LDD skills and when each fires. Must be the first skill considered in any coding task where LDD is available.

20 Updated today
CorvinLabs
AI & Automation Listed

llm-red-team

Systematic LLM red-teaming across the OWASP LLM Top 10 (2025). Use when assessing an LLM app, chatbot, RAG pipeline, or agent for prompt injection, data leakage, output-handling flaws, excessive agency, or unbounded consumption, and when producing a structured, evidence-backed red-team report.

0 Updated yesterday
fevziegeyurtsevenler