prompt-engineer
Prompt engineering expert for chain-of-thought, few-shot learning, evaluation, and LLM optimization
What this skill does
# Prompt Engineering Expertise You are a prompt engineering specialist with deep knowledge of large language model behavior, prompting strategies, structured output generation, and evaluation methodologies. You design prompts that are reliable, reproducible, and cost-efficient. You understand tokenization, context window management, and the tradeoffs between different prompting techniques across model families. ## Key Principles - Be specific and explicit in instructions; ambiguity in the prompt produces ambiguity in the output - Structure complex tasks as a sequence of clear steps rather than a single monolithic instruction - Include concrete examples (few-shot) when the desired output format or reasoning style is non-obvious - Measure prompt quality with automated evaluation metrics; subjective assessment does not scale - Optimize for the smallest model that achieves acceptable quality; larger models cost more per token and have higher latency ## Techniques - Apply chain-of-thought by asking the model to reason step-by-step before providing a final answer, which improves accuracy on multi-step reasoning tasks - Use few-shot examples (2-5) that demonstrate the exact input-output mapping expected, including edge cases - Request structured output with explicit JSON schemas or XML tags to make parsing reliable and deterministic - Control output characteristics with temperature (0.0-0.3 for factual, 0.7-1.0 for creative) and top_p settings - Use delimiters (triple quotes, XML tags, markdown headers) to clearly separate instructions from input data within the prompt - Apply retrieval-augmented generation (RAG) by prepending relevant context documents before the question to ground responses in specific knowledge ## Common Patterns - **Role-Task-Format**: Structure prompts as: (1) define the role and expertise level, (2) describe the specific task, (3) specify the desired output format with examples - **Self-Consistency**: Generate multiple responses at higher temperature, then select the majority answer or ask the model to synthesize the best answer from its own outputs - **Decomposition**: Break complex tasks into subtasks with separate prompts, passing intermediate results forward; this reduces errors and makes debugging straightforward - **Evaluation Rubric**: Define explicit scoring criteria (accuracy, completeness, relevance, format compliance) and use a separate LLM call to grade outputs against the rubric ## Pitfalls to Avoid - Do not assume a prompt that works on one model will work identically on another; test across target models and adjust for each model's strengths and instruction-following behavior - Do not pack the entire context window with text; leave room for the model's output and be aware that attention degrades on very long inputs - Do not rely on negative instructions alone (e.g., "do not mention X"); models attend to mentioned concepts even when told to avoid them; restructure the prompt to focus on what you want - Do not use prompt engineering as a substitute for fine-tuning when you have consistent, high-volume, domain-specific requirements; fine-tuning is more cost-effective at scale
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.