You have installed OpenClaw. You have connected your tools. Your agent is running. But the results are... fine. Not great. Not terrible. Just adequately mediocre.
The problem is almost never the model. It is the instructions.
The difference between an agent that produces generic, surface-level results and one that delivers exactly what you need comes down to prompt engineering — the art and science of communicating your intent clearly enough that an AI model can act on it effectively.
For OpenClaw specifically, prompt engineering goes beyond single-turn chat prompts. It includes your system prompt (the persistent instructions that define your agent's behavior), your task decomposition (how you break complex requests into manageable steps), and your output formatting (how you tell the agent to structure its responses).
This guide covers techniques that consistently produce better results.
The System Prompt: Your Agent's Operating Manual
The system prompt is the most impactful piece of text in your OpenClaw configuration. It runs before every interaction and shapes how the agent interprets and responds to everything you say. A well-crafted system prompt is the difference between a generic chatbot and a capable personal assistant.
The Default System Prompt Problem
OpenClaw ships with a sensible default system prompt. But it is generic — designed to work reasonably well for everyone, which means it works optimally for no one. Customizing your system prompt is the single highest-leverage improvement you can make.
System Prompt Template
# ~/.openclaw/config.yaml
ai:
system_prompt: |
You are my personal AI agent. Your name is [name].
## About Me
- I am a [role] working in [industry]
- My working hours are [hours] in [timezone]
- I communicate in [language(s)]
- My communication style is [formal/casual/direct/etc.]
## Your Personality
- Be [concise/detailed/thorough] in responses
- Default to [action/asking] when you are 70%+ confident
- Use [tone] tone in all communications
- When uncertain, [ask for clarification/make your best judgment and note assumptions]
## My Priorities
1. [Highest priority area]
2. [Second priority]
3. [Third priority]
## Rules
- Never [specific things to avoid]
- Always [specific things to always do]
- When handling [specific situation], do [specific action]
## Tools & Preferences
- My preferred calendar is [Google Calendar/Outlook/etc.]
- For messaging, use [Telegram/Discord/etc.]
- File format preferences: [Markdown/PDF/etc.]
- Code style: [tabs/spaces, naming conventions, etc.]
Real-World Example
Here is a concrete system prompt from a marketing director:
ai:
system_prompt: |
You are Atlas, my AI operations manager.
## About Me
- I'm VP of Marketing at a B2B SaaS company (150 employees)
- I manage a team of 8 across content, demand gen, and product marketing
- I'm based in EST, working 8 AM - 6 PM weekdays
- I prefer direct, no-fluff communication
## Your Personality
- Be concise. Use bullet points. Skip pleasantries.
- Default to action when confident. Don't ask permission for obvious tasks.
- Use a professional but informal tone — like a trusted colleague, not a butler.
- Flag risks and tradeoffs proactively. I hate surprises.
## My Priorities
1. Pipeline generation and revenue impact
2. Team productivity and blockers
3. Content quality and brand consistency
## Rules
- Never schedule meetings before 9 AM or after 5 PM
- Always include data to support recommendations
- When drafting external communications, match our brand voice guide
- If a task will take more than 30 minutes, give me a time estimate first
- Summarize emails in 3 bullets max unless I ask for detail
Task Decomposition: Breaking Down Complex Requests
The biggest mistake users make with AI agents is giving vague, high-level instructions and expecting perfect results. The model is not reading your mind. It is interpreting your words. The more precise your instructions, the better the output.
Bad vs. Good Task Framing
Vague (bad):
"Research the competition."
Specific (good):
"Research our top 5 competitors in the project management SaaS space.
For each competitor, find:
1. Their pricing tiers and feature comparison to our product
2. Recent product launches or major updates (last 6 months)
3. Customer reviews on G2 and Capterra (average rating + top complaints)
4. Their content marketing strategy (blog frequency, topics, social presence)
Format the output as a comparison table with one row per competitor."
The second prompt produces dramatically better results because it:
- Defines scope: "top 5" not "all"
- Specifies dimensions: pricing, updates, reviews, marketing
- Sets time bounds: "last 6 months"
- Names sources: G2, Capterra
- Requests format: comparison table
The CRAFT Framework
A useful framework for structuring requests:
- Context: Background the agent needs to understand the task
- Role: What perspective the agent should adopt
- Action: The specific task to perform
- Format: How the output should be structured
- Tone: The communication style to use
Example:
Context: I'm preparing for a board meeting next Tuesday where I need
to present our Q1 marketing results.
Role: Act as a marketing analyst preparing executive-level materials.
Action: Create a Q1 performance summary covering:
- Channel-by-channel ROI
- Pipeline contribution
- Top-performing campaigns
- Areas of underperformance with root causes
Format: Executive slide deck outline (6-8 slides max).
Each slide should have a title, 3-4 bullet points,
and a suggested visualization type.
Tone: Executive-level. Data-driven. No jargon.
Assume the audience understands business metrics
but not marketing-specific terminology.
Output Formatting Techniques
How you ask for the output matters as much as what you ask for.
Request Specific Structures
Instead of letting the agent choose its output format, specify exactly what you want:
"Present the results as a markdown table with columns for:
Name, Price, Key Feature, Limitation, Rating (1-5)"
"Give me the answer in exactly 3 bullet points,
each under 20 words"
"Format this as a YAML configuration file that I can
paste directly into my config"
Use Examples (Few-Shot Prompting)
Showing the agent an example of the output you want is more effective than describing it:
"Generate 5 blog post title options. Match this style:
Example titles I like:
- 'Why Every Developer Needs an AI Agent in 2026'
- 'The Hidden Cost of Not Automating Your Inbox'
- 'I Replaced My Project Manager with OpenClaw (Here's What Happened)'
Generate similar titles for a post about using AI for data analysis."
Chain of Thought Requests
For complex analysis, explicitly ask the agent to show its reasoning:
"Analyze whether we should expand into the European market.
Think through this step by step:
1. First, assess market size and growth potential
2. Then, evaluate regulatory requirements
3. Next, analyze competitive landscape
4. Then, estimate required investment
5. Finally, give your recommendation with confidence level"
Memory-Informed Prompting
OpenClaw's memory system means your agent accumulates context over time. Use this to your advantage:
Reference Past Work
"Draft a proposal for NovaTech using the same structure
and pricing approach I used for the TechStart proposal
from last month."
Build on Previous Analysis
"Last week you researched our competitor pricing. Based
on that analysis, what pricing changes would you recommend
for our Q2 launch?"
Course-Correct Patterns
"I've noticed your email drafts tend to be too formal for
my style. Going forward, write emails the way I would —
shorter, more casual, and always starting with the key point."
Advanced Techniques
Negative Prompting
Tell the agent what NOT to do, not just what to do:
"Write a product description for our new feature.
Do NOT:
- Use marketing buzzwords like 'revolutionary', 'game-changing', or 'synergy'
- Include vague claims without specifics
- Write more than 150 words
DO:
- Focus on the specific problem it solves
- Include one concrete use case
- Use plain language a non-technical person would understand"
Persona Prompting for Different Tasks
Configure different personas for different types of work:
# In your system prompt
## Personas
When I say "put on your [persona] hat", adopt that perspective:
- **Analyst hat**: Focus on data, evidence, and quantitative reasoning.
Challenge assumptions. Cite sources.
- **Creative hat**: Generate unconventional ideas. No judgment. Quantity over quality.
- **Editor hat**: Review critically. Find weaknesses. Suggest improvements. Be harsh.
- **Strategist hat**: Think long-term. Consider second-order effects.
Frame everything in terms of competitive advantage.
Usage:
You: "Put on your editor hat and review this blog post draft."
You: "Now switch to creative hat — brainstorm 10 alternative angles
for this article."
Calibration Prompts
Periodically calibrate your agent's understanding:
"Looking at our interactions over the past month, what are the
3 most common types of tasks I give you? Are there any patterns
in what I ask you to redo or correct? Based on those patterns,
suggest adjustments to your system prompt."
This turns your agent into a self-improving system. Its suggestions for prompt modifications are often insightful because it has seen the patterns from the inside.
Common Mistakes
- Being too vague: "Do some research" vs. "Research X, focusing on A, B, and C"
- Not specifying format: The agent defaults to long prose when you wanted bullet points
- Overloading single prompts: Asking for 10 things at once instead of breaking them into steps
- Not providing context: Assuming the agent remembers something it might not have seen
- Ignoring feedback loops: Not correcting the agent when it gets something wrong, leading to repeated mistakes
- Over-engineering the system prompt: A 5,000-word system prompt is too long. Keep it under 500 words. Focus on the highest-impact instructions.
Conclusion
Prompt engineering is not a mystical art. It is clear communication applied to a new medium. The same skills that make you effective at briefing a colleague — specificity, structure, examples, and context — make you effective at directing an AI agent.
Start with a customized system prompt. Use the CRAFT framework for complex tasks. Specify your output format. Show examples when possible. And iterate — every correction you make teaches both you and your agent how to work together more effectively.
Your agent is not limited by its intelligence. It is limited by its instructions. Write better instructions, get better results.




