prompt-optimizer

Rewrites weak prompts into structured, testable prompts with variants and eval checklists.

2|1|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/dkyazzentwatwa/skill_starter_pack --skill prompt-optimizer-dkyazzentwatwa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-optimizer
Source: https://github.com/dkyazzentwatwa/skill_starter_pack/tree/main/prompt-optimizer
Command: npx skills add https://github.com/dkyazzentwatwa/skill_starter_pack --skill prompt-optimizer-dkyazzentwatwa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Prompts that are vague, under-specified, or inconsistent produce unreliable model outputs, and most users lack a systematic way to diagnose and fix them. This Skill turns rough prompts into clear, testable instructions with defined output formats and evaluation criteria. ## Core Features & Use Cases - Prompt Rewriting: Restructures prompts with explicit task, context, constraints, output format, and quality bar, adapted for OpenAI-style, Claude-style, or cross-model targets. - Failure Diagnosis: Identifies why a prompt underperforms, checking for ambiguous tasks, missing context, conflicting instructions, and weak output specifications. - Variants and Evals: Produces concise, high-control, or creative variants plus a 3-5 case eval checklist to compare original and optimized versions. - Use Case: A user pastes a failing extraction prompt; the Skill rewrites it with a strict JSON schema, edge-case handling, and a regression checklist to verify improvement. ## Quick Start Use the prompt-optimizer skill to rewrite this prompt so it produces consistent structured output and include a quick eval checklist.

Frequently Asked Questions about prompt-optimizer

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

FAQPage Schema
How do I improve a prompt that gives inconsistent results?

Inconsistent outputs usually come from missing output specifications or ambiguous instructions. Tighten the schema with explicit formats like JSON or labeled sections, add testable constraints such as length limits, and include examples where style or labels are hard to infer.

How to write a prompt for JSON extraction tasks?

Define the exact schema with keys, types, and enums, specify behavior for missing or ambiguous values such as using null, and forbid inventing facts. The extraction template in this Skill covers labels, edge cases, and unknown handling.

Should prompts be written differently for Claude vs GPT models?

Yes. Claude-style prompts benefit from XML tags separating instructions, context, and examples, while OpenAI-style prompts keep durable behavior in the system message and task details in the user message. Cross-model prompts should use plain labeled sections.

Why is my prompt being ignored by the model?

Requirements get ignored when they are buried late in the prompt, contradicted by other instructions, or phrased as vague adjectives. Move critical rules earlier, remove conflicting instructions, and convert soft requests into testable constraints.

How do I test whether an optimized prompt is actually better?

Run the original and optimized prompts on 3 to 10 representative cases including an edge case, then score outputs on instruction following, format compliance, and completeness. A prompt is better only if it improves results across multiple examples.