prompt-optimizer

daymade/claude-code-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/daymade/claude-code-skills --skill prompt-optimizer
0 commentsdiscussion
summary

Transform vague prompts into precise, testable specifications using EARS methodology and domain theory grounding.

  • Converts natural language requirements into five EARS patterns (ubiquitous, event-driven, state-driven, conditional, unwanted behavior) with explicit triggers, conditions, and measurable criteria
  • Applies relevant domain frameworks (GTD, BJ Fogg, Gestalt, Zero Trust, etc.) to enhance requirements with established best practices
  • Generates structured prompts using Role/Skill
skill.md

Prompt Optimizer

Overview

Optimize vague prompts into precise, actionable specifications using EARS (Easy Approach to Requirements Syntax) - a Rolls-Royce methodology for transforming natural language into structured, testable requirements.

Methodology inspired by: This skill's approach to combining EARS with domain theory grounding was inspired by 阿星AI工作室 (A-Xing AI Studio), which demonstrated practical EARS application for prompt enhancement.

Four-layer enhancement process:

  1. EARS syntax transformation - Convert descriptive language to normative specifications
  2. Domain theory grounding - Apply relevant industry frameworks (GTD, BJ Fogg, Gestalt, etc.)
  3. Example extraction - Surface concrete use cases with real data
  4. Structured prompt generation - Format using Role/Skills/Workflows/Examples/Formats framework

When to Use

Apply when:

  • User provides vague feature requests ("build a dashboard", "create a reminder app")
  • Requirements lack specific conditions, triggers, or measurable outcomes
  • Natural language descriptions need conversion to testable specifications
  • User explicitly requests prompt optimization or requirement refinement

Six-Step Optimization Workflow

Step 1: Analyze Original Requirement

Identify weaknesses:

  • Overly broad - "Add user authentication" → Missing password requirements, session management
  • Missing triggers - "Send notifications" → Missing when/why notifications trigger
  • Ambiguous actions - "Make it user-friendly" → No measurable usability criteria
  • No constraints - "Process payments" → Missing security, compliance requirements

Step 2: Apply EARS Transformation

Convert requirements to EARS patterns. See references/ears_syntax.md for complete syntax rules.

Five core patterns:

  1. Ubiquitous: The system shall <action>
  2. Event-driven: When <trigger>, the system shall <action>
  3. State-driven: While <state>, the system shall <action>
  4. Conditional: If <condition>, the system shall <action>
  5. Unwanted behavior: If <condition>, the system shall prevent <unwanted action>

Quick example:

Before: "Create a reminder app with task management"

After (EARS):
1. When user creates a task, the system shall guide decomposition into executable sub-tasks
2. When task deadline is within 30 minutes AND user has not started, the system shall send notification with sound alert
3. When user completes a sub-task, the system shall update progress and provide positive feedback

Transformation checklist:

  • Identify implicit conditions and make explicit
  • Specify triggering events or states
  • Use precise action verbs (shall, must, should)
  • Add measurable criteria ("within 30 minutes", "at least 8 characters")
  • Break compound requirements into atomic statements
  • Remove ambiguous language ("user-friendly", "fast")

Step 3: Identify Domain Theories

Match requirements to established frameworks. See references/domain_theories.md for full catalog.

Common domain mappings:

  • Productivity → GTD, Pomodoro, Eisenhower Matrix
  • Behavior Change → BJ Fogg Model (B=MAT), Atomic Habits
  • UX Design → Hick's Law, Fitts's Law, Gestalt Principles
  • Security → Zero Trust, Defense in Depth, Privacy by Design

Selection process:

  1. Identify primary domain from requirement keywords
  2. Match to 2-4 complementary theories
  3. Apply theory principles to specific features
  4. Cite theories in enhanced prompt for credibility

Step 4: Extract Concrete Examples

Generate specific examples with real data:

  • User scenarios: "When user logs in on mobile device..."
  • Data examples: "Product: 'Laptop', Price: $999, Stock: 15"
  • Workflow examples: "Task: Write report → Sub-tasks: Research (2h), Draft (3h), Edit (1h)"

Examples must be realistic, specific, varied (success/error/edge cases), and testable.

Step 5: Generate Enhanced Prompt

Structure using the standard framework:

# Role
[Specific expert role with domain expertise]

## Skills
- [Core capability 1]
- [Core capability 2]
[List 5-8 skills aligned with domain theories]

## Workflows
1. [Phase 1] - [Key activities]
2. [Phase 2] - [Key activities]
[Complete step-by-step process]

## Examples
[Concrete examples with real data, not placeholders]

## Formats
[Precise output specifications:
- File types, structure requirements
- Design/styling expectations
- Technical constraints
- Deliverable checklist]

Quality criteria:

  • Role specificity: "Product designer specializing in time management apps" > "Designer"
  • Theory grounding: Reference frameworks explicitly
  • Actionable workflows: Clear inputs/outputs and decision points
  • Concrete examples: Real data, not "Example 1", "Example 2"
  • Measurable formats: Specific requirements, not "good design"

Step 6: Present Optimization Results

Output in structured format:

## Original Requirement
[User's vague requirement]

**Identified Issues:**
- [Issue 1: e.g., "Lacks specific trigger conditions"]
- [Issue 2: e.g., "No measurable success criteria"]

## EARS Transformation
[Numbered list of EARS-formatted requirements]

## Domain & Theories
**Primary Domain:** [e.g., Authentication Security]

**Applicable Theories:**
- **[Theory 1]** - [Brief relevance]
- **[Theory 2]** - [Brief relevance]

## Enhanced Prompt
[Complete Role/Skills/Workflows/Examples/Formats prompt]

---

**How to use:**
[Brief guidance on applying the prompt]

Advanced Techniques

For complex scenarios, see references/advanced_techniques.md:

  • Multi-stakeholder requirements - EARS statements for each user type
  • Non-functional requirements - Performance, security, scalability with quantified thresholds
  • Complex conditional logic - Nested conditions with boolean operators

Quick Reference

Do's: ✅ Break down compound requirements (one EARS statement per requirement) ✅ Specify measurable criteria (numbers, timeframes, percentages) ✅ Include error/edge cases ✅ Ground in established theories ✅ Use concrete examples with real data

Don'ts: ❌ Avoid vague language ("fast", "user-friendly") ❌ Don't assume implicit knowledge ❌ Don't mix multiple actions in one statement ❌ Don't use placeholders in examples

Resources

Load these reference files as needed:

  • references/ears_syntax.md - Complete EARS syntax rules, all 5 patterns, transformation guidelines, benefits
  • references/domain_theories.md - 40+ theories mapped to 10 domains (productivity, UX, gamification, learning, e-commerce, security, etc.)
  • references/examples.md - Four complete transformation examples (procrastination app, e-commerce product page, learning dashboard, password reset security) with before/after comparisons and reusable template
  • references/advanced_techniques.md - Multi-stakeholder requirements, non-functional specs, complex conditional logic patterns

When to load references:

  • EARS syntax clarification needed → ears_syntax.md
  • Domain theory selection requires extensive options → domain_theories.md
  • User requests multiple optimization examples → examples.md
  • Complex requirements with multiple stakeholders or non-functional specs → advanced_techniques.md
how to use prompt-optimizer

How to use prompt-optimizer on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add prompt-optimizer
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/daymade/claude-code-skills --skill prompt-optimizer

The skills CLI fetches prompt-optimizer from GitHub repository daymade/claude-code-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/prompt-optimizer

Reload or restart Cursor to activate prompt-optimizer. Access the skill through slash commands (e.g., /prompt-optimizer) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.529 reviews
  • Hana Dixit· Dec 20, 2024

    I recommend prompt-optimizer for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Shikha Mishra· Dec 12, 2024

    Solid pick for teams standardizing on skills: prompt-optimizer is focused, and the summary matches what you get after install.

  • Hana Sethi· Nov 11, 2024

    Keeps context tight: prompt-optimizer is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Mia Flores· Oct 2, 2024

    prompt-optimizer is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Olivia Okafor· Sep 25, 2024

    We added prompt-optimizer from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Mia Garcia· Sep 21, 2024

    Solid pick for teams standardizing on skills: prompt-optimizer is focused, and the summary matches what you get after install.

  • Rahul Santra· Sep 9, 2024

    We added prompt-optimizer from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Pratham Ware· Aug 28, 2024

    prompt-optimizer fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Mia Chawla· Aug 16, 2024

    prompt-optimizer fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Jin Li· Aug 12, 2024

    prompt-optimizer has been reliable in day-to-day use. Documentation quality is above average for community skills.

showing 1-10 of 29

1 / 3