AgentSkillsCN

ai-prompting

掌握 AI 提示工程与大模型交互模式。当用户提出“撰写提示词”“优化提示词”“设计系统提示词”“少样本提示”“思维链”“提示词技巧”“大模型应用模式”“提示词最佳实践”“模型交互方式”“AI 助手设计”,或提及提示词优化、大模型交互、生成式 AI 模式等相关需求时使用。

SKILL.md
--- frontmatter
name: ai-prompting
description: AI prompt engineering and LLM interaction patterns. Use when user asks to "write prompts", "optimize prompts", "design system prompts", "few-shot prompting", "chain-of-thought", "prompt techniques", "LLM patterns", "prompt best practices", "model interactions", "AI assistant design", or mentions prompt optimization, LLM interactions, or generative AI patterns.

AI Prompting & LLM Patterns

Prompt engineering techniques and LLM interaction patterns for Claude, GPT, and other AI models.

Prompt Techniques

Basic Structure

code
Role: [Specify role/expertise]
Task: [Clear, specific task]
Context: [Relevant background]
Format: [Desired output format]
Constraints: [Any limitations]

Few-Shot Prompting

Provide 2-3 examples of input-output pairs before the actual request to guide model behavior.

Chain-of-Thought

Ask model to "explain your reasoning step by step" for complex tasks. Improves accuracy on logical problems.

System Prompts

Design detailed system prompts that establish persona, expertise level, and behavioral guidelines.

Key Strategies

  1. Clarity - Be specific and unambiguous
  2. Examples - Provide concrete examples
  3. Constraints - Define output format and limits
  4. Role Definition - Specify expertise and perspective
  5. Iterative Refinement - Test and improve prompts

Common Patterns

  • Classification & Categorization
  • Text Generation & Creative Writing
  • Code Generation & Debugging
  • Data Extraction & Parsing
  • Analysis & Reasoning
  • Summarization & Synthesis
  • Translation & Conversion
  • Problem Solving & Ideation

References

  • OpenAI Prompt Engineering Guide
  • Anthropic Claude Best Practices
  • Prompt Engineering Institute