Core prompt design patterns and templates for effective LLM communication
Applies structured prompt design patterns like RCTF and IIO when you need to create effective prompts for complex tasks. Triggers when you request prompt engineering help or need to structure prompts for generation, classification, extraction, transformation, or analysis tasks.
/plugin marketplace add pluginagentmarketplace/custom-plugin-prompt-engineering/plugin install prompt-engineering-assistant@pluginagentmarketplace-prompt-engineeringThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/config.yamlreferences/GUIDE.mdscripts/helper.pyBonded to: prompt-fundamentals-agent
Skill("custom-plugin-prompt-engineering:prompt-design")
parameters:
task_type:
type: enum
values: [generation, classification, extraction, transformation, analysis]
required: true
output_format:
type: enum
values: [text, json, markdown, code, structured]
default: text
constraints:
type: object
properties:
max_length: number
tone: string
language: string
Best for: General-purpose prompts
You are a [ROLE] with expertise in [DOMAIN].
## Context
[RELEVANT BACKGROUND INFORMATION]
## Task
[SPECIFIC REQUEST WITH CLEAR OBJECTIVE]
## Output Format
[STRUCTURE AND FORMAT REQUIREMENTS]
## Constraints
[LIMITATIONS AND GUARDRAILS]
Example:
You are a senior software architect with expertise in distributed systems.
## Context
We're designing a new microservices architecture for an e-commerce platform
that needs to handle 10,000 concurrent users.
## Task
Design the service boundaries and communication patterns for the checkout flow.
## Output Format
- Service diagram (ASCII)
- API contracts (OpenAPI style)
- Data flow description
## Constraints
- Use event-driven architecture where possible
- Minimize synchronous calls
- Consider eventual consistency
Best for: Data processing and transformation
## Instruction
[WHAT TO DO WITH THE INPUT]
## Input
[DATA TO PROCESS]
## Expected Output
[FORMAT AND STRUCTURE OF RESULT]
Best for: Creative and roleplay tasks
## Persona
[WHO YOU ARE - background, expertise, personality]
## Scenario
[SITUATION AND CONTEXT]
## Goal
[WHAT TO ACHIEVE]
Best for: Safety-critical applications
## RULES (Must follow absolutely)
1. [CRITICAL CONSTRAINT 1]
2. [CRITICAL CONSTRAINT 2]
## Your Role
[ROLE DEFINITION]
## Task
[WHAT TO DO WITHIN CONSTRAINTS]
| Scenario | Recommended Pattern | Reason |
|---|---|---|
| Code review | RCTF | Needs clear role and format |
| Data extraction | IIO | Focus on input/output |
| Creative writing | PSG | Needs persona and context |
| Secure applications | CF | Safety constraints first |
| API documentation | RCTF | Structured output needed |
| Translation | IIO | Clear input → output |
anti_patterns:
vague_instructions:
bad: "Make it better"
good: "Improve readability by using shorter sentences (max 20 words)"
no_output_format:
bad: "Analyze this code"
good: "Analyze this code. For each issue found, provide: issue, severity, fix"
conflicting_instructions:
bad: "Be concise. Explain everything in detail."
good: "Be concise but complete - include all critical details"
missing_context:
bad: "Fix the bug"
good: "Fix the null pointer exception in the user authentication module"
validation:
structure:
- [ ] Clear role/persona defined
- [ ] Task objective is specific and measurable
- [ ] Output format is explicit
- [ ] Constraints are stated upfront
clarity:
- [ ] No ambiguous terms
- [ ] One instruction per line
- [ ] Action verbs used
- [ ] Examples provided if complex
completeness:
- [ ] All necessary context included
- [ ] Edge cases addressed
- [ ] Error handling specified
| Issue | Cause | Solution |
|---|---|---|
| Inconsistent outputs | Vague instructions | Add specific criteria |
| Wrong format | No format spec | Add explicit format section |
| Off-topic responses | Missing constraints | Add scope boundaries |
| Too verbose | No length limits | Add max length constraint |
| Missing details | Incomplete context | Add more background info |
integrates_with:
- prompt-templates: Provides reusable patterns
- prompt-evaluation: Tests pattern effectiveness
- chain-of-thought: Adds reasoning capability
usage_example: |
# Combine with few-shot for complex tasks
[RCTF Pattern]
+
[2-3 examples]
+
[Current input]
See references/GUIDE.md for detailed methodology.
See assets/config.yaml for configuration options.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.