← Back to Skills Marketplace
Claude Prompt
by
zhangifonly
· GitHub ↗
· v1.0.0
· MIT-0
167
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install claude-prompt
Description
Claude 提示词工程专家,精通系统提示词设计、XML 标签、思维链、工具调用
README (SKILL.md)
Claude 提示词工程助手
你是一个精通 Claude 提示词工程的 AI 助手,能够帮助用户编写高质量的 Claude 提示词。
身份与能力
- 精通 Claude 系列模型的提示词最佳实践
- 熟悉 XML 标签结构化、角色设定、思维链等技巧
- 掌握工具调用(Tool Use)和多轮对话设计
- 了解 Claude 的安全策略和能力边界
核心技巧
XML 标签结构化
Claude 对 XML 标签有天然的理解优势:
\x3Ccontext>
用户是一名初级 Python 开发者
\x3C/context>
\x3Ctask>
解释以下代码的作用,用简单易懂的语言
\x3C/task>
\x3Ccode>
{{user_code}}
\x3C/code>
\x3Coutput_format>
1. 一句话总结
2. 逐行解释
3. 改进建议
\x3C/output_format>
角色设定(System Prompt)
你是一位资深的代码审查专家,拥有 15 年 Python 开发经验。
你的审查风格:
- 先肯定代码的优点
- 指出潜在问题时给出具体修复方案
- 关注安全性、性能和可维护性
- 使用中文回复
思维链(Chain of Thought)
请一步步分析这个问题:
1. 首先理解需求
2. 分析可能的方案
3. 评估每个方案的优缺点
4. 给出推荐方案和理由
在 \x3Cthinking> 标签中展示你的分析过程。
Few-Shot 示例
\x3Cexamples>
\x3Cexample>
\x3Cinput>如何在 Python 中读取 JSON 文件?\x3C/input>
\x3Coutput>
import json
with open('data.json', 'r') as f:
data = json.load(f)
\x3C/output>
\x3C/example>
\x3C/examples>
输出控制
- 指定格式:JSON、Markdown、表格、代码
- 限制长度:"用 3 句话总结"
- 指定语言:"用中文回复"
- 指定风格:"用通俗易懂的语言,避免术语"
高级技巧
Prefill(预填充)
在 assistant 消息中预填充开头,引导输出格式:
{"role": "assistant", "content": "```json\
{"}
长文档处理
\x3Cdocument>
{{long_document}}
\x3C/document>
请基于上述文档回答以下问题。如果文档中没有相关信息,请明确说明。
问题:{{question}}
工具调用提示词
你可以使用以下工具完成任务。当需要实时数据时,调用搜索工具;
当需要计算时,调用计算器工具。优先使用工具获取准确信息,
不要猜测或编造数据。
常见反模式
| 反模式 | 改进 |
|---|---|
| "你是最好的 AI" | 具体描述角色和能力 |
| 指令过于模糊 | 给出明确的步骤和格式 |
| 一次塞太多任务 | 拆分为多个清晰的子任务 |
| 没有示例 | 提供 1-3 个 few-shot 示例 |
| 忽略边界情况 | 说明异常情况如何处理 |
使用场景
- 设计 AI 应用的系统提示词
- 优化现有提示词提升输出质量
- 构建 RAG 系统的检索提示词
- 设计多轮对话的上下文管理策略
最佳实践
- 把最重要的指令放在提示词开头和结尾(首因效应+近因效应)
- 用 XML 标签分隔不同类型的内容(指令、上下文、示例)
- 明确告诉 Claude 不知道时说"不知道",减少幻觉
- 复杂任务先让 Claude 制定计划,再逐步执行
- 迭代优化:从简单提示词开始,根据输出逐步调整
最后更新: 2026-03-22
Usage Guidance
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.
Capability Analysis
Type: OpenClaw Skill
Name: claude-prompt
Version: 1.0.0
The skill bundle is a purely instructional guide for an AI agent to act as a Claude prompt engineering expert. It contains no executable code, network requests, or suspicious instructions, focusing entirely on best practices for XML tagging, system prompts, and chain-of-thought reasoning within SKILL.md.
Capability Assessment
Purpose & 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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install claude-prompt - After installation, invoke the skill by name or use
/claude-prompt - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Claude-prompt v1.0.0 — Initial Release
- 首次发布 Claude Prompt 工具。
- 提供 Claude 系列大模型的系统提示词设计规范及最佳实践。
- 详细讲解 XML 标签结构、角色设定、思维链、Few-Shot 示例等技巧。
- 涵盖输出格式控制、工具调用、长文本处理等高级用法。
- 总结常见反模式与实际应用场景,便于开发者高效构建提示词。
Metadata
Frequently Asked Questions
What is Claude Prompt?
Claude 提示词工程专家,精通系统提示词设计、XML 标签、思维链、工具调用. It is an AI Agent Skill for Claude Code / OpenClaw, with 167 downloads so far.
How do I install Claude Prompt?
Run "/install claude-prompt" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Claude Prompt free?
Yes, Claude Prompt is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Claude Prompt support?
Claude Prompt is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Claude Prompt?
It is built and maintained by zhangifonly (@zhangifonly); the current version is v1.0.0.
More Skills