AgentSkillsCN

prompt-engineering

针对 Obsidian 仓库的批量处理:批量标签规范化、维基链接提取与修复、前言编辑、仓库分析与迁移工作流。当需要大规模分析或修改 Obsidian 仓库中的大量笔记,或希望通过脚本/自动化手段实现仓库范围内的批量变更时,可优先选用此方法。

SKILL.md
--- frontmatter
name: prompt-engineering
description: Use this skill when you writing commands, hooks, skills for Agent, or prompts for sub agents or any other LLM interaction, including optimizing prompts, improving LLM outputs, or designing production prompt templates.

Prompt Engineering Patterns

Advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability.

Overview

Effective prompt engineering combines structured patterns, iterative optimization, and psychological principles to achieve consistent, high-quality LLM outputs. This skill covers core capabilities, key patterns, best practices, and production-ready templates.

Core Capabilities

  1. Few-Shot Learning: Teach by showing examples (2-5 input-output pairs)
  2. Chain-of-Thought Prompting: Request step-by-step reasoning
  3. Prompt Optimization: Systematically improve through testing
  4. Template Systems: Build reusable prompt structures
  5. System Prompt Design: Set global behavior and constraints

When to Use

Use prompt engineering when:

  • Writing commands, hooks, or skills for agents
  • Designing prompts for sub-agents
  • Optimizing LLM interactions
  • Building production prompt templates
  • Improving output consistency and reliability

Progressive Loading

L2 Content (loaded when patterns and practices needed):

  • See: references/patterns.md
    • Core Capabilities (detailed)
    • Key Patterns
    • Best Practices
    • Common Pitfalls
    • Integration Patterns
    • Performance Optimization

L3 Content (loaded when advanced techniques and examples needed):

  • See: references/advanced.md
    • The Seven Principles
    • Principle Combinations by Prompt Type
    • Psychology Behind Effective Prompts
    • Ethical Use Guidelines
    • Production Examples
    • Quick Reference