system-prompt-engineering
Design effective system prompts for custom agents. Use when creating agent system prompts, defining agent identity and rules, or designing high-impact prompts that shape agent behavior.
What this skill does
# System Prompt Engineering Skill Design effective system prompts for custom agents that establish identity, rules, and behavior. ## Purpose Create system prompts that shape agent behavior across all conversations. System prompts are orders of magnitude more important than user prompts. ## When to Use - Creating new custom agents - Establishing agent expertise - Defining persistent rules - Building specialized assistants ## System Prompt vs User Prompt | Aspect | System Prompt | User Prompt | | --- | --- | --- | | Scope | All conversations | Single task | | Persistence | Affects everything | Per-request | | Impact | Orders of magnitude higher | Lower blast radius | | Sections | Purpose, Instructions, Examples | All sections | ## Key Sections ### Purpose (Required) Define who the agent is and what it does. ```markdown ## Purpose You are a security expert specializing in code review. Your role is to identify vulnerabilities and suggest fixes. You focus on OWASP Top 10 and secure coding practices. ``` **Guidelines:** - Direct, clear identity statement - Specific expertise area - What the agent DOES ### Instructions (Recommended) Establish rules, constraints, and boundaries. ```markdown ## Instructions - Focus only on security concerns - Always explain the reasoning behind findings - Prioritize issues by severity (Critical, High, Medium, Low) - Do not modify code without explicit permission - When uncertain, ask clarifying questions ``` **Guidelines:** - Bullet points for clarity - Positive and negative rules - Edge case handling - Boundary definition ### Examples (Critical) Shape behavior through concrete examples. ```markdown ## Examples ### Example 1: SQL Injection Finding **Input:** "Review this login function" **Output:** "Found SQL injection vulnerability at line 42. The user input is directly concatenated into the query string. Recommendation: Use parameterized queries instead." ### Example 2: Out of Scope Request **Input:** "Fix this CSS styling issue" **Output:** "That's outside my security focus. I specialize in security vulnerabilities, not styling. Consider consulting a frontend expert for CSS issues." ### Example 3: Clean Code **Input:** "Check this authentication module" **Output:** "Reviewed the authentication module. No security vulnerabilities found. The code follows secure practices: uses parameterized queries, hashes passwords with bcrypt, and implements rate limiting." ``` **Guidelines:** - 2-4 diverse examples - Cover common cases - Include edge cases - Show desired output format ## Design Process ### Step 1: Define Agent Identity Answer: - What expertise does this agent have? - What domain does it operate in? - What is its primary purpose? - What tone should it use? ### Step 2: Establish Boundaries Answer: - What should the agent do? - What should the agent NOT do? - When should it ask for clarification? - What are its limitations? ### Step 3: Create Examples For each key scenario: - What's a typical input? - What's the ideal output? - How should edge cases be handled? ### Step 4: Validate Design Check: - [ ] Purpose is clear and specific - [ ] Instructions are unambiguous - [ ] Examples cover key scenarios - [ ] Boundaries are well-defined - [ ] Tone is consistent ## What to Avoid | Avoid | Why | Instead | | --- | --- | --- | | Detailed workflows | Reduces autonomy | High-level guidelines | | Dynamic variables | System prompt is static | Use user prompts | | Prescriptive formats | Over-constrains | Flexible guidelines | | Everything "just in case" | Context bloat | Only essentials | ## System Prompt Architecture ```markdown --- name: agent-name description: When to use this agent (for auto-delegation) tools: [minimal tool set] model: sonnet color: blue --- # Agent Name ## Purpose [Identity and role definition] ## Instructions [Rules and constraints] ## Examples ### Example 1: [Scenario] **Input:** [typical input] **Output:** [ideal output] ### Example 2: [Edge Case] **Input:** [edge case input] **Output:** [handling output] ### Example 3: [Boundary] **Input:** [out-of-scope request] **Output:** [how to decline/redirect] ``` ## Output Format When designing a system prompt: ```markdown ## System Prompt Design **Agent Name:** [name] **Domain:** [expertise area] **Model:** [sonnet/opus/haiku] ### Purpose [2-3 sentences defining identity] ### Instructions - [rule 1] - [rule 2] - [rule 3] ### Examples **Example 1:** [scenario] - Input: [input] - Output: [output] **Example 2:** [scenario] - Input: [input] - Output: [output] ### Validation - [ ] Purpose is specific - [ ] Instructions are actionable - [ ] Examples are diverse - [ ] Boundaries are clear ``` ## Common Agent Types ### Expert Agent Focus: Deep domain knowledge ```markdown ## Purpose You are an expert in [domain] with deep knowledge of [specifics]. ``` ### Guard Agent Focus: Validation and safety ```markdown ## Instructions - Validate all inputs against [criteria] - Block requests that [conditions] - Log suspicious activity ``` ### Translator Agent Focus: Format conversion ```markdown ## Examples ### Input Format [format A] ### Output Format [format B] ``` ## Key Quote > "System prompts are orders of magnitude more important than user prompts. They run once and affect everything." ## Cross-References - @system-vs-user-prompts.md - Distinction and best practices - @agent-expert-creation skill - Creating expert agents - @one-agent-one-purpose.md - Specialization principle ## Version History - **v1.0.0** (2025-12-26): Initial release --- ## Last Updated **Date:** 2025-12-26 **Model:** claude-opus-4-5-20251101
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.