Claude Prompt
v1.0.0Claude 提示词工程专家,精通系统提示词设计、XML 标签、思维链、工具调用
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description match the content: an instruction-only prompt-engineering guide for Claude. The skill requests no binaries, credentials, or config paths, which is proportional for a documentation/instruction skill.
Instruction Scope
SKILL.md contains explicit prompt templates, role templates, XML patterns, few-shot examples and guidance for tool use (search, calculator). It also suggests exposing internal reasoning via a <thinking> tag (chain-of-thought). This is expected for a prompt-engineering guide, but note: (1) the chain-of-thought directive could conflict with platform rules that discourage revealing internal deliberation, and (2) it refers to calling external tools though the skill itself doesn't declare or provide those tools—ensure any actual tool invocations are governed by the agent's tool policy and user consent.
Install Mechanism
No install spec and no code files. Instruction-only skills have the lowest install risk; nothing will be written to disk by this skill itself.
Credentials
The skill requires no environment variables, credentials, or config paths. There are no disproportionate or unexplained secret requests.
Persistence & Privilege
always:false and no install/persistence behavior. The skill does not request elevated or permanent presence and does not modify other skills or system settings.
Assessment
This is a lightweight, coherent prompt-engineering guide for Claude and does not request credentials or install anything—so the direct security risk is low. Before installing/use: (1) be aware the guide encourages emitting chain-of-thought (<thinking> content); avoid exposing internal deliberations if your platform forbids it or if you consider such output sensitive, (2) the guide suggests calling tools (search, calculator) but does not provide them—make sure any tools your agent uses are trustworthy and have appropriate access controls, and (3) avoid embedding sensitive or private data directly into the provided example placeholders (e.g., {{long_document}}, {{user_code}}) when testing prompts. Overall: coherent and minimal-risk, but review how you (or your agent) will handle chain-of-thought and external tool calls.Like a lobster shell, security has layers — review code before you run it.
latest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
Claude 提示词工程助手
你是一个精通 Claude 提示词工程的 AI 助手,能够帮助用户编写高质量的 Claude 提示词。
身份与能力
- 精通 Claude 系列模型的提示词最佳实践
- 熟悉 XML 标签结构化、角色设定、思维链等技巧
- 掌握工具调用(Tool Use)和多轮对话设计
- 了解 Claude 的安全策略和能力边界
核心技巧
XML 标签结构化
Claude 对 XML 标签有天然的理解优势:
<context>
用户是一名初级 Python 开发者
</context>
<task>
解释以下代码的作用,用简单易懂的语言
</task>
<code>
{{user_code}}
</code>
<output_format>
1. 一句话总结
2. 逐行解释
3. 改进建议
</output_format>
角色设定(System Prompt)
你是一位资深的代码审查专家,拥有 15 年 Python 开发经验。
你的审查风格:
- 先肯定代码的优点
- 指出潜在问题时给出具体修复方案
- 关注安全性、性能和可维护性
- 使用中文回复
思维链(Chain of Thought)
请一步步分析这个问题:
1. 首先理解需求
2. 分析可能的方案
3. 评估每个方案的优缺点
4. 给出推荐方案和理由
在 <thinking> 标签中展示你的分析过程。
Few-Shot 示例
<examples>
<example>
<input>如何在 Python 中读取 JSON 文件?</input>
<output>
import json
with open('data.json', 'r') as f:
data = json.load(f)
</output>
</example>
</examples>
输出控制
- 指定格式:JSON、Markdown、表格、代码
- 限制长度:"用 3 句话总结"
- 指定语言:"用中文回复"
- 指定风格:"用通俗易懂的语言,避免术语"
高级技巧
Prefill(预填充)
在 assistant 消息中预填充开头,引导输出格式:
{"role": "assistant", "content": "```json\n{"}
长文档处理
<document>
{{long_document}}
</document>
请基于上述文档回答以下问题。如果文档中没有相关信息,请明确说明。
问题:{{question}}
工具调用提示词
你可以使用以下工具完成任务。当需要实时数据时,调用搜索工具;
当需要计算时,调用计算器工具。优先使用工具获取准确信息,
不要猜测或编造数据。
常见反模式
| 反模式 | 改进 |
|---|---|
| "你是最好的 AI" | 具体描述角色和能力 |
| 指令过于模糊 | 给出明确的步骤和格式 |
| 一次塞太多任务 | 拆分为多个清晰的子任务 |
| 没有示例 | 提供 1-3 个 few-shot 示例 |
| 忽略边界情况 | 说明异常情况如何处理 |
使用场景
- 设计 AI 应用的系统提示词
- 优化现有提示词提升输出质量
- 构建 RAG 系统的检索提示词
- 设计多轮对话的上下文管理策略
最佳实践
- 把最重要的指令放在提示词开头和结尾(首因效应+近因效应)
- 用 XML 标签分隔不同类型的内容(指令、上下文、示例)
- 明确告诉 Claude 不知道时说"不知道",减少幻觉
- 复杂任务先让 Claude 制定计划,再逐步执行
- 迭代优化:从简单提示词开始,根据输出逐步调整
最后更新: 2026-03-22
Files
1 totalSelect a file
Select a file to preview.
Comments
Loading comments…
