Abp Module
abpframework/abp
ABP reusable Module solution template - EF Core + MongoDB dual support, virtual methods for extensibility, DbTablePrefix, module options pattern, entity extension, separate connection string.
A skill your agent uses for creating custom DSPy modules, extending dspy.Module, reusable components, stateful modules, serialization, and module testing.
$ npx skills add OmidZamani/dspy-skills --skill dspy-custom-module-design -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install OmidZamani/dspy-skills dspy-custom-module-design --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/OmidZamani/dspy-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dspy-custom-module-design .claude/skills/dspy-custom-module-design && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "dspy-custom-module-design" agent skill from https://github.com/OmidZamani/dspy-skills/tree/master/skills/dspy-custom-module-design into .claude/skills/dspy-custom-module-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dspy-custom-module-design", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/OmidZamani/dspy-skills/tree/master/skills/dspy-custom-module-designType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add OmidZamani/dspy-skills --skill dspy-custom-module-design -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install OmidZamani/dspy-skills dspy-custom-module-design --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OmidZamani/dspy-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/dspy-custom-module-design .agents/skills/dspy-custom-module-design && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "dspy-custom-module-design" agent skill from https://github.com/OmidZamani/dspy-skills/tree/master/skills/dspy-custom-module-design into .agents/skills/dspy-custom-module-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dspy-custom-module-design", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add OmidZamani/dspy-skills --skill dspy-custom-module-design -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install OmidZamani/dspy-skills dspy-custom-module-design --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OmidZamani/dspy-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/dspy-custom-module-design .cursor/skills/dspy-custom-module-design && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "dspy-custom-module-design" agent skill from https://github.com/OmidZamani/dspy-skills/tree/master/skills/dspy-custom-module-design into .cursor/skills/dspy-custom-module-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dspy-custom-module-design", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/OmidZamani/dspy-skills.git --path skills/dspy-custom-module-design--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add OmidZamani/dspy-skills --skill dspy-custom-module-design -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install OmidZamani/dspy-skills dspy-custom-module-design --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OmidZamani/dspy-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/dspy-custom-module-design .gemini/skills/dspy-custom-module-design && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "dspy-custom-module-design" agent skill from https://github.com/OmidZamani/dspy-skills/tree/master/skills/dspy-custom-module-design into .gemini/skills/dspy-custom-module-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dspy-custom-module-design", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install OmidZamani/dspy-skills dspy-custom-module-designInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add OmidZamani/dspy-skills --skill dspy-custom-module-design -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/OmidZamani/dspy-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/dspy-custom-module-design .github/skills/dspy-custom-module-design && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "dspy-custom-module-design" agent skill from https://github.com/OmidZamani/dspy-skills/tree/master/skills/dspy-custom-module-design into .github/skills/dspy-custom-module-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dspy-custom-module-design", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add OmidZamani/dspy-skills --skill dspy-custom-module-design -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install OmidZamani/dspy-skills dspy-custom-module-design --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OmidZamani/dspy-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/dspy-custom-module-design .opencode/skills/dspy-custom-module-design && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "dspy-custom-module-design" agent skill from https://github.com/OmidZamani/dspy-skills/tree/master/skills/dspy-custom-module-design into .opencode/skills/dspy-custom-module-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dspy-custom-module-design", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
dspy-custom-module-designA skill your agent uses for creating custom DSPy modules, extending dspy.Module, reusable components, stateful modules, serialization, and module testing.
Dspy Custom Module Design is an agent skill from OmidZamani/dspy-skills. Use for creating custom DSPy modules, extending dspy.Module, reusable components, stateful modules, serialization, and module testing.
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `example.py`).
The repository describes itself as: Collection of Claude Skills for DSPy framework - program language models, optimize prompts, and build RAG pipelines systematically. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit f5db3b7. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteGlobGrepFrom allowed-tools in the SKILL.md frontmatter.
Ships script files (Python), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
dspy.aigithub.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Dspy Custom Module Design loads about 1.9k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 221 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from OmidZamani/dspy-skills at commit f5db3b7, republished under its MIT licence (© OmidZamani). 221 words, ~1,937 tokens.
.claude/skills/dspy-custom-module-design/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Design production-quality custom DSPy modules with proper architecture, state management, serialization, and testing patterns.
| Input | Type | Description |
|---|---|---|
task_description | str | What the module should do |
components | list | Sub-modules or predictors |
state | dict | Stateful attributes |
| Output | Type | Description |
|---|---|---|
custom_module | dspy.Module | Production-ready module |
All custom modules inherit from dspy.Module:
import dspy
class BasicQA(dspy.Module):
"""Simple question answering module."""
def __init__(self):
super().__init__()
self.predictor = dspy.Predict("question -> answer")
def forward(self, question):
"""Entry point for module execution."""
return self.predictor(question=question)
# Usage
dspy.configure(lm=dspy.LM("openai/gpt-4o-mini"))
qa = BasicQA()
result = qa(question="What is Python?")
print(result.answer)Modules can maintain state across calls:
import dspy
import logging
logger = logging.getLogger(__name__)
class StatefulRAG(dspy.Module):
"""RAG with query caching."""
def __init__(self, cache_size=100):
super().__init__()
self.retrieve = dspy.Retrieve(k=3)
self.generate = dspy.ChainOfThought("context, question -> answer")
self.cache = {}
self.cache_size = cache_size
def forward(self, question):
# Check cache
if question in self.cache:
return self.cache[question]
# Retrieve and generate
passages = self.retrieve(question).passages
result = self.generate(context=passages, question=question)
# Update cache with size limit
if len(self.cache) >= self.cache_size:
self.cache.pop(next(iter(self.cache)))
self.cache[question] = result
return resultProduction modules need robust error handling:
import dspy
from typing import Optional
import logging
logger = logging.getLogger(__name__)
class RobustClassifier(dspy.Module):
"""Classifier with validation."""
def __init__(self, valid_labels: list[str]):
super().__init__()
self.valid_labels = set(valid_labels)
self.classify = dspy.Predict("text -> label: str, confidence: float")
def forward(self, text: str) -> dspy.Prediction:
if not text or not text.strip():
return dspy.Prediction(label="unknown", confidence=0.0, error="Empty input")
try:
result = self.classify(text=text)
# Validate label
if result.label not in self.valid_labels:
result.label = "unknown"
result.confidence = 0.0
return result
except Exception as e:
logger.error(f"Classification failed: {e}")
return dspy.Prediction(label="unknown", confidence=0.0, error=str(e))Modules support save/load:
import dspy
# Save module state
module = MyCustomModule()
module.save("my_module.json")
# Load requires creating instance first, then loading state
loaded = MyCustomModule()
loaded.load("my_module.json")
# For loading entire programs (dspy>=2.6.0)
module.save("./my_module/", save_program=True)
loaded = dspy.load("./my_module/")import dspy
from typing import List, Optional
import logging
logger = logging.getLogger(__name__)
class ProductionRAG(dspy.Module):
"""Production-ready RAG with all best practices."""
def __init__(
self,
retriever_k: int = 5,
cache_enabled: bool = True,
cache_size: int = 1000
):
super().__init__()
# Configuration
self.retriever_k = retriever_k
self.cache_enabled = cache_enabled
self.cache_size = cache_size
# Components
self.retrieve = dspy.Retrieve(k=retriever_k)
self.generate = dspy.ChainOfThought("context, question -> answer")
# State
self.cache = {} if cache_enabled else None
self.call_count = 0
def forward(self, question: str) -> dspy.Prediction:
"""Execute RAG pipeline with caching."""
self.call_count += 1
# Validation
if not question or not question.strip():
return dspy.Prediction(
answer="Please provide a valid question.",
error="Invalid input"
)
# Cache check
if self.cache_enabled and question in self.cache:
logger.info(f"Cache hit (call #{self.call_count})")
return self.cache[question]
# Execute pipeline
try:
passages = self.retrieve(question).passages
if not passages:
logger.warning("No passages retrieved")
return dspy.Prediction(
answer="No relevant information found.",
passages=[]
)
result = self.generate(context=passages, question=question)
result.passages = passages
# Update cache
if self.cache_enabled:
self._update_cache(question, result)
return result
except Exception as e:
logger.error(f"RAG execution failed: {e}")
return dspy.Prediction(
answer="An error occurred while processing your question.",
error=str(e)
)
def _update_cache(self, key: str, value: dspy.Prediction):
"""Manage cache with size limit."""
if len(self.cache) >= self.cache_size:
self.cache.pop(next(iter(self.cache)))
self.cache[key] = value
def clear_cache(self):
"""Clear cache."""
if self.cache_enabled:
self.cache.clear()© OmidZamani, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in skills/dspy-custom-module-design of OmidZamani/dspy-skills.
Open the folder on GitHubat commit f5db3b7
Dspy Custom Module Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Dspy Custom Module Design this skillOmidZamani/dspy-skills | 123 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Abp Moduleabpframework/abp | 14k | — | ~1.6k | Automated safety check: Pass | LGPL-3.0 | |
| DSPy Language Model ProgrammingOrchestra-Research/AI-Research-SKILLs | 13k | 9 repos | ~3.8k | Automated safety check: Pass | MIT | |
| Es Modulesthedaviddias/Front-End-Checklist | 74k | — | ~482 | Automated safety check: Pass | MIT | |
| Terraform Module Librarywshobson/agents | 40k | 11 repos | ~1.3k | Automated safety check: Pass | MIT | |
| Splitting Oversized ModulesPostHog/posthog | 40k | — | ~2.2k | Automated safety check: Pass | Custom licence |
abpframework/abp
ABP reusable Module solution template - EF Core + MongoDB dual support, virtual methods for extensibility, DbTablePrefix, module options pattern, entity extension, separate connection string.
Orchestra-Research/AI-Research-SKILLs
Teaches an agent to build LM pipelines, RAG systems and agents in DSPy using signatures, modules and optimizers instead of hand-tuned prompts.
thedaviddias/Front-End-Checklist
A skill your agent uses when reviewing scripts, client components, bundles, or runtime behavior related to Use ES modules (import/export).
wshobson/agents
Build reusable, tested Terraform modules for AWS, Azure, GCP and OCI, with a standard file layout, an AWS VPC example, versioning rules and Terratest checks.
PostHog/posthog
Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior.
JetBrains/intellij-community
Extract optional plugin dependencies into IntelliJ content modules.
OmidZamani/dspy-skills
A skill your agent uses when you need to QA audit and fix a plugin skill file.
OmidZamani/dspy-skills
A skill your agent uses for integrating DSPy with Haystack, optimizing Haystack prompts, improving retrieval pipelines, and extracting DSPy prompts.
OmidZamani/dspy-skills
A skill your agent uses for DSPy adapter selection, JSONAdapter, XMLAdapter, ChatAdapter, native function calling, structured outputs, and multimodal inputs like dspy.Image or dspy.Audio.
OmidZamani/dspy-skills
A skill your agent uses for composing DSPy modules with Ensemble, MultiChainComparison, ensemble voting, sequential pipelines, and multi-program workflows.
OmidZamani/dspy-skills
A skill your agent uses for BetterTogether, prompt plus weight optimization, fine-tuning sequences, and strategy chains like p - w - p.
OmidZamani/dspy-skills
A skill your agent uses for BootstrapFewShot, bootstrapped demonstrations, teacher-model demos, and low-data DSPy prompt optimization.
A skill your agent uses for creating custom DSPy modules, extending dspy.Module, reusable components, stateful modules, serialization, and module testing. Dspy Custom Module Design is an agent skill from OmidZamani/dspy-skills.Module, reusable components, stateful modules, serialization, and module testing.
Dspy Custom Module Design fits situations like: creating custom DSPy modules; extending dspy.Module; reusable components; stateful modules.
Run `npx skills add OmidZamani/dspy-skills --skill dspy-custom-module-design -a claude-code`. Or copy the skill folder (skills/dspy-custom-module-design in OmidZamani/dspy-skills) into .claude/skills/dspy-custom-module-design in your project. Claude Code loads it when a task matches its description.
Run `npx skills add OmidZamani/dspy-skills --skill dspy-custom-module-design -a codex`. Or copy the skill folder (skills/dspy-custom-module-design in OmidZamani/dspy-skills) into .agents/skills/dspy-custom-module-design in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OmidZamani/dspy-skills --skill dspy-custom-module-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dspy-custom-module-design, .gemini/skills/dspy-custom-module-design, .github/skills/dspy-custom-module-design and .opencode/skills/dspy-custom-module-design in your project.
Going by SKILL.md and its folder, Dspy Custom Module Design needs Python for the scripts in its folder. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Glob, Grep.
SKILL.md names 2 domains. As links in the text: dspy.ai and github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Dspy Custom Module Design is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Dspy Custom Module Design: Abp Module (abpframework/abp, 14k stars), DSPy Language Model Programming (Orchestra-Research/AI-Research-SKILLs, 13k stars), Es Modules (thedaviddias/Front-End-Checklist, 74k stars) and Terraform Module Library (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
OmidZamani (a GitHub user) maintains it in OmidZamani/dspy-skills, which has 123 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on June 23, 2026.
Source: OmidZamani/dspy-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.