Skip to content
Back to skills

Meta Prompting

ASecurity

Self-improving prompts through meta-level optimization

  • 229 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added June 6, 2026
ai-agentsgo

Security analysis

A100/100

Scanned June 6, 2026

npx -y skills add Miosa-osa/canopy --skill meta-prompting --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Meta Prompting?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Meta Prompting
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/miosa-osa-meta-prompting/badge)](https://www.skillsdirectory.com/skills/miosa-osa-meta-prompting)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: meta-prompting
description: "Self-improving prompts through meta-level optimization"
trigger: "keyword"
keywords: ["optimize prompt", "improve prompt", "better results", "refine"]
priority: 5
---

# Meta-Prompting Skill

Uses the LLM to optimize its own prompts for better results.

## Core Concept

Meta-prompting treats the LLM as both:
1. **Executor**: Runs the actual task
2. **Optimizer**: Improves the prompt for next iteration

## When to Use

- Repeated similar tasks
- Suboptimal initial results
- Learning new task patterns
- Building prompt libraries

## Meta-Prompt Structure

```
You are a prompt optimization expert.

ORIGINAL PROMPT:
{original_prompt}

RESULT QUALITY: {quality_score}/10
ISSUES IDENTIFIED:
{issues}

Generate an improved version of this prompt that:
1. Addresses the identified issues
2. Maintains the core intent
3. Adds clarity where needed
4. Includes examples if helpful

IMPROVED PROMPT:
```

## Optimization Dimensions

### 1. Clarity Enhancement
- Remove ambiguity
- Add specific constraints
- Define expected format

### 2. Example Addition
- Few-shot examples for pattern matching
- Edge case examples
- Format demonstrations

### 3. Instruction Refinement
- Break complex instructions into steps
- Add verification checkpoints
- Include success criteria

### 4. Context Optimization
- Remove irrelevant context
- Highlight critical information
- Structure for attention patterns

## Iterative Improvement Loop

```
Round 1: Execute original prompt
         ↓
         Score result (0-10)
         ↓
Round 2: Meta-optimize prompt
         ↓
         Execute improved prompt
         ↓
         Score result
         ↓
         If improved: Save as new baseline
         If not: Revert or try different optimization
         ↓
Repeat until convergence or max iterations (3-5)
```

## Prompt Scoring Criteria

| Dimension | Weight | Evaluation |
|-----------|--------|------------|
| Correctness | 40% | Does output match expected? |
| Completeness | 25% | All requirements addressed? |
| Clarity | 20% | Output is clear and useful? |
| Efficiency | 15% | Minimal tokens for result? |

## Meta-Prompt Templates

### For Task Prompts
```
Analyze this task prompt and suggest 3 improvements:
{prompt}

Consider:
- Is the goal clear?
- Are constraints explicit?
- Would examples help?
- Is the format specified?
```

### For System Prompts
```
Review this system prompt for an AI assistant:
{prompt}

Optimize for:
- Role clarity
- Behavioral consistency
- Edge case handling
- Output quality
```

### For Chain-of-Thought
```
This CoT prompt produces inconsistent reasoning:
{prompt}

Restructure to:
- Guide step-by-step thinking
- Include verification steps
- Handle common errors
```

## Storing Optimized Prompts

Save successful prompts to the skill library:
```json
{
  "task_type": "code_review",
  "original_prompt": "...",
  "optimized_prompt": "...",
  "improvement": "+2.3 quality score",
  "iterations": 3,
  "date": "2026-01-26"
}
```

## Integration

- **Learning Engine**: Store optimized prompts as patterns
- **Memory System**: Recall best prompts for task types
- **Skill Library**: Versioned prompt templates

---

*Reference: "Large Language Models as Optimizers" (OPRO, 2023)*

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.