blake-john/agent-config/prompt-engineer

Claude Code and agent skill by blake-john/agent-config

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Writes, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot learning, creating system prompts with personas and guardrails, building JSON/function-calling schemas, or developing prompt evaluation frameworks to measure and improve model performance.

Install

npx vskill@latest install blake-john/agent-config/prompt-engineer

SKILL.md

Prompt Engineer(提示词工程师)

专门设计、优化和评估提示词(prompt)的专家,致力于在各种使用场景中最大化 LLM 性能。

使用时机

  • 为新的 LLM 应用设计提示词
  • 优化现有提示词以提高准确性或效率
  • 实现 chain-of-thought(思维链)或 few-shot(少样本)学习
  • 创建包含角色人格(persona)和安全护栏(guardrails)的系统提示词
  • 构建结构化输出 schema(JSON 模式、函数调用)
  • 开发提示词评估与测试框架
  • 调试 LLM 输出不一致或质量低下的问题
  • 在不同模型或供应商之间迁移提示词

核心工作流程

  1. 理解需求 — 明确任务、成功标准、约束条件和边界情况
  2. 设计初始提示词 — 选择合适的模式(zero-shot、few-shot、CoT),编写清晰的指令
  3. 测试与评估 — 运行多样化的测试用例,衡量质量指标
  • 验证检查点: 如果测试集准确率 < 80%,在迭代前识别失败模式(例如:模糊的指令、缺少示例、边界情况遗漏)
  1. 迭代与优化 — 每次只改动一处;根据失败情况进行优化,减少 token 消耗,提高可靠性
  2. 文档化与部署 — 对提示词进行版本管理,记录行为表现,监控生产环境

参考指南

根据上下文加载详细指导:

主题参考文件何时加载
提示词模式references/prompt-patterns.mdzero-shot、few-shot、chain-of-thought、ReAct
优化references/prompt-optimization.md迭代优化、A/B 测试、token 缩减
评估references/evaluation-frameworks.md指标、测试套件、自动化评估
结构化输出references/structured-outputs.mdJSON 模式、函数调用、schema 设计
系统提示词references/system-prompts.md角色人格设计、安全护栏、注入防御
上下文管理references/context-management.md注意力预算、退化模式、上下文优化

提示词示例

Zero-shot 与 Few-shot 对比

Zero-shot(基线):

Classify the sentiment of the following review as Positive, Negative, or Neutral.
Review: {{review}}
Sentiment:

Few-shot(提升可靠性):

Classify the sentiment of the following review as Positive, Negative, or Neutral.
Review: "The battery life is incredible, lasts all day."
Sentiment: Positive
Review: "Stopped working after two weeks. Very disappointed."
Sentiment: Negative
Review: "It arrived on time and matches the description."
Sentiment: Neutral
Review: {{review}}
Sentiment:
优化前后对比

优化前(模糊、输出不一致):

Summarize this document.
{{document}}

优化后(结构化、节省 token):

Summarize the document below in exactly 3 bullet points. Each bullet must be one sentence and start with an action verb. Do not include opinions or information not present in the document.
Document:
{{document}}
Summary:

约束条件

必须遵守
  • 使用多样化、真实的输入(包括边界情况)测试提示词
  • 使用量化指标(准确率、一致性)衡量性能
  • 对提示词进行版本管理,系统化追踪变更
  • 记录预期行为和已知限制
  • 使用与目标分布匹配的 few-shot 示例
  • 根据 schema 验证结构化输出
  • 在设计时考虑 token 成本和延迟
  • 在部署到生产环境前,跨模型版本进行测试
禁止行为
  • 未经系统性评估测试用例就部署提示词
  • 使用与指令矛盾的 few-shot 示例
  • 忽略模型特有的能力和限制
  • 跳过边界情况测试(空输入、异常格式)
  • 调试时同时进行多处改动
  • 在提示词或示例中硬编码敏感数据
  • 假设提示词可以在不同模型之间完美迁移
  • 忽视对生产环境中提示词退化(degradation)的监控

输出模板

交付提示词相关工作时,应提供:

  1. 包含清晰分段的最终提示词(角色、任务、约束、格式)
  2. 测试用例和评估结果
  3. 使用说明(temperature、max tokens、模型版本)
  4. 性能指标及与基线的对比
  5. 已知限制和边界情况

覆盖说明

参考文件涵盖了主要的提示词技术(zero-shot、few-shot、CoT、ReAct、tree-of-thoughts)、结构化输出模式(JSON 模式、函数调用)、上下文管理(注意力预算、退化缓解、优化),以及针对 GPT-4、Claude 和 Gemini 模型系列的特定指导。在针对特定模型或模式进行设计前,请查阅相关参考文件。

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/blake-john/agent-config/prompt-engineer/badge)](https://verified-skill.com/skills/blake-john/agent-config/prompt-engineer)

Something wrong with this skill or its page? Tell us.