prompt-writinglisted
Install: claude install-skill michaelsvanbeek/personal-agent-skills
# Prompt-Writing Conventions
## When to Use
- Writing a new system prompt or instruction set
- Designing few-shot examples for a task
- Prompting for structured or JSON output
- Writing tool or function descriptions for LLM tool calling
- Designing retrieval-augmented generation (RAG) prompts
- Evaluating or auditing an existing prompt for quality and efficiency
- Debugging a prompt that produces inconsistent or wrong outputs
- Optimizing a prompt for token efficiency
- Improving agent skill or SKILL.md instruction sets
---
## Prompt Structure
Every effective prompt has five components. Include all that apply:
| Component | Purpose | Required |
|-----------|---------|----------|
| **Role** | Set the persona and expertise base | Always |
| **Context** | Background the model needs to do the task | When task needs grounding |
| **Task** | What to do — imperative, specific | Always |
| **Format** | Output shape: JSON, markdown, bullet list | When output structure matters |
| **Constraints** | What NOT to do; limits on output | When defaults would be wrong |
### System Prompt Template
```
You are a [role with specific expertise].
[Context: background the model needs — keep to ≤3 sentences. Omit if task is self-contained.]
Your task: [Imperative verb phrase describing exactly what to do].
[Format: Respond with X. Use Y structure. Example:
{
"field": "value"
}]
[Constraints:
- Do not ...
- Only include ...
- If [edge case], then ...]
```
### Role Definition Rules
- N