system-prompt-writer

Write or refine system prompts for AI agents using Markdown and XML templates.

307|167|Updated Sep 10, 2018
One-click install
npx skills add https://github.com/aws-samples/aws-ai-ml-workshop-kr --skill system-prompt-writer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: system-prompt-writer
Source: https://github.com/aws-samples/aws-ai-ml-workshop-kr/tree/main/genai/aws-gen-ai-kr/20_applications/08_bedrock_manus/use_cases/06_insight_extractor_strands_sdk_workshop_phase_1/skills/system-prompt-writer
Command: npx skills add https://github.com/aws-samples/aws-ai-ml-workshop-kr --skill system-prompt-writer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing effective system prompts for AI agents is challenging, often leading to vague, over-specified, or error-prone agent behavior. This skill provides expert guidance to create clear, concise, and high-performing prompts, ensuring agents consistently achieve desired outcomes.

Core Features & Use Cases

  • Context Engineering Principles: Guides users on Anthropic's "minimum effective information" and "right altitude" principles for prompt design.
  • Structured Prompt Templates: Offers hybrid Markdown + XML templates for organizing prompts, improving readability and machine parseability.
  • Critical Escaping Rules: Emphasizes and explains the mandatory double-brace {{}} escaping for code samples within prompts, preventing common KeyError failures.
  • Use Case: A developer needs to improve an agent's ability to use tools. This skill provides specific guidance on how to write unambiguous tool guidance sections, including decision trees and constraints, directly within the system prompt.

Quick Start

I need to write a system prompt for a new data analysis agent. Guide me through the best practices for structuring the prompt and writing effective tool guidance.

Frequently Asked Questions about system-prompt-writer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write effective system prompts for AI agents?

System prompts guide agent behavior by defining role, context, and constraints. Effective prompts follow Anthropic's minimum effective information principle—providing just enough detail without over-specification—paired with structured templates using Markdown and XML to organize role, background, instructions, tool guidance, and output format for consistent, safe agent performance.

What's the best way to structure tool guidance in a system prompt?

Tool guidance should include unambiguous decision logic and constraints directly in the system prompt. Use decision trees to clarify when tools apply, specify input requirements precisely, and document edge cases. Structure this section with clear precedence rules so agents consistently select and execute the correct tool without ambiguity.

Why do my system prompts cause KeyError failures in production?

System prompts containing code samples must use double-brace escaping `{{}}` instead of single braces `{}` to prevent template parsing errors. This critical escaping rule prevents the agent framework from misinterpreting code as template variables, which is a common source of KeyError failures in production workflows.

How do I design prompts for multi-agent workflows like coordinator and executor patterns?

Multi-agent prompts require clear role separation and communication protocols. Define each agent's scope, decision authority, and handoff points explicitly. Use hybrid Markdown and XML structuring to distinguish coordinator logic from executor instructions, ensuring agents understand their position in planner-executor or similar architectures without task overlap.

What context should I include in a system prompt to avoid vague agent behavior?

Include only minimum effective information: the agent's role, relevant background facts, specific constraints, and decision criteria. Avoid over-context that confuses priorities. Apply the "right altitude" principle—pitch detail to the agent's actual task scope—and use structured templates to keep context organized and scannable without ambiguity.

Can I use system prompts for safety constraints in customer service agents?

Yes. System prompts enforce safety constraints directly by specifying prohibited actions, escalation rules, and boundary conditions. In customer service workflows, define what the agent can resolve autonomously versus when to escalate, which sensitive topics require human review, and what responses violate compliance—all within the system prompt structure.