prompt-optimizer

Optimize failing skill prompts with DSPy and write results to SKILL.md.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/Exia-thd/Digital-Nervous --skill prompt-optimizer-exia-thd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-optimizer
Source: https://github.com/Exia-thd/Digital-Nervous/tree/main/skills/prompt-optimizer
Command: npx skills add https://github.com/Exia-thd/Digital-Nervous --skill prompt-optimizer-exia-thd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Prompt Optimizer reduces the cycle time and waste in refining skill prompts by algorithmically optimizing prompts and few-shot examples using the DSPy framework, translating subjective improvements into verifiable, compiled LLM instructions.

Core Features & Use Cases

  • Automated Prompt Optimization: Rewrites failing skill prompts with deterministic DSPy-based planning and metrics.
  • Deterministic Evaluation: Uses a defined metric to validate plan quality and compile optimized prompts.
  • Migration & Extension: Helps migrate static SKILL.md logic into dynamic dspy.Module implementations and auto-generate new examples for new skills.
  • Use Case: When a skill's plan quality loops flag failures, DSPy optimization rebuilds prompts to maximize pass rates.

Quick Start

Run the DSPy teleprompter on a failing skill to produce an optimized prompt and update its SKILL.md with the new few-shot examples.

Frequently Asked Questions about prompt-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does DSPy prompt optimization improve failing skill prompts?

DSPy prompt optimization improves failing skill prompts by using a teleprompter to compile instructions and auto-generate few-shot examples, applying a deterministic metric to validate plan quality and maximize pass rates.

What is the best way to migrate static SKILL.md logic to dynamic DSPy modules?

Migrating static SKILL.md logic to dynamic DSPy modules involves algorithmically translating subjective prompt improvements into verifiable instructions, automatically generating few-shot examples, and writing optimized results back into the file.

How do I fix skill prompts stuck in plan-quality loop failures?

Fix skill prompts stuck in plan-quality loop failures by running a DSPy teleprompter with a defined deterministic metric to evaluate and rebuild the instructions, updating the target SKILL.md with optimized few-shot examples.

Can I automatically generate few-shot examples for new skills using DSPy?

Yes, you can automatically generate few-shot examples for new skills using the DSPy framework, which uses deterministic evaluation to compile validated examples and writes them directly back into your target skill configuration.

Does prompt-optimizer require manual metric definition to compile prompts?

Yes, effective prompt-optimizer compilation requires defining a deterministic metric to validate plan quality, ensuring the DSPy teleprompter can algorithmically evaluate and maximize pass rates for failing skills.