[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75G7TJD01KBQ40WWCPB1VBY":3,"skill-same:01M75G7TJD01KBQ40WWCPB1VBY":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M75G7TJD01KBQ40WWCPB1VBY","prompt-engineering-patterns",null,"This skill should be used when the user asks to \"optimize a prompt\", \"improve prompt performance\", \"design a prompt template\", \"write better prompts\", \"debug prompt issues\", \"use chain-of-thought\", \"structured prompting\", \"few-shot prompting\", or wants to apply advanced prompt engineering patterns for production LLM applications.","RudyCity\u002Fsuperagent","RudyCity","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F82188919?v=4","01M75FP5X8AW8ACBH0SH34WS7M","01M75FP5YAHJK8M1Q52BWXB82K",70,"MIT","https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprompt-engineering-patterns\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: prompt-engineering-patterns\ndescription: >-\n  This skill should be used when the user asks to \"optimize a prompt\", \"improve prompt\n  performance\", \"design a prompt template\", \"write better prompts\", \"debug prompt issues\", \"use\n  chain-of-thought\", \"structured prompting\", \"few-shot prompting\", or wants to apply advanced\n  prompt engineering patterns for production LLM applications.\n---\n\n# Prompt Engineering Patterns\n\nMaster advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability.\n\n## When to Use This Skill\n\n- Designing complex prompts for production LLM applications\n- Optimizing prompt performance and consistency\n- Implementing structured reasoning patterns (chain-of-thought, tree-of-thought)\n- Building few-shot learning systems with dynamic example selection\n- Creating reusable prompt templates with variable interpolation\n- Debugging and refining prompts that produce inconsistent outputs\n- Implementing system prompts for specialized AI assistants\n- Using structured outputs (JSON mode) for reliable parsing\n\n## Core Capabilities\n\n### 1. Few-Shot Learning\n\n- Example selection strategies (semantic similarity, diversity sampling)\n- Balancing example count with context window constraints\n- Constructing effective demonstrations with input-output pairs\n- Dynamic example retrieval from knowledge bases\n- Handling edge cases through strategic example selection\n\n### 2. Chain-of-Thought Prompting\n\n- Step-by-step reasoning elicitation\n- Zero-shot CoT with \"Let's think step by step\"\n- Few-shot CoT with reasoning traces\n- Self-consistency techniques (sampling multiple reasoning paths)\n- Verification and validation steps\n\n### 3. Structured Outputs\n\n- JSON mode for reliable parsing\n- Pydantic schema enforcement\n- Type-safe response handling\n- Error handling for malformed outputs\n\n### 4. Prompt Optimization\n\n- Iterative refinement workflows\n- A\u002FB testing prompt variations\n- Measuring prompt performance metrics (accuracy, consistency, latency)\n- Reducing token usage while maintaining quality\n- Handling edge cases and failure modes\n\n### 5. Template Systems\n\n- Variable interpolation and formatting\n- Conditional prompt sections\n- Multi-turn conversation templates\n- Role-based prompt composition\n- Modular prompt components\n\n### 6. System Prompt Design\n\n- Setting model behavior and constraints\n- Defining output formats and structure\n- Establishing role and expertise\n- Safety guidelines and content policies\n- Context setting and background information\n\n## Quick Start\n\n```python\nfrom langchain_anthropic import ChatAnthropic\nfrom langchain_core.prompts import ChatPromptTemplate\nfrom pydantic import BaseModel, Field\n\n# Define structured output schema\nclass SQLQuery(BaseModel):\n    query: str = Field(description=\"The SQL query\")\n    explanation: str = Field(description=\"Brief explanation of what the query does\")\n    tables_used: list[str] = Field(description=\"List of tables referenced\")\n\n# Initialize model with structured output\nllm = ChatAnthropic(model=\"claude-sonnet-4-6\")\nstructured_llm = llm.with_structured_output(SQLQuery)\n\n# Create prompt template\nprompt = ChatPromptTemplate.from_messages([\n    (\"system\", \"\"\"You are an expert SQL developer. Generate efficient, secure SQL queries.\n    Always use parameterized queries to prevent SQL injection.\n    Explain your reasoning briefly.\"\"\"),\n    (\"user\", \"Convert this to SQL: {query}\")\n])\n\n# Create chain\nchain = prompt | structured_llm\n\n# Use\nresult = await chain.ainvoke({\n    \"query\": \"Find all users who registered in the last 30 days\"\n})\nprint(result.query)\nprint(result.explanation)\n```\n\n## Detailed patterns and worked examples\n\nDetailed pattern documentation lives in `references\u002Fdetails.md`. Read that file when the navigation tier above is insufficient.\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. **Use Structured Outputs**: Enforce schemas with Pydantic for reliability\n4. **Test Extensively**: Evaluate on diverse, representative inputs\n5. **Iterate Rapidly**: Small changes can have large impacts\n6. **Monitor Performance**: Track metrics in production\n7. **Version Control**: Treat prompts as code with proper versioning\n8. **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- **No error handling**: Assuming outputs will always be well-formed\n- **Hardcoded values**: Not parameterizing prompts for reuse\n\n## Success Metrics\n\nTrack these KPIs for your prompts:\n\n- **Accuracy**: Correctness of outputs\n- **Consistency**: Reproducibility across similar inputs\n- **Latency**: Response time (P50, P95, P99)\n- **Token Usage**: Average tokens per request\n- **Success Rate**: Percentage of valid, parseable outputs\n- **User Satisfaction**: Ratings and feedback\n","# Prompt Engineering Patterns\n\nMaster advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability.\n\n## When to Use This Skill\n\n- Designing complex prompts for production LLM applications\n- Optimizing prompt performance and consistency\n- Implementing structured reasoning patterns (chain-of-thought, tree-of-thought)\n- Building few-shot learning systems with dynamic example selection\n- Creating reusable prompt templates with variable interpolation\n- Debugging and refining prompts that produce inconsistent outputs\n- Implementing system prompts for specialized AI assistants\n- Using structured outputs (JSON mode) for reliable parsing\n\n## Core Capabilities\n\n### 1. Few-Shot Learning\n\n- Example selection strategies (semantic similarity, diversity sampling)\n- Balancing example count with context window constraints\n- Constructing effective demonstrations with input-output pairs\n- Dynamic example retrieval from knowledge bases\n- Handling edge cases through strategic example selection\n\n### 2. Chain-of-Thought Prompting\n\n- Step-by-step reasoning elicitation\n- Zero-shot CoT with \"Let's think step by step\"\n- Few-shot CoT with reasoning traces\n- Self-consistency techniques (sampling multiple reasoning paths)\n- Verification and validation steps\n\n### 3. Structured Outputs\n\n- JSON mode for reliable parsing\n- Pydantic schema enforcement\n- Type-safe response handling\n- Error handling for malformed outputs\n\n### 4. Prompt Optimization\n\n- Iterative refinement workflows\n- A\u002FB testing prompt variations\n- Measuring prompt performance metrics (accuracy, consistency, latency)\n- Reducing token usage while maintaining quality\n- Handling edge cases and failure modes\n\n### 5. Template Systems\n\n- Variable interpolation and formatting\n- Conditional prompt sections\n- Multi-turn conversation templates\n- Role-based prompt composition\n- Modular prompt components\n\n### 6. System Prompt Design\n\n- Setting model behavior and constraints\n- Defining output formats and structure\n- Establishing role and expertise\n- Safety guidelines and content policies\n- Context setting and background information\n\n## Quick Start\n\n```python\nfrom langchain_anthropic import ChatAnthropic\nfrom langchain_core.prompts import ChatPromptTemplate\nfrom pydantic import BaseModel, Field\n\n# Define structured output schema\nclass SQLQuery(BaseModel):\n    query: str = Field(description=\"The SQL query\")\n    explanation: str = Field(description=\"Brief explanation of what the query does\")\n    tables_used: list[str] = Field(description=\"List of tables referenced\")\n\n# Initialize model with structured output\nllm = ChatAnthropic(model=\"claude-sonnet-4-6\")\nstructured_llm = llm.with_structured_output(SQLQuery)\n\n# Create prompt template\nprompt = ChatPromptTemplate.from_messages([\n    (\"system\", \"\"\"You are an expert SQL developer. Generate efficient, secure SQL queries.\n    Always use parameterized queries to prevent SQL injection.\n    Explain your reasoning briefly.\"\"\"),\n    (\"user\", \"Convert this to SQL: {query}\")\n])\n\n# Create chain\nchain = prompt | structured_llm\n\n# Use\nresult = await chain.ainvoke({\n    \"query\": \"Find all users who registered in the last 30 days\"\n})\nprint(result.query)\nprint(result.explanation)\n```\n\n## Detailed patterns and worked examples\n\nDetailed pattern documentation lives in `references\u002Fdetails.md`. Read that file when the navigation tier above is insufficient.\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. **Use Structured Outputs**: Enforce schemas with Pydantic for reliability\n4. **Test Extensively**: Evaluate on diverse, representative inputs\n5. **Iterate Rapidly**: Small changes can have large impacts\n6. **Monitor Performance**: Track metrics in production\n7. **Version Control**: Treat prompts as code with proper versioning\n8. **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- **No error handling**: Assuming outputs will always be well-formed\n- **Hardcoded values**: Not parameterizing prompts for reuse\n\n## Success Metrics\n\nTrack these KPIs for your prompts:\n\n- **Accuracy**: Correctness of outputs\n- **Consistency**: Reproducibility across similar inputs\n- **Latency**: Response time (P50, P95, P99)\n- **Token Usage**: Average tokens per request\n- **Success Rate**: Percentage of valid, parseable outputs\n- **User Satisfaction**: Ratings and feedback\n",{"name":5,"description":7},"main","62c7af5ced2c21355d148c243edb6d5921cca1a6",".agents\u002Fskills\u002Fprompt-engineering-patterns",8,"https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent","https:\u002F\u002Fgithub.com\u002FRudyCity","2026-11-14 22:58:49",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add RudyCity\u002Fsuperagent --skill prompt-engineering-patterns",{"tool":36,"command":37},"bunx","bunx skills add RudyCity\u002Fsuperagent --skill prompt-engineering-patterns",{"tool":39,"command":40},"pnpm","pnpm dlx skills add RudyCity\u002Fsuperagent --skill prompt-engineering-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprompt-engineering-patterns\u002FSKILL.md",true,[44,50,54,60,64,68,72,76,80],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"assets\u002Ffew-shot-examples.json","ASSET","资产文件",4174,"https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprompt-engineering-patterns\u002Fassets\u002Ffew-shot-examples.json",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"assets\u002Fprompt-template-library.md",3291,"https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprompt-engineering-patterns\u002Fassets\u002Fprompt-template-library.md",{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fchain-of-thought.md","REFERENCE","参考文档",9401,"https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprompt-engineering-patterns\u002Freferences\u002Fchain-of-thought.md",{"path":61,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fdetails.md",9199,"https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprompt-engineering-patterns\u002Freferences\u002Fdetails.md",{"path":65,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Ffew-shot-learning.md",11188,"https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprompt-engineering-patterns\u002Freferences\u002Ffew-shot-learning.md",{"path":69,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fprompt-optimization.md",12792,"https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprompt-engineering-patterns\u002Freferences\u002Fprompt-optimization.md",{"path":73,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fprompt-templates.md",11409,"https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprompt-engineering-patterns\u002Freferences\u002Fprompt-templates.md",{"path":77,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fsystem-prompts.md",5444,"https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprompt-engineering-patterns\u002Freferences\u002Fsystem-prompts.md",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"scripts\u002Foptimize-prompt.py","SCRIPT","脚本",9159,"https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprompt-engineering-patterns\u002Fscripts\u002Foptimize-prompt.py",[87,94,101,108,115,122],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M75GP28CM6QCSXSHKFF3NNKS","telegram_bot","Use Telegram Bot when the user asks for Telegram Bot or this provider's API.","https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002Fmuse-bridge-kit\u002Fskills\u002Ftelegram-bot\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M75GNZGZYM7NWDV6MBP3HS14","superagent-bridge","Operate the Muse\u003C->superagent Telegram bridge: poll the private group for task_request\u002Ftask_result envelopes, validate senders, and reply with task_batch\u002Ftask_done as Muse (the remote brain).","https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002Fmuse-bridge-kit\u002Fskills\u002Fsuperagent-bridge\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":18},"01M75GNHN19HJWZ7NAPM5E5JCV","Writing Skills","TDD for process documentation - test with subagents before writing, iterate until bulletproof","https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":18},"01M75GNCQEKVRA4FH161NZPZNB","writing-shape","Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.","https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":18},"01M75GNAF9NAYCSTBDZDGMK0DZ","Writing Plans","Create detailed implementation plans with bite-sized tasks for engineers with zero codebase context","https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":18},"01M75GN72EV0V5NQAW9CSPFRFH","writing-guidelines","Review docs\u002Fprose for Writing Guidelines compliance. Use when asked to \"review my docs\", \"check writing style\", \"audit prose\", \"review docs voice and tone\", or \"check this page against the writing handbook\".","https:\u002F\u002Fgithub.com\u002FRudyCity\u002Fsuperagent\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-guidelines\u002FSKILL.md",[],[]]