skill-meta-prompt
Craft better prompts using proven optimization techniques — use when your prompt needs refinement
What this skill does
> **Host: Codex CLI** — This skill was designed for Claude Code and adapted for Codex. > Cross-reference commands use installed skill names in Codex rather than `/octo:*` slash commands. > Use the active Codex shell and subagent tools. Do not claim a provider, model, or host subagent is available until the current session exposes it. > For host tool equivalents, see `skills/blocks/codex-host-adapter.md`. # Meta-Prompt Generator Skill ## Overview Generate well-structured, verifiable prompts for any use case. Applies proven meta-prompting techniques to minimize hallucination and maximize effectiveness. ``` ┌─────────────────────────────────────────────────────────────────────────────┐ │ META-PROMPT GENERATION │ ├─────────────────────────────────────────────────────────────────────────────┤ │ │ │ Phase 1: Requirement Gathering │ │ → Understand the primary goal/role │ │ → Clarify expected outputs │ │ → Identify accuracy requirements │ │ ↓ │ │ Phase 2: Task Analysis │ │ → Apply Technique 1: Task Decomposition │ │ → Identify if complex enough for subtasks │ │ → Map dependencies between subtasks │ │ ↓ │ │ Phase 3: Expert Assignment │ │ → Apply Technique 5: Specialized Experts │ │ → Assign personas to subtasks │ │ → Apply Technique 2: Fresh Eyes Review │ │ ↓ │ │ Phase 4: Verification Design │ │ → Apply Technique 3: Iterative Verification │ │ → Build in checking steps │ │ → Apply Technique 4: No Guessing │ │ ↓ │ │ Phase 5: Prompt Assembly │ │ → Structure: Role, Context, Instructions, Constraints, Format │ │ → Add verification hooks │ │ → Include uncertainty disclaimers │ │ ↓ │ │ Phase 6: Output & Iteration │ │ → Present generated prompt │ │ → Offer refinement │ │ │ └─────────────────────────────────────────────────────────────────────────────┘ ``` ## The Five Techniques ### Technique 1: Task Decomposition **What:** Break complex tasks into smaller, manageable subtasks. **When to use:** - Task has multiple distinct steps - Different expertise needed for different parts - Risk of getting lost in complexity **How to apply:** 1. List all components of the task 2. Identify dependencies (what must happen first) 3. Group related components 4. Order by logical sequence **Example:** ``` Task: "Create a technical blog post about OAuth 2.0" Decomposition: 1. Research Phase - Gather OAuth 2.0 specifications - Find common implementation examples - Identify security best practices 2. Structure Phase - Outline main sections - Plan code examples - Design diagrams/visuals 3. Writing Phase - Write introduction - Write technical sections - Write conclusion/CTA 4. Review Phase - Technical accuracy check - Code example testing - Readability review ``` ### Technique 2: Fresh Eyes Review **What:** Use different "experts" for creation vs. validation. Never use the same expert to both create and verify. **When to use:** - Output needs to be accurate - Risk of blind spots from creator - Quality assurance is critical **How to apply:** 1. Assign Creator Expert for initial work 2. Assign different Reviewer Expert for validation 3. Reviewer should not have seen creation process 4. Loop back to Creator if issues found **Example:** ``` Creator: "Expert Technical Writer" produces article Reviewer: "Expert Security Engineer" verifies OAuth claims Reviewer: "Expert Developer" tests code examples NOT: Same expert writes AND reviews their own work ``` ### Technique 3: Iterative Verification **What:** Build explicit verification steps into the task, especially for error-prone outputs. **When to use:** - Mathematical calculations - Code generation - Factual claims - Multi-step reasoning **How to apply:** 1. After each significant output, add verification step 2. For calculations: "Now verify this by [alternative method]" 3. For code: "Test this code against [test cases]" 4. For claims: "Confirm this by [citing source]" **Example:** ``` Step 1: Calculate discount price Step 2: VERIFY - recalculate from opposite direction Step 3: If mismatch, identify error and recalculate Step 4: Only proceed when both methods match ``` ### Technique 4: No Guessing **What:** Never assume unverified facts. Disclaim uncertainty explicitly. **When to use:** - ALWAYS (this is a default behavior) - Especially for: dates, statistics, quotes, technical specifications **How to apply:** 1. If uncertain, say "I'm not certain about..." 2. If no data, say "I don't have information on..." 3. Ask for sources rather than inventing 4. Distinguish between "likely" and "confirmed" **Disclaimer templates:** ``` "Note: This figure is approximate and should be verified." "I don't have access to [specific data]. Please provide or verify." "This is based on general patterns; your specific case may differ." ``` ### Technique 5: Specialized Experts **What:** Spawn domain-specific personas for complex subtasks. **When to use:** - Task requires specialized knowledge - Different perspectives would improve quality - Cross-functional work needed **Available expert archetypes:** | Expert | Use For | |--------|---------| | Expert Writer | Content, copy, documentation | | Expert Mathematician | Calculations, proofs, statistics | | Expert Python | Python code, data analysis | | Expert Security | Security review, threat modeling | | Expert Architect | System design, trade-offs | | Expert Reviewer | Quality assurance, error-finding | | Expert Strategist | Planning, prioritization | **How to apply:** ``` "For this subtask, adopt the persona of Expert [X]. Your expertise includes [specific areas]. Focus exclusively on [your assigned task]. You have no memory of previous context—all needed information is below." ``` ## Phase 1: Requirement Gathering ### Initial Prompt ```markdown **Meta-Prompt Generator** I'll help you create an effective, verifiable prompt. **Questions:** 1. **What is the main goal?** What should this prompt help someone accomplish? 2. **What's the expected output?** (e.g., document, code, analysis, decision) 3. **How important is accuracy?** - Critical (factual, technical, or high-stakes) - Moderate (useful but not mission-critical) - Flexible (creative, exploratory) 4. **Any specific constraints?** (length, format, tone, tools available) ``` ### Minimum Information Needed - Primary goal (REQUIRED) - Output type (REQUIRED) - Accuracy requirements (can assume moderate) - Constraint
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.