# Master Prompt Generation
<!--
ref: @protocol/agents/master-prompt-generation
tags: [create, prompt]
triggers: [AI fails to respond as expected, prompts lack clarity, user needs specific behavioral outcomes, instructions are too vague]
trigger_prompt: When the user wants to create prompts that elicit specific behaviors from AI or improve the effectiveness of existing prompts.
version: 3
updated_at: 2026-04-10T19:59:11.063Z
-->
Systematic approach to building master prompts that measurably change AI behavior.
## Body
### Phase 1: Requirements Analysis
- Identify core behavioral changes needed
- List specific trigger conditions and desired responses
- Prioritize behaviors by impact and frequency
- Define success criteria for prompt effectiveness
- Assess current prompt gaps against best practices
### Phase 2: Content Architecture
- **Lead with imperative instructions** using "You will..." not "Claude should..."
- **Structure by behavior priority** - most critical instructions first
- **Create clear trigger patterns** - "When X, then Y" format
- **Use concrete action verbs** - avoid vague words like "support," "consider," "enable"
- **Include enforcement mechanisms** - how will behaviors be reinforced?
### Phase 3: Behavioral Instruction Design
- Write commands in imperative mood
- Specify exact trigger conditions
- Define measurable outcomes
- Include verification steps
- Create accountability mechanisms
- Add failure recovery instructions
### Phase 4: Context Integration
- Add essential background information AFTER behavioral instructions
- Keep context concise but sufficient for decision-making
- Include current priorities and constraints
- Specify output format requirements
- Define collaboration culture expectations
### Phase 5: Validation Against Best Practices
- **Clarity:** Each instruction is unambiguous
- **Specificity:** Concrete actions vs vague suggestions
- **Enforceability:** Mechanisms to ensure behaviors happen
- **Prioritization:** Most important behaviors emphasized
- **Completeness:** Covers key use cases without bloat
- **Action-orientation:** Every section drives specific behaviors
### Phase 6: Testing and Refinement
- Test prompt with representative scenarios
- Identify behavioral gaps or conflicts
- Refine trigger conditions and responses
- Validate against user's working style
- Ensure prompt length fits system constraints
## Prompt Architecture Template
```markdown
# Master Prompt Generation
## Primary Behavioral Instructions
[Core behavioral commands in imperative voice]
### Mandatory Approach for [Key Task Type]:
[Step-by-step required process]
### [Framework Name]:
[Specific trigger conditions and responses]
## Automatic Behavioral Triggers
[When X, then Y patterns for common scenarios]
## [Other Required Behaviors]
[Additional behavioral instructions by priority]
## Context About [User]
[Essential background information]
## Current [Business/Project] Context
[Current priorities and constraints]
```
## Quality Checklist
- [ ] Instructions use imperative voice ("You will...")
- [ ] Behavioral triggers are specific and actionable
- [ ] Most important behaviors appear first
- [ ] Includes enforcement/accountability mechanisms
- [ ] Context supports decisions without overwhelming
- [ ] Prompt drives concrete actions vs vague guidance
- [ ] Length appropriate for system settings
- [ ] Tested against representative scenarios
## Extended
### Common Prompt Failures
- **Descriptive vs Prescriptive:** Describing what good behavior looks like instead of commanding it
- **Buried Critical Instructions:** Important behaviors mixed with background context
- **Vague Action Words:** Using "support," "help," "consider" instead of specific actions
- **Missing Trigger Conditions:** No clear "when this happens, do that" patterns
- **No Enforcement:** Nothing to ensure behaviors actually occur
- **Information Overload:** Too much context, not enough actionable instruction
### Behavioral Psychology Integration
- Use implementation intentions ("When X, I will Y")
- Create environmental cues for desired behaviors
- Build in positive reinforcement loops
- Include failure recovery mechanisms
- Design for habit formation through repetition
### Testing Methodology
1. **Scenario Testing:** Present common user situations, evaluate responses
2. **Behavioral Verification:** Check if specific instructions are followed
3. **Edge Case Analysis:** Test prompt with unusual or conflicting requests
4. **Iteration Cycles:** Refine based on actual usage patterns
5. **User Feedback:** Validate against user's experience and satisfaction
---
*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*
*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*