Back to Skills

meta-prompt-engineering

verified

Use when prompts produce inconsistent or unreliable outputs, need explicit structure and constraints, require safety guardrails or quality checks, involve multi-step reasoning that needs decomposition, need domain expertise encoding, or when user mentions improving prompts, prompt templates, structured prompts, prompt optimization, reliable AI outputs, or prompt patterns.

View on GitHub

Marketplace

Plugin

thinking-frameworks-skills

Repository

lyndonkl/claude
15stars

skills/meta-prompt-engineering/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/lyndonkl/claude/blob/main/skills/meta-prompt-engineering/SKILL.md -a claude-code --skill meta-prompt-engineering

Installation paths:

Claude
.claude/skills/meta-prompt-engineering/
Powered by add-skill CLI

Instructions

# Meta Prompt Engineering

## Table of Contents
- [Purpose](#purpose)
- [When to Use](#when-to-use)
- [What Is It](#what-is-it)
- [Workflow](#workflow)
- [Common Patterns](#common-patterns)
- [Guardrails](#guardrails)
- [Quick Reference](#quick-reference)

## Purpose

Transform vague or unreliable prompts into structured, constraint-aware prompts that produce consistent, high-quality outputs with built-in safety and evaluation.

## When to Use

Use meta-prompt-engineering when you need to:

**Improve Reliability:**
- Prompts produce inconsistent outputs across runs
- Quality varies unpredictably
- Need reproducible results for production use
- Building prompt templates for reuse

**Add Structure:**
- Multi-step reasoning needs explicit decomposition
- Complex tasks need subtask breakdown
- Role clarity improves output (persona/expert framing)
- Output format needs specific structure (JSON, markdown, sections)

**Enforce Constraints:**
- Length limits must be respected (character/word/token counts)
- Tone and style requirements (professional, casual, technical)
- Content restrictions (no profanity, PII, copyrighted material)
- Domain-specific rules (medical accuracy, legal compliance, factual correctness)

**Enable Evaluation:**
- Outputs need quality criteria for assessment
- Self-checking improves accuracy
- Chain-of-thought reasoning increases reliability
- Uncertainty expression needed ("I don't know" when appropriate)

**Encode Expertise:**
- Domain knowledge needs systematic application
- Best practices should be built into prompts
- Common failure modes need prevention
- Iterative refinement from user feedback

## What Is It

Meta-prompt-engineering applies structured frameworks to improve prompt quality:

**Key Components:**
1. **Role/Persona**: Define who the AI should act as (expert, assistant, critic)
2. **Task Decomposition**: Break complex tasks into clear steps
3. **Constraints**: Explicit limits and requirements
4. **Output Format**: Structured respons

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
9732 chars