[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M719KCCY2CSJ44JKMQGADDRR":3,"skill-same:01M719KCCY2CSJ44JKMQGADDRR":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":14,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M719KCCY2CSJ44JKMQGADDRR","prompt-engineering",null,"Expert guide on prompt engineering patterns, best practices, and optimization techniques. Use when user wants to improve prompts, learn prompting strategies, or debug agent behavior.","sapsapshen\u002Fai-memory-router","sapsapshen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F20347959?v=4","01M6XDQEF1DP50DKF37H81J3J5","shenmian","01M6XDQEJPE41Y3DT2763X8ZJN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fprompt-engineering\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"engineering","prompt","prompt engineering","use","2026","when","unknown","techniques","prompting","strategies","patterns","community","expert","guide","improve","prompt engineering patterns","Optimization","learn","engineering patterns","debug agent","2026-11-10 10:12:30",false,"---\nname: prompt-engineering\ndescription: \"Expert guide on prompt engineering patterns, best practices, and optimization techniques. Use when user wants to improve prompts, learn prompting strategies, or debug agent behavior.\"\nrisk: unknown\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# Prompt Engineering Patterns\n\nAdvanced prompt engineering techniques to maximize LLM performance, reliability, and controllability.\n\n## Core Capabilities\n\n### 1. Few-Shot Learning\n\nTeach the model by showing examples instead of explaining rules. Include 2-5 input-output pairs that demonstrate the desired behavior. Use when you need consistent formatting, specific reasoning patterns, or handling of edge cases. More examples improve accuracy but consume tokens—balance based on task complexity.\n\n**Example:**\n\n```markdown\nExtract key information from support tickets:\n\nInput: \"My login doesn't work and I keep getting error 403\"\nOutput: {\"issue\": \"authentication\", \"error_code\": \"403\", \"priority\": \"high\"}\n\nInput: \"Feature request: add dark mode to settings\"\nOutput: {\"issue\": \"feature_request\", \"error_code\": null, \"priority\": \"low\"}\n\nNow process: \"Can't upload files larger than 10MB, getting timeout\"\n```\n\n### 2. Chain-of-Thought Prompting\n\nRequest step-by-step reasoning before the final answer. Add \"Let's think step by step\" (zero-shot) or include example reasoning traces (few-shot). Use for complex problems requiring multi-step logic, mathematical reasoning, or when you need to verify the model's thought process. Improves accuracy on analytical tasks by 30-50%.\n\n**Example:**\n\n```markdown\nAnalyze this bug report and determine root cause.\n\nThink step by step:\n\n1. What is the expected behavior?\n2. What is the actual behavior?\n3. What changed recently that could cause this?\n4. What components are involved?\n5. What is the most likely root cause?\n\nBug: \"Users can't save drafts after the cache update deployed yesterday\"\n```\n\n### 3. Prompt Optimization\n\nSystematically improve prompts through testing and refinement. Start simple, measure performance (accuracy, consistency, token usage), then iterate. Test on diverse inputs including edge cases. Use A\u002FB testing to compare variations. Critical for production prompts where consistency and cost matter.\n\n**Example:**\n\n```markdown\nVersion 1 (Simple): \"Summarize this article\"\n→ Result: Inconsistent length, misses key points\n\nVersion 2 (Add constraints): \"Summarize in 3 bullet points\"\n→ Result: Better structure, but still misses nuance\n\nVersion 3 (Add reasoning): \"Identify the 3 main findings, then summarize each\"\n→ Result: Consistent, accurate, captures key information\n```\n\n### 4. Template Systems\n\nBuild reusable prompt structures with variables, conditional sections, and modular components. Use for multi-turn conversations, role-based interactions, or when the same pattern applies to different inputs. Reduces duplication and ensures consistency across similar tasks.\n\n**Example:**\n\n```python\n# Reusable code review template\ntemplate = \"\"\"\nReview this {language} code for {focus_area}.\n\nCode:\n{code_block}\n\nProvide feedback on:\n{checklist}\n\"\"\"\n\n# Usage\nprompt = template.format(\n    language=\"Python\",\n    focus_area=\"security vulnerabilities\",\n    code_block=user_code,\n    checklist=\"1. SQL injection\\n2. XSS risks\\n3. Authentication\"\n)\n```\n\n### 5. System Prompt Design\n\nSet global behavior and constraints that persist across the conversation. Define the model's role, expertise level, output format, and safety guidelines. Use system prompts for stable instructions that shouldn't change turn-to-turn, freeing up user message tokens for variable content.\n\n**Example:**\n\n```markdown\nSystem: You are a senior backend engineer specializing in API design.\n\nRules:\n\n- Always consider scalability and performance\n- Suggest RESTful patterns by default\n- Flag security concerns immediately\n- Provide code examples in Python\n- Use early return pattern\n\nFormat responses as:\n\n1. Analysis\n2. Recommendation\n3. Code example\n4. Trade-offs\n```\n\n## Key Patterns\n\n### Progressive Disclosure\n\nStart with simple prompts, add complexity only when needed:\n\n1. **Level 1**: Direct instruction\n\n   - \"Summarize this article\"\n\n2. **Level 2**: Add constraints\n\n   - \"Summarize this article in 3 bullet points, focusing on key findings\"\n\n3. **Level 3**: Add reasoning\n\n   - \"Read this article, identify the main findings, then summarize in 3 bullet points\"\n\n4. **Level 4**: Add examples\n   - Include 2-3 example summaries with input-output pairs\n\n### Instruction Hierarchy\n\n```\n[System Context] → [Task Instruction] → [Examples] → [Input Data] → [Output Format]\n```\n\n### Error Recovery\n\nBuild prompts that gracefully handle failures:\n\n- Include fallback instructions\n- Request confidence scores\n- Ask for alternative interpretations when uncertain\n- Specify how to indicate missing information\n\n## Best Practices\n\n1. **Be Specific**: Vague prompts produce inconsistent results\n2. **Show, Don't Tell**: Examples are more effective than descriptions\n3. **Test Extensively**: Evaluate on diverse, representative inputs\n4. **Iterate Rapidly**: Small changes can have large impacts\n5. **Monitor Performance**: Track metrics in production\n6. **Version Control**: Treat prompts as code with proper versioning\n7. **Document Intent**: Explain why prompts are structured as they are\n\n## Common Pitfalls\n\n- **Over-engineering**: Starting with complex prompts before trying simple ones\n- **Example pollution**: Using examples that don't match the target task\n- **Context overflow**: Exceeding token limits with excessive examples\n- **Ambiguous instructions**: Leaving room for multiple interpretations\n- **Ignoring edge cases**: Not testing on unusual or boundary inputs\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n","# Prompt Engineering Patterns\n\nAdvanced prompt engineering techniques to maximize LLM performance, reliability, and controllability.\n\n## Core Capabilities\n\n### 1. Few-Shot Learning\n\nTeach the model by showing examples instead of explaining rules. Include 2-5 input-output pairs that demonstrate the desired behavior. Use when you need consistent formatting, specific reasoning patterns, or handling of edge cases. More examples improve accuracy but consume tokens—balance based on task complexity.\n\n**Example:**\n\n```markdown\nExtract key information from support tickets:\n\nInput: \"My login doesn't work and I keep getting error 403\"\nOutput: {\"issue\": \"authentication\", \"error_code\": \"403\", \"priority\": \"high\"}\n\nInput: \"Feature request: add dark mode to settings\"\nOutput: {\"issue\": \"feature_request\", \"error_code\": null, \"priority\": \"low\"}\n\nNow process: \"Can't upload files larger than 10MB, getting timeout\"\n```\n\n### 2. Chain-of-Thought Prompting\n\nRequest step-by-step reasoning before the final answer. Add \"Let's think step by step\" (zero-shot) or include example reasoning traces (few-shot). Use for complex problems requiring multi-step logic, mathematical reasoning, or when you need to verify the model's thought process. Improves accuracy on analytical tasks by 30-50%.\n\n**Example:**\n\n```markdown\nAnalyze this bug report and determine root cause.\n\nThink step by step:\n\n1. What is the expected behavior?\n2. What is the actual behavior?\n3. What changed recently that could cause this?\n4. What components are involved?\n5. What is the most likely root cause?\n\nBug: \"Users can't save drafts after the cache update deployed yesterday\"\n```\n\n### 3. Prompt Optimization\n\nSystematically improve prompts through testing and refinement. Start simple, measure performance (accuracy, consistency, token usage), then iterate. Test on diverse inputs including edge cases. Use A\u002FB testing to compare variations. Critical for production prompts where consistency and cost matter.\n\n**Example:**\n\n```markdown\nVersion 1 (Simple): \"Summarize this article\"\n→ Result: Inconsistent length, misses key points\n\nVersion 2 (Add constraints): \"Summarize in 3 bullet points\"\n→ Result: Better structure, but still misses nuance\n\nVersion 3 (Add reasoning): \"Identify the 3 main findings, then summarize each\"\n→ Result: Consistent, accurate, captures key information\n```\n\n### 4. Template Systems\n\nBuild reusable prompt structures with variables, conditional sections, and modular components. Use for multi-turn conversations, role-based interactions, or when the same pattern applies to different inputs. Reduces duplication and ensures consistency across similar tasks.\n\n**Example:**\n\n```python\n# Reusable code review template\ntemplate = \"\"\"\nReview this {language} code for {focus_area}.\n\nCode:\n{code_block}\n\nProvide feedback on:\n{checklist}\n\"\"\"\n\n# Usage\nprompt = template.format(\n    language=\"Python\",\n    focus_area=\"security vulnerabilities\",\n    code_block=user_code,\n    checklist=\"1. SQL injection\\n2. XSS risks\\n3. Authentication\"\n)\n```\n\n### 5. System Prompt Design\n\nSet global behavior and constraints that persist across the conversation. Define the model's role, expertise level, output format, and safety guidelines. Use system prompts for stable instructions that shouldn't change turn-to-turn, freeing up user message tokens for variable content.\n\n**Example:**\n\n```markdown\nSystem: You are a senior backend engineer specializing in API design.\n\nRules:\n\n- Always consider scalability and performance\n- Suggest RESTful patterns by default\n- Flag security concerns immediately\n- Provide code examples in Python\n- Use early return pattern\n\nFormat responses as:\n\n1. Analysis\n2. Recommendation\n3. Code example\n4. Trade-offs\n```\n\n## Key Patterns\n\n### Progressive Disclosure\n\nStart with simple prompts, add complexity only when needed:\n\n1. **Level 1**: Direct instruction\n\n   - \"Summarize this article\"\n\n2. **Level 2**: Add constraints\n\n   - \"Summarize this article in 3 bullet points, focusing on key findings\"\n\n3. **Level 3**: Add reasoning\n\n   - \"Read this article, identify the main findings, then summarize in 3 bullet points\"\n\n4. **Level 4**: Add examples\n   - Include 2-3 example summaries with input-output pairs\n\n### Instruction Hierarchy\n\n```\n[System Context] → [Task Instruction] → [Examples] → [Input Data] → [Output Format]\n```\n\n### Error Recovery\n\nBuild prompts that gracefully handle failures:\n\n- Include fallback instructions\n- Request confidence scores\n- Ask for alternative interpretations when uncertain\n- Specify how to indicate missing information\n\n## Best Practices\n\n1. **Be Specific**: Vague prompts produce inconsistent results\n2. **Show, Don't Tell**: Examples are more effective than descriptions\n3. **Test Extensively**: Evaluate on diverse, representative inputs\n4. **Iterate Rapidly**: Small changes can have large impacts\n5. **Monitor Performance**: Track metrics in production\n6. **Version Control**: Treat prompts as code with proper versioning\n7. **Document Intent**: Explain why prompts are structured as they are\n\n## Common Pitfalls\n\n- **Over-engineering**: Starting with complex prompts before trying simple ones\n- **Example pollution**: Using examples that don't match the target task\n- **Context overflow**: Exceeding token limits with excessive examples\n- **Ambiguous instructions**: Leaving room for multiple interpretations\n- **Ignoring edge cases**: Not testing on unusual or boundary inputs\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n",{"name":5,"risk":30,"source":35,"date_added":49,"description":7},"2026-02-27","main","7a38d8e7073e61c16eda85681cb32fb68a8657a5","skills-store\u002Fglobal\u002Fprompt-engineering","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router","https:\u002F\u002Fgithub.com\u002Fsapsapshen","2026-04-14 21:12:12",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add sapsapshen\u002Fai-memory-router --skill prompt-engineering",{"tool":62,"command":63},"bunx","bunx skills add sapsapshen\u002Fai-memory-router --skill prompt-engineering",{"tool":65,"command":66},"pnpm","pnpm dlx skills add sapsapshen\u002Fai-memory-router --skill prompt-engineering","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fprompt-engineering\u002FSKILL.md",true,[],[71,95,120,130,143,160],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":82,"publishedAt":44},"01M71ATQRKG48SH06FQ697T5G9","wechat-search","Search WeChat Official Account articles using OpenClaw's web search and fetch capabilities with compliance-focused design.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fwechat-search-release\u002FSKILL.md",[77],{"categoryNo":78,"categoryName":79,"taxonomyType":80,"taxonomyTypeDesc":81},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[83,84,85,86,87,88,89,90,91,92,93,94],"wechat search","wechat","search","capabilities","openclaw","design","web search","compliance","web","official","fetch","with",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":44},"01M71ATNAVGZB35PFYM2GC5N00","trend-tap","Real-time trending topics aggregator across 7 platforms (X\u002FTwitter, Reddit, Google Trends, Hacker News, Zhihu, Bilibili, Weibo). Trigger: when user says 'trend', 'trends', 'trend tap', '热点', '热搜', or asks what is trending\u002Fhot. Do NOT use web_search — this skill already fetches live data from all platforms with zero API keys.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftrend-tap\u002FSKILL.md",[],[102,103,104,105,106,107,85,108,109,110,111,29,112,113,114,115,116,117,118,119],"trend","trend tap","tap","api keys","Bash","time","trending","hacker","aggregator","do","brew","live","data","google","install","read","across","api",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":44},"01M71ATJ9AM5KM15AA8PS302EB","trend-radar","Real-time trending topics aggregator across 7 platforms (X\u002FTwitter, Reddit, Google Trends, Hacker News, Zhihu, Bilibili, Weibo). Trigger: when user says 'trend', 'trends', 'trend pulse', '热点', '热搜', or asks what is trending\u002Fhot. Do NOT use web_search — this skill already fetches live data from all platforms with zero API keys.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftrend-radar\u002FSKILL.md",[],[127,128,102,112,113,114,115,106,85,117,129,118,119,29,110,109,108,116,107,105],"trend radar","radar","pulse",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":44},"01M71ATGF095N3EJM9G8SD0BB5","tech-news-daily","每日科技新闻汇——从全球多个 RSS 源抓取最新科技新闻，翻译（英→中）、去重、排版成每日简报。当用户询问科技新闻、科技新鲜事、每日科技、技术动态、Daily Tech News 或类似表达时触发此技能。","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftech-news-daily\u002FSKILL.md",[],[137,138,139,140,141,142],"news","tech","tech news daily","daily","rss","翻译",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":152,"publishedAt":44},"01M71ATFAEAMQ17M70NQNY7SR8","summarize","Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fsummarize\u002FSKILL.md",[149],{"categoryNo":150,"categoryName":151,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",[145,91,153,154,155,94,112,156,157,158,104,159,116],"Audio","cli","youtube","images","https","files","pdfs",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":44},"01M71ATDNS3R0M4H936PACQAWZ","sonoscli","Control Sonos speakers (discover\u002Fstatus\u002Fplay\u002Fvolume\u002Fgroup).","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fsonoscli\u002FSKILL.md",[],[162,167,168,169,116,170,157,171,172,173,174,175],"status","play","go","latest","github","discover","control","cmd","volume"]