Meta-prompting system for dynamic prompt generation using templates, standards, and patterns. USE WHEN meta-prompting, template generation, prompt optimization, or programmatic prompt composition.
Before executing, check for user customizations at:
~/.claude/skills/PAI/USER/SKILLCUSTOMIZATIONS/Prompting/
If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.
You MUST send this notification BEFORE doing anything else when this skill is invoked.
Send voice notification:
curl -s -X POST http://localhost:8888/notify \
-H "Content-Type: application/json" \
-d '{"message": "Running the WORKFLOWNAME workflow in the Prompting skill to ACTION"}' \
> /dev/null 2>&1 &
Output text notification:
Running the **WorkflowName** workflow in the **Prompting** skill to ACTION...
This is not optional. Execute this curl command immediately upon skill invocation.
Invoke when: meta-prompting, template generation, prompt optimization, programmatic prompt composition, creating dynamic agents, generating structured prompts from data.
The Prompting skill owns ALL prompt engineering concerns:
This is the "standard library" for prompt engineering - other skills reference these resources when they need to generate or optimize prompts.
Complete prompt engineering documentation based on:
Key Topics:
// skills/Agents/Tools/AgentFactory.ts
import { renderTemplate } from '~/.claude/skills/Prompting/Tools/RenderTemplate.ts';
const prompt = renderTemplate('Primitives/Briefing.hbs', {
briefing: { type: 'research' },
agent: { id: 'EN-1', name: 'Skeptical Thinker', personality: {...} },
task: { description: 'Analyze security architecture', questions: [...] },
output_format: { type: 'markdown' }
});
# Data: phased-analysis.yaml
phases:
- name: Discovery
purpose: Identify attack surface
steps:
- action: Map entry points
instructions: List all external interfaces...
- name: Analysis
purpose: Assess vulnerabilities
steps:
- action: Test boundaries
instructions: Probe each entry point...
bun run RenderTemplate.ts \
--template Primitives/Structure.hbs \
--data phased-analysis.yaml
// Generate specialized agent with appropriate voice
const agent = composeAgent(['security', 'skeptical', 'thorough'], task, traits);
// Returns: { name, traits, voice: 'default', voiceId: 'VOICE_ID...' }
Templates/Primitives/Briefing.hbs for agent context handoffRenderTemplate.ts to compose dynamic agentsAgents/Templates/DynamicAgent.hbsRenderTemplate.ts for eval prompt generationEvals/Templates/ but use Prompting's engineStandards.md for prompt best practicesStructure.hbs for workflow patternsGate.hbs for validation checklistsThe templating system eliminated ~35,000 tokens (65% reduction) across PAI:
| Area | Before | After | Savings |
|---|---|---|---|
| SKILL.md Frontmatter | 20,750 | 8,300 | 60% |
| Agent Briefings | 6,400 | 1,900 | 70% |
| Voice Notifications | 6,225 | 725 | 88% |
| Workflow Steps | 7,500 | 3,000 | 60% |
| TOTAL | ~53,000 | ~18,000 | 65% |
Primary Documentation:
Standards.md - Complete prompt engineering guideTemplates/README.md - Template system overview (if preserved)Tools/RenderTemplate.ts - Implementation detailsResearch Foundation:
Related Skills:
Philosophy: Prompts that write prompts. Structure is code, content is data. Meta-prompting enables dynamic composition where the same template with different data generates specialized agents, workflows, and evaluation frameworks. This is core PAI DNA - programmatic prompt generation at scale.