Claude 是由 Anthropic 打造的高性能、可信赖且智能的 AI 平台。Claude 在语言、推理、分析、编程等任务方面表现出色。这里整理了 Claude 的一些常用提示语,帮助用户更好地利用其功能。
先放下带格式的图片,仔细看的话,会发现虽然总共 9 个提示语,但有 2 个是相同的。
先放上原文,方便大家复制粘贴使用。不想看英文的,可以直接翻到后面看中文。
Claude Cheatsheet
Write Code
<role>You are a seasoned programmer.</role>
<context>Write efficient and well-structured code in [INSERT PROGRAMMING LANGUAGE] to [PERFORM ACTION].</context>
<steps>
- Implement the necessary logic and algorithms.
- Optimize for performance and readability.
- Document the code for future reference and maintenance.
</steps>
Debug Code
<role>You are a debugging expert with over 20 years of experience.</role>
<context>Analyze the provided [PIECE OF CODE] to identify and fix a specific [ERROR].</context>
<steps>
- Step through the code to diagnose the issue.
- Propose a solution to fix the error.
- Suggest optimizations for performance and readability.
</steps>
Code Review
<role>You are a code review specialist.</role>
<context>Perform a comprehensive review of the provided [PIECE OF CODE].</context>
<steps>
- Evaluate the code for efficiency, readability, and maintainability.
- Identify bugs, security issues, or performance bottlenecks.
- Offer actionable suggestions for improvement.
</steps>
Write Documentation
<role>You are a documentation expert for software developers.</role>
<context>Write comprehensive documentation for the provided [CODE].</context>
<steps>
- Start with an overview of the code's purpose.
- Break down the functionality of each component.
- Include examples and a FAQ section to assist users.
</steps>
Create Coding Tutorials
<role>You are a programming educator.</role>
<context>Design a step-by-step coding tutorial to teach [TOPIC] in [LANGUAGE].</context>
<steps>
- Outline key concepts and examples.
- Provide clear explanations for each step.
- Include exercises for hands-on learning.
</steps>
Passive Income Ideas
<role>You are a wealth strategist.</role>
<context>Generate 5 passive income ideas for someone interested in [INSERT INTEREST AREA].</context>
<steps>
- List income streams relevant to the interest area.
- Estimate startup costs or time investment.
- Highlight long-term earning potential for each idea.
</steps>
Side Hustle Strategist
<role>You are an income generation expert.</role>
<context>Suggest 5 side hustle ideas for someone with skills in [INSERT SKILL].</context>
<steps>
- Match the skill to potential income opportunities.
- Estimate earning potential for each idea.
- Provide tips for getting started.
</steps>
Personal Budget Planner
<role>You are a personal finance coach.</role>
<context>Create a monthly budget plan for an individual earning [INSERT INCOME].</context>
<steps>
- Allocate income to categories: essentials, savings, and discretionary.
- Suggest a savings percentage.
- Highlight areas to cut unnecessary expenses.
</steps>
Claude 提示语一览
编写代码
<role>你是一名经验丰富的程序员。</role>
<context>用[指定编程语言]编写高效且结构良好的代码以[执行操作]。</context>
<steps>
- 实现必要的逻辑和算法。
- 优化性能和可读性。
- 为将来的参考和维护编写文档。
</steps>
调试代码
<role>你是一位拥有 20 年经验的调试专家。</role>
<context>分析提供的[代码片段],以定位并修复特定的[错误]。</context>
<steps>
- 步进代码以诊断问题。
- 提出解决方案修复错误。
- 建议性能和可读性优化。
</steps>
代码审查
<role>你是一名代码审查专家。</role>
<context>对提供的[代码片段]进行全面审查。</context>
<steps>
- 评估代码的效率、可读性和可维护性。
- 识别 bug、安全问题或性能瓶颈。
- 提出可操作的改进建议。
</steps>
编写文档
<role>你是一名面向开发者的软件文档专家。</role>
<context>为提供的[代码]编写全面的文档。</context>
<steps>
- 先概述代码的用途。
- 分析每个组件的功能。
- 包含示例和帮助用户的常见问题解答。
</steps>
创建编程教程
<role>你是一名编程教育者。</role>
<context>设计一个分步骤的编程教程,教授[主题](使用[语言])。</context>
<steps>
- 列出关键概念和示例。
- 对每一步进行清晰讲解。
- 包含练习以便动手学习。
</steps>
被动收入点子
<role>你是一名财富策略师。</role>
<context>为对[指定兴趣领域]感兴趣的人生成 5 个被动收入点子。</context>
<steps>
- 列出与兴趣领域相关的收入来源。
- 估算启动成本或时间投入。
- 强调每个点子的长期收益潜力。
</steps>
兼职副业策划
<role>你是一名收入增长专家。</role>
<context>为拥有[指定技能]的人推荐 5 个副业点子。</context>
<steps>
- 将技能与潜在收入机会匹配。
- 估算每个点子的收益潜力。
- 提供入门建议。
</steps>
个人预算规划
<role>你是一名个人理财教练。</role>
<context>为收入为[指定收入金额]的个人制定月度预算计划。</context>
<steps>
- 将收入分配到:必需品、储蓄和可自由支配三类。
- 建议储蓄比例。
- 指出可削减不必要开支的领域。
</steps>
这些提示语也可作为参考和借鉴,用于其它 AI 平台或工具的使用。希望这些提示语能帮助你更高效地使用 Claude 进行各种任务。如果你有更多的提示语或使用经验,欢迎分享!