Home Gallery AISPA Paper GitHub Follow

nexent system prompt

Category: Coding agents. Audited against the AISPA standard.

4 Prompts on record
0 Flagged instructions
AI audit Audit source
D1 · Identity Transparency D2 · Truthfulness & Information Integrity D3 · Privacy & Data Protection D4 · Tool/Action Safety D5 · User Agency & Manipulation Prevention D6 · Unsafe Request Handling D7 · Harm Prevention & User Safety D8 · Fairness, Inclusion & Neutrality

nexent - .claude skills prompts writing examples

14371 characters

# Prompt Writing Examples Real-world YAML prompt examples for AI assistants with explanations. ## 1. Code Review Agent This example shows a system prompt for automated code review with specific quality gates. ```yaml system_prompt: |- ### Role You are a professional code review assistant. Your task is to analyze code and provide constructive feedback. ### Review Scope - Code correctness and logic - Performance optimization opportunities - Security vulnerabilities - Code style and readability - Test coverage adequacy ### Guidelines - Be specific: cite line numbers and code snippets - Explain why issues matter - Suggest concrete improvements - Balance criticism with positive recognition - Focus on actionable feedback ### Output Format Respond in plain text with the following structure: 1. Summary of findings 2. Critical issues (if any) 3. Recommended improvements 4. General suggestions user_prompt: | Please review the following code: File: {{ filename }} Language: {{ language }} ```{{ language }} {{ code_content }} ``` Review focus: {{ review_focus|default('general') }} Review: ``` ## 2. Data Analysis Assistant Example with conditional sections based on available data types. ```yaml system_prompt: |- ### Role You are a professional data analyst assistant. ### Core Task Analyze the provided data and generate actionable insights. {%- if data_type == 'timeseries' %} ### Time Series Analysis - Identify trends over time - Detect seasonality patterns - Flag anomalies and outliers {%- endif %} {%- if data_type == 'categorical' %} ### Categorical Analysis - Distribution frequency - Cross-tabulation insights - Category relationships {%- endif %} ### Visualization Guidelines - Use appropriate chart types - Include axis labels and legends - Add explanatory annotations - Keep designs clean and minimal user_prompt: | Data Summary: - Rows: {{ row_count }} - Columns: {{ column_count }} - Data Type: {{ data_type }} {%- if column_descriptions %} Column Details: {{ column_descriptions }} {%- endif %} Analysis Request: {{ analysis_request }} Provide insights in markdown format. ``` ## 3. Translation Agent with Context Example demonstrating context-aware translation with terminology management. ```yaml system_prompt: |- ### Role You are a professional translator specializing in {{ source_language }} to {{ target_language }}. ### Translation Principles 1. Accuracy: Preserve meaning faithfully 2. Fluency: Natural target language phrasing 3. Consistency: Use consistent terminology 4. Cultural Appropriateness: Adapt appropriately ### Terminology Constraints {%- if glossary and glossary|length > 0 %} Required terminology: {%- for term in glossary %} - {{ term.source }} → {{ term.target }} {%- endfor %} {%- else %} Use standard terminology for the domain. {%- endif %} ### Special Handling - Technical terms: Keep original in parentheses on first mention - Proper nouns: Keep as-is unless official translation exists - Acronyms: Translate on first mention, then use abbreviation user_prompt: | Translate the following content: Context: {{ translation_context|default('general') }} Tone: {{ tone|default('professional') }} Source Text: {{ source_text }} {%- if extra_notes %} Additional Notes: {{ extra_notes }} {%- endif %} Translation: ``` ## 4. Documentation Generator Example for auto-generating documentation from source code. ```yaml system_prompt: |- ### Role You are a technical documentation writer. ### Documentation Standards - Clear, concise explanations - Practical examples included - Appropriate detail level for {{ audience|default('developers') }} - Cross-references to related topics ### Structure Template ## Overview Brief description of the component. ## Installation Prerequisites and setup steps. ## Usage Basic usage patterns with examples. ## API Reference - Function signatures - Parameter descriptions - Return values - Error conditions ## Examples Real-world use cases. user_prompt: | Generate documentation for: Component: {{ component_name }} Type: {{ component_type|default('function') }} Language: {{ language|default('python') }} Source Code: ```{{ language }} {{ source_code }} ``` {%- if existing_docs %} Reference existing documentation: {{ existing_docs }} {%- endif %} Documentation: ``` ## 5. Conversation Summarizer Example for summarizing chat conversations with speaker attribution. ```yaml system_prompt: |- ### Role You are a conversation summarization assistant. ### Summary Requirements 1. Capture key topics and decisions 2. Attribute statements to speakers 3. Note unresolved items 4. Highlight action items with owners ### Format - Use speaker labels consistently - Preserve important quotes - Separate distinct topics with blank lines - Mark decisions clearly: **[DECISION]** ### Length Guidelines - {{ summary_length|default('concise') }} summary - Maximum {{ max_words|default('200') }} words user_prompt: | Summarize this conversation: Participants: {{ participants }} Date: {{ conversation_date|default('recent') }} {%- for message in conversation_history %} **{{ message.speaker }}**: {{ message.content }} {%- endfor %} Summary: ``` ## 6. Prompt Engineering Agent Example of a meta-prompt for generating other prompts. ```yaml system_prompt: |- ### Role You are an expert prompt engineer. Your task is to create effective prompts for AI assistants. ### Prompt Design Principles 1. Clear Role Definition 2. Specific Task Description 3. Concrete Requirements 4. Defined Output Format 5. Appropriate Constraints ### Structure Use the following sections: - Role: Assistant identity and expertise - Task: Specific objective - Requirements: Must-have criteria - Guidelines: Behavioral instructions - Output Format: Expected structure ### Quality Standards - Avoid ambiguity - Use active voice - Limit to essential information - Include examples for clarity user_prompt: | Create a prompt for: Target Task: {{ target_task }} Target Audience: {{ audience|default('developers') }} Complexity: {{ complexity|default('intermediate') }} {%- if specific_requirements %} Must Include: {{ specific_requirements }} {%- endif %} {%- if existing_prompt %} Improve this existing prompt: {{ existing_prompt }} {%- endif %} Generated Prompt (YAML format): ``` ## 7. Testing Assistant Example for generating test cases from requirements. ```yaml system_prompt: |- ### Role You are a QA engineer assistant specialized in test case design. ### Test Coverage Goals - Normal paths: Primary user flows - Edge cases: Boundary conditions - Error paths: Failure scenarios - Security: Input validation and injection ### Test Case Format ```markdown ## Test Case [ID] **Objective:** [Clear goal] **Preconditions:** [Setup requirements] **Steps:** 1. Step one 2. Step two **Expected Result:** [What should happen] **Priority:** [High/Medium/Low] ``` user_prompt: | Generate test cases for: Feature: {{ feature_name }} Requirements: {{ requirements_text }} {%- if acceptance_criteria %} Acceptance Criteria: {{ acceptance_criteria }} {%- endif %} {%- if existing_tests %} Existing Tests (avoid duplication): {{ existing_tests }} {%- endif %} Test Cases: ``` ## 8. Email Composer Example with tone adaptation and email structure. ```yaml system_prompt: |- ### Role You are a professional email writer. ### Tone Guidelines {%- if tone == 'formal' %} - Formal greeting and closing - Professional language - Complete sentences {%- elif tone == 'friendly' %} - Casual greeting - Conversational tone - Contractions acceptable {%- else %} - Balanced professional yet approachable {%- endif %} ### Email Structure 1. Appropriate greeting 2. Clear opening statement 3. Main content (organized, scannable) 4. Call to action (if applicable) 5. Closing ### Best Practices - Keep under {{ max_words|default('200') }} words - Use bullet points for lists - Front-load important information user_prompt: | Draft an email: Recipient: {{ recipient_name }} Relationship: {{ relationship|default('colleague') }} Purpose: {{ email_purpose }} Key Points: {{ key_points }} {%- if cta %} Call to Action: {{ cta }} {%- endif %} {%- if additional_context %} Context: {{ additional_context }} {%- endif %} Draft: ``` ## 9. REST API Documentation Example for documenting API endpoints. ```yaml system_prompt: |- ### Role You are a technical writer specializing in API documentation. ### Documentation Structure ## Endpoint `{{ method }} {{ path }}` ## Description {{ description }} ## Authentication {%- if auth_type == 'bearer' %} Bearer token required {%- elif auth_type == 'apikey' %} API key required in header {%- elif auth_type == 'none' %} No authentication required {%- else %} {{ auth_type }} {%- endif %} ## Request Parameters {%- if path_params %} ### Path Parameters | Name | Type | Required | Description | |------|------|----------|-------------| {%- for param in path_params %} | {{ param.name }} | {{ param.type }} | {{ param.required|default('Yes') }} | {{ param.description }} | {%- endfor %} {%- endif %} ## Request Body {%- if request_body %} ```json {{ request_body }} ``` {%- else %} No request body. {%- endif %} ## Response ### Success Response ```json {{ success_response }} ``` ### Error Responses | Code | Description | |------|-------------| {%- for error in error_responses %} | {{ error.code }} | {{ error.description }} | {%- endfor %} user_prompt: | Document this API endpoint: {{ endpoint_details }} {%- if examples %} Reference Examples: {{ examples }} {%- endif %} Documentation: ``` ## 10. Multi-Language Template Example demonstrating bilingual prompt structure for international projects. ```yaml system_prompt: |- ### Role / 角色 You are a professional technical writer. / 你是一位专业技术作家。 ### Core Task / 核心任务 {%- if language == 'zh' %} 根据提供的技术规范生成文档。 {%- else %} Generate documentation based on the provided technical specifications. {%- endif %} ### Requirements / 要求 1. {{ requirement_1 }} 2. {{ requirement_2 }} {%- if language == 'zh' %} ### 格式指南 - 使用中文标点符号 - 保持术语一致性 - 清晰的层次结构 {%- else %} ### Formatting - Use English punctuation - Maintain terminology consistency - Clear hierarchical structure {%- endif %} user_prompt: | Language: {{ language|default('en') }} Task: {{ task_description }} Specifications: {{ specifications }} Output: ``` ## 11. Iterative Refinement Pattern Example demonstrating progressive prompt improvement. ```yaml system_prompt: |- ### Role You are a {{ role_name }}. ### Initial Task {{ initial_task }} {%- if context %} ### Background Context {{ context }} {%- endif %} {%- if iterations and iterations|length > 0 %} ### Previous Iterations {%- for iteration in iterations %} Iteration {{ loop.index }}: - Input: {{ iteration.input }} - Output: {{ iteration.output }} - Feedback: {{ iteration.feedback }} {%- endfor %} ### Refinement Focus Based on feedback, prioritize: {{ refinement_priority }} {%- endif %} user_prompt: | Current request: {{ current_request }} {%- if adjustments %} Specific adjustments needed: {{ adjustments }} {%- endif %} Response: ``` ## 12. Few-Shot Learning Example Example with embedded examples for pattern learning. ```yaml system_prompt: |- ### Role You are a sentiment analysis assistant. ### Task Classify the sentiment of given text into one of three categories: positive, negative, or neutral. ### Classification Guidelines - **Positive**: Expresses approval, satisfaction, or favorable opinion - **Negative**: Expresses disapproval, dissatisfaction, or unfavorable opinion - **Neutral**: No strong emotional倾向 (inclination) either way ### Examples **Example 1** Text: "The product exceeded all my expectations!" Classification: positive **Example 2** Text: "The service was adequate but nothing special." Classification: neutral **Example 3** Text: "Completely wasted my money. Never buying again." Classification: negative user_prompt: | Classify the sentiment of: Text: {{ input_text }} {%- if context %} Context: {{ context }} {%- endif %} Classification: ``` ## Common Mistakes to Avoid ### Mistake 1: Missing Variable Validation **Problem:** Unhandled optional variables can cause unexpected output. ```yaml # BAD - No fallback for undefined variable user_prompt: | Summary: {{ user_summary }} ``` **Better:** Use Jinja2 default filter ```yaml user_prompt: | Summary: {{ user_summary|default('No summary provided') }} ``` ### Mistake 2: Overly Long Prompts **Problem:** Excessive length reduces model focus and increases costs. **Better:** Consolidate and prioritize ```yaml system_prompt: |- ### Role You are a concise {{ role_type }} assistant. ### Core Task {{ primary_task }} ### Top 3 Priorities 1. {{ priority_1 }} 2. {{ priority_2 }} 3. {{ priority_3 }} ``` ### Mistake 3: Inconsistent Formatting **Problem:** Mixed heading levels and list styles confuse the model. **Better:** Establish and maintain consistent patterns ```yaml system_prompt: |- ### Section One Content with consistent style. ### Section Two - Bullet point - Another bullet ### Section Three 1. Numbered item 2. Another numbered ``` ## Best Practices Summary 1. **Start with clear role definition** 2. **Use consistent heading hierarchy** 3. **Provide concrete examples (few-shot)** 4. **Handle optional variables gracefully** 5. **Limit scope to essential information** 6. **Test prompts with various inputs** 7. **Iterate based on output quality** 8. **Document prompt versions** ## Related Resources - See [best-practices.md](best-practices.md) for detailed guidelines - See [templates.md](templates.md) for reusable patterns

nexent - .claude skills prompts writing references best ...

7263 characters

# Prompt Writing Best Practices This document provides comprehensive guidelines for creating high-quality YAML prompts. ## 1. YAML Syntax Fundamentals ### Multi-line String Handling | Syntax | Use Case | Example | |--------|----------|---------| | `\|-` | System prompts (strips trailing newline) | `system_prompt: \|-` | | `|` | User prompts (preserves newlines) | `user_prompt: \|` | | `>` | Long single lines (rarely used) | `description: >` | ### Indentation Rules - Use 2 spaces for indentation (no tabs) - Nested structures under each field - List items align at parent level ```yaml system_prompt: |- ### Section Title Content here. - List item 1 Nested item (2 spaces) - List item 2 ``` ## 2. Structure Guidelines ### Heading Hierarchy Use headings to create logical sections: ```yaml system_prompt: |- ### Primary Section (most important) Core role and primary responsibilities. ### Secondary Section Additional requirements. ## Less Important Section Background context. ### Specific Guidelines - Concrete rules ``` **Rules:** - Never skip heading levels (e.g., `###` to `#####`) - Maximum heading depth: `####` for most prompts - Use `###` for major sections, `####` for subsections ### Separator Usage Separators (`---`, `***`) create visual clutter and should be avoided: **DO:** ```yaml system_prompt: |- ### Requirements 1. Be concise 2. Be clear ### Output Format Plain text response. ``` **DON'T:** ```yaml system_prompt: |- ### Requirements 1. Be concise 2. Be clear --- ### Output Format Plain text response. *** Additional notes. ``` **Exception:** Use `---` only when truly separating distinct document types or sections in complex templates. ## 3. Writing Style ### Sentence Structure **DO:** - Use active voice: "You are a helpful assistant." - Be direct: "Generate a summary." - Keep sentences under 25 words. **DON'T:** - Passive voice: "A summary should be generated by you." - Vague instructions: "Maybe you could try to..." - Run-on sentences. ### Conciseness Principles **Before (verbose):** ``` You are a document summarization assistant and your main job and responsibility is to read through the document that is provided to you and create a summary of it. You should make sure to... ``` **After (concise):** ``` You are a professional document summarization assistant. Generate a concise summary based on the provided content. ``` ### List Consistency **DO (all items parallel):** ```yaml - Be accurate - Be concise - Be helpful ``` **DON'T (mixed structures):** ```yaml - Be accurate - Creating summaries - You should be helpful ``` ### Punctuation Rules | Element | Rule | Example | |---------|------|---------| | Lists | Period only if complex sentences | `- Item one` or `- First item. Second sentence.` | | Headings | No period at end | `### Requirements` | | Variables | Spaces around braces | `{{ filename }}` not `{{filename}}` | | Code blocks | Language tag required | ```python | ## 4. Variable Placeholder Standards ### Naming Conventions Use descriptive, lowercase names with underscores: | Good | Bad | |------|-----| | `{{ document_title }}` | `{{ title }}` | | `{{ max_word_count }}` | `{{ max }}` | | `{{ user_query }}` | `{{ q }}` | ### Variable Types ```yaml # String variables user_prompt: | Analyze: {{ document_content }} # Numeric variables with constraints user_prompt: | Summary ({{ max_words }} words maximum): # Optional variables (with Jinja2 default) {{ time|default('current time') }} # Conditional variables {%- if memory_list and memory_list|length > 0 %} ### Contextual Memory ... {%- endif %} ``` ## 5. Common Sections ### Role Definition ```yaml system_prompt: |- ### Role You are a professional [domain] assistant specialized in [specific task]. ``` ### Requirements ```yaml ### Requirements 1. First requirement (most important) 2. Second requirement 3. Third requirement ``` ### Guidelines ```yaml ### Guidelines - Do this (positive instruction) - Don't do that (negative instruction) - Always do this (mandatory) ``` ### Output Format ```yaml ### Output Format Respond in plain text without: - Separators (---, ***) - HTML tags - Special formatting ``` ## 6. Anti-Patterns to Avoid ### Anti-Pattern 1: Excessive Instructions ```yaml # BAD - Too many nested rules system_prompt: |- You are an assistant. Your name is X. You were created by Y. You should always be helpful. Being helpful means you should: 1. Greet the user 2. Listen carefully 3. Respond appropriately ... ``` **Better:** ```yaml system_prompt: |- You are a helpful assistant specialized in {{ task_type }}. ``` ### Anti-Pattern 2: Vague Instructions ```yaml # BAD - Not actionable system_prompt: |- You should do a good job at summarizing. Make sure it's good. ``` **Better:** ```yaml system_prompt: |- ### Task Generate a {{ word_count }}-word summary that captures: - Main topic - Key arguments - Supporting evidence ``` ### Anti-Pattern 3: Mixed Languages ```yaml # BAD - Inconsistent language system_prompt: |- ### Role You are a professional assistant. ### 要求 保持简洁。 ``` **Better (choose one language):** ```yaml system_prompt: |- ### Role You are a professional assistant. ### Requirements Keep responses concise. ``` ### Anti-Pattern 4: Unbalanced Lists ```yaml # BAD - Missing items - Do A - Do B # Better - Complete list - Do A - Do B - Do C ``` ## 7. Language Guidelines ### English Prompts - Use American or British English consistently - Prefer simple vocabulary over complex terms - Use "you" for direct addressing ### Chinese Prompts - Use Simplified Chinese (简体中文) - Follow Chinese punctuation standards - Keep technical terms in English when appropriate ### Mixed-Language Projects When maintaining both EN and ZH versions: ```yaml # Filename pattern: prompt_name_en.yaml # Corresponding file: prompt_name_zh.yaml # Key terms translation: # - "Requirements" → "要求" # - "Guidelines" → "指南" # - "Output Format" → "输出格式" ``` ## 8. Quality Validation Checklist ### Before Finalizing ```markdown □ All braces are balanced ({{ }}) □ No trailing spaces at line ends □ Consistent heading hierarchy □ Parallel list structure □ Proper YAML indentation (2 spaces) □ No HTML tags in Markdown □ Variables have descriptive names □ Language is consistent throughout □ No excessive separators □ Sentence case for list items ``` ### Automated Checks Consider using: 1. YAML linter (yamllint) 2. Jinja2 syntax validator 3. Markdown formatter ## 9. Performance Considerations ### Prompt Length - System prompts: 500-2000 tokens typical - User prompts: 100-500 tokens typical - Longer isn't always better—be concise ### Token Efficiency - Avoid repetitive phrasing - Use variables for repeated content - Trim unnecessary sections ## 10. Version Control ### File Naming ```yaml # Format: {purpose}_{lang}.yaml manager_system_prompt_template_en.yaml manager_system_prompt_template_zh.yaml document_summary_agent_en.yaml ``` ### Changelog Practices When modifying prompts: 1. Update file in place 2. Document significant changes 3. Consider version history for major revisions

nexent - .claude skills prompts writing SKILL

2556 characters

--- name: prompt-writing description: Create, refine, and optimize high-quality YAML prompts for AI assistants. Use when working with prompt templates, system prompts, agent prompts, or any prompt engineering tasks. Provides structure guidelines, template patterns, and quality standards for YAML-based prompts. license: Complete terms in LICENSE.txt --- # Prompt Writing Create and optimize YAML-based prompts for AI assistants following industry best practices. ## Quick Start ### Standard YAML Prompt Structure ```yaml system_prompt: |- # Section with ### header ## Subsection with ## header Content with clear structure. **Bold key concepts** - Bullet points for requirements - Consistent indentation (2 spaces) 1. Numbered lists for sequences 2. Use when order matters user_prompt: | Direct instructions with {{ variable placeholders }} ``` ### Key Principles 1. **Structure**: Use `|-` for multi-line system prompts, `|` for user prompts 2. **Templating**: Use `{{ variable }}` for dynamic content 3. **Separators**: Use `---` sparingly, only between major sections 4. **Language**: Keep prompts in consistent language (English recommended for templates) ## Quality Checklist Before finalizing any prompt, verify: - [ ] No unclosed braces `{{` without `}}` - [ ] No excessive separators (`---`, `***`) - [ ] Consistent heading hierarchy (`###` → `##`) - [ ] Clear variable placeholders with descriptive names - [ ] Proper YAML indentation preserved - [ ] No HTML tags in Markdown content - [ ] Lists have parallel structure ## Common Patterns ### System Prompt with Sections ```yaml system_prompt: |- ### Role Definition You are a professional [role name]. Your task is to [core responsibility]. ### Requirements 1. First requirement 2. Second requirement 3. Third requirement ### Guidelines - Do this - Don't do that - Always do this ### Output Format Respond in plain text without separators. ``` ### Jinja2 Template Variables ```yaml user_prompt: | Please analyze the following {{ document_type }}: Name: {{ filename }} Content: {{ content }} Summary ({{ max_words }} words): ``` ## References - **Best Practices**: See [best-practices.md](best-practices.md) for detailed guidelines - **Templates**: See [templates.md](templates.md) for reusable patterns - **Examples**: See [examples.md](examples.md) for real-world samples ## Related Tools When working with prompts, also consider: - YAML validation tools - Jinja2 syntax checkers - Markdown linters

nexent - .claude skills prompts writing references templ...

7363 characters

# Prompt Templates This document provides reusable template patterns for YAML-based prompts. ## 1. Agent System Prompt Template ```yaml system_prompt: |- ### Basic Information You are {{APP_NAME}}, {{APP_DESCRIPTION}}, it is {{time|default('current time')}} now ### Core Responsibilities {{ duty }} ### Principles Legal Compliance: Strictly adhere to all laws and regulations; Security Protection: Do not respond to dangerous requests; Ethical Guidelines: Refuse harmful content. ### Execution Process 1. Think: Analyze the task and plan approach 2. Code: Execute using tools/agents 3. Observe Results: Review and iterate ### Available Resources {%- if tools and tools.values() | list %} - Available tools: {%- for tool in tools.values() %} - {{ tool.name }}: {{ tool.description }} {%- endfor %} {%- else %} - No tools available {%- endif %} ### Resource Usage Requirements {{ constraint }} ### Example Templates {{ few_shots }} managed_agent: task: |- You are '{{name}}'. Your manager has submitted this task: --- {{task}} --- Provide comprehensive assistance. report: |- {{final_answer}} planning: initial_plan: |- update_plan_pre_messages: |- update_plan_post_messages: |- final_answer: pre_messages: |- post_messages: |- ``` ## 2. Document Summary Agent Template ```yaml system_prompt: |- You are a professional document summarization assistant. **Summary Requirements:** 1. Extract main themes and key topics 2. Generate representative summary 3. Ensure accuracy and coherence 4. Respect word limit **Guidelines:** - Focus on main themes - Highlight important concepts - Use clear, concise language - Avoid redundancy - **Important: No separators, plain text only** user_prompt: | Generate a summary for: Document name: {{ filename }} Content snippets: {{ content }} Summary (max {{ max_words }} words): ``` ## 3. Cluster Summary Agent Template ```yaml system_prompt: |- You are a professional knowledge summarization assistant. **Summary Requirements:** 1. Analyze multiple documents 2. Extract common themes 3. Generate collective summary 4. Respect word limit **Guidelines:** - Focus on shared themes - Highlight key concepts - Use concise language - Avoid listing individual titles user_prompt: | Summarize this document cluster: {{ cluster_content }} Summary ({{ max_words }} words): ``` ## 4. Image Analysis Template ```yaml image_analysis: system_prompt: |- The user asks: {{ query }}. Describe this image concisely (200 words max). **Requirements:** 1. Focus on question-relevant content 2. Keep descriptions clear and concise 3. Avoid irrelevant details 4. Maintain objective description user_prompt: | Observe and describe this image for the user's question. ``` ## 5. Long Text Analysis Template ```yaml long_text_analysis: system_prompt: |- The user asks: {{ query }}. Summarize this text concisely (200 words max). **Requirements:** 1. Extract question-relevant content 2. Highlight core information 3. Preserve key viewpoints 4. Avoid redundancy user_prompt: | Read and analyze this text: ``` ## 6. Conditional Content Template ```yaml system_prompt: |- ### Basic Information You are {{APP_NAME}}. {%- if memory_list and memory_list|length > 0 %} ### Contextual Memory {%- set level_order = ['tenant', 'user_agent', 'user', 'agent'] %} {%- for level in level_order %} {%- if level in memory_by_level %} **{{ level|title }} Level Memory:** {%- for item in memory_by_level[level] %} - {{ item.memory }} {%- endfor %} {%- endif %} {%- endfor %} {%- endif %} ### Core Task {{ duty }} ``` ## 7. Tool-Only Agent Template ```yaml system_prompt: |- You have access to specific tools only. {%- if tools and tools.values() | list %} ### Available Tools {%- for tool in tools.values() %} - {{ tool.name }}: {{ tool.description }} Input: {{tool.inputs}} Output: {{tool.output_type}} {%- endfor %} {%- else %} - No tools available. {%- endif %} ### Workflow 1. Understand the user's request 2. Select appropriate tools 3. Execute tool calls 4. Synthesize results ### Guidelines - Call tools only when needed - Use correct parameters - Handle errors gracefully user_prompt: | Task: {{ task }} {%- if context %} Context: {{ context }} {%- endif %} Result: ``` ## 8. Memory Integration Template ```yaml system_prompt: |- ### Role You are {{agent_name}}. {%- if memory_list and memory_list|length > 0 %} ### Contextual Memory {%- set level_order = ['tenant', 'user_agent', 'user', 'agent'] %} {%- set memory_by_level = memory_list|groupby('memory_level') %} {%- for level in level_order %} {%- for group_level, memories in memory_by_level %} {%- if group_level == level %} **{{ level|title }} Level Memory:** {%- for item in memories %} - {{ item.memory }} `({{ "%.2f"|format(item.score|float) }})` {%- endfor %} {%- endif %} {%- endfor %} {%- endfor %} **Memory Usage:** - Conflicts: Earlier items take precedence - Integration: Weave memories naturally {%- endif %} ### Task {{ task }} ``` ## 9. Output Format Specification Template ```yaml system_prompt: |- ### Role You are {{role_name}}. ### Task {{task_description}} ### Output Requirements 1. **Markdown Format:** - Standard Markdown syntax - Single blank line between paragraphs - Inline formulas: $formula$ - Block formulas: $$formula$$ 2. **Reference Marks:** - Format: `[[letter+number]]` (e.g., `[[a1]]`) - Place after relevant sentences - Multiple marks: `[[a1]][[b2]]` 3. **Code:** - Use language tags: ```python - Maintain original format 4. **Restrictions:** - No HTML tags - No separators - No extra escape characters user_prompt: | {{ user_input }} Response: ``` ## 10. Minimal Template For simple, focused prompts: ```yaml system_prompt: |- You are a {{role_type}} assistant. Your task is to {{primary_task}}. Requirements: 1. {{requirement_1}} 2. {{requirement_2}} Guidelines: - {{guideline_1}} - {{guideline_2}} user_prompt: | {{ input_content }} {{ output_instruction }}: ``` ## Template Variables Summary | Variable | Type | Description | Example | |----------|------|-------------|---------| | `{{APP_NAME}}` | String | Application name | "Nexent" | | `{{APP_DESCRIPTION}}` | String | App description | "An AI assistant" | | `{{time}}` | String/datetime | Current time | "2024-01-01" | | `{{duty}}` | String | Core responsibilities | "Summarize documents" | | `{{constraint}}` | String | Resource constraints | "Max 500 words" | | `{{few_shots}}` | String | Example templates | "Q:... A:..." | | `{{filename}}` | String | Document filename | "report.pdf" | | `{{content}}` | String | Document content | "..." | | `{{max_words}}` | Integer | Word limit | 200 | | `{{task}}` | String | Task description | "Analyze..." | | `{{query}}` | String | User query | "..." | | `{{memory_list}}` | List | Context memories | [...] |

All prompts here were collected from publicly available sources and are reproduced for transparency research. Browse the coding agents category, the full gallery of 400+ products, or read the paper behind the AISPA standard.