# Ask How To Improve Prompt

> Turn the AI into an expert Prompt Engineer to critique your instructions, fill missing context gaps, and generate reusable high-performance prompt templates.

- Skill: `alivirgo/ask-how-to-improve-prompt` (Agent Skill)
- Install (CLI): `npx skillmds@latest add alivirgo/ask-how-to-improve-prompt`
- Raw SKILL.md: https://api.skillmd.com/api/skills/alivirgo/ask-how-to-improve-prompt/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: alivirgo (https://skillmd.com/u/alivirgo)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/alivirgo/ask-how-to-improve-prompt

---


# Ask AI How to Improve Your Prompt (Meta-Prompting) (AI Skill)

## Overview
Prompt engineering is not guessing magical keywords - it is providing the right balance of **context, task constraints, and format specifications**. 

Instead of struggling through trial-and-error when a response falls flat, you can use **Meta-Prompting**: asking the AI itself to diagnose why your prompt was underspecified and write a significantly upgraded version.

---

## The Meta-Prompting Feedback Loop

```
┌─────────────────────────────────────────────────────────────┐
│                 The Prompt Optimizer Engine                 │
│                                                             │
│  User Initial Prompt ──► [ AI Output Was Subpar / Generic ] │
│                                   │                         │
│  Meta-Audit Directive ◄───────────┘                         │
│  "Diagnose my prompt's missing context & rewrite it"        │
│           │                                                 │
│           ▼                                                 │
│  [ Upgraded Prompt Template with Constraints & Exemplars ]  │
└─────────────────────────────────────────────────────────────┘
```

---

## Master Meta-Prompt Templates

### Pattern 1: The Prompt Doctor & Upgrader
Use this whenever an answer feels mediocre, generic, or off-target:

```markdown
Review the prompt I gave you earlier: "[PASTE YOUR ORIGINAL PROMPT]"

Act as a Principal AI Prompt Engineer. Do the following:
1. **Gap Analysis**: What vital context, constraints, or formatting instructions was my prompt missing?
2. **Ambiguity Check**: Where could an LLM easily misunderstand my intent?
3. **Upgraded Prompt**: Rewrite my prompt into a state-of-the-art, production-grade template with explicit roles, guidelines, and output schemas.
4. **Demonstration**: Run the upgraded prompt right now and show the improved output.
```

---

### Pattern 2: The Reusable Template Generator
Use this to turn a one-time success into a permanent team workflow:

```markdown
I loved the answer you just generated. 
Now, write the master prompt template that produced this result.
- Replace specific variables with bracketed placeholders (e.g., `[TOPIC]`, `[TARGET_AUDIENCE]`, `[MAX_WORDS]`).
- Include the exact system rules and output formatting instructions.
- Save it in a clean copy-paste markdown code block.
```

---

## Real-World Case Study

### Scenario: Writing Customer Support Responses

#### The Vague Initial Prompt
> *"Help me reply to an angry customer whose shipment was lost."*
>
> ❌ *Result: Overly formal, stiff email full of apologies without clear compensation rules or tracking steps.*

#### Running the Prompt Doctor Directive
> **User**: *"How should I reword that prompt to get a world-class customer service response?"*

**AI Prompt Doctor Response**:
> **Diagnosis**: Your prompt lacked 4 crucial parameters:
> 1. Tone level (Empathic vs. Formal).
> 2. Resolution policy (Refund vs. Reshipment vs. Store credit).
> 3. Required placeholders (Order #, tracking link).
> 4. Guardrails (Do not admit legal liability or make unrealistic delivery promises).
>
> **The Upgraded Prompt Template**:
```markdown
Act as a Senior Customer Delight Specialist for a premium e-commerce brand.
Draft a reply to a customer whose order has been lost in transit for >7 business days.

Key Information:
- Customer Name: [NAME]
- Order ID: [ORDER_NUMBER]
- Resolution: We have issued an immediate free expedited reshipment AND a $20 store credit code.

Guidelines:
1. Tone: Deeply empathetic, accountable, proactive, and warm.
2. Structure: 
  - Acknowledge and apologize sincerely in sentence 1 (no corporate excuses).
  - State the 2-part resolution clearly in bullet points.
  - Provide the new tracking number placeholder and expected arrival window.
  - Offer the $20 gift code for their next order.
3. Length: Under 150 words.
```

---

## Anatomy of a Perfect Prompt

Every high-performing prompt generated by the Meta-Prompting skill contains these 5 pillars:

| Pillar | Purpose | Example |
| :--- | :--- | :--- |
| **1. Role** | Sets tone and domain expertise | *"Act as a Lead Python Backend Engineer..."* |
| **2. Context** | Background situation and problem | *"We are running FastAPI with AsyncPG on Kubernetes..."* |
| **3. Task** | The exact atomic deliverable | *"Write a database connection pool manager..."* |
| **4. Constraints** | Guardrails, banned items, word counts | *"Must handle reconnection retries, no third-party ORMs..."* |
| **5. Format** | The exact schema and structure | *"Output as a single code block with type hints..."* |

