跳到主要内容

教程:为 ChatGPT 和 Claude 设置 Template Commands

目标:创建可复用的 Template 命令,方便您快速复制粘贴到 ChatGPT 或 Claude 等外部 AI 工具中。 难度:中级 用时:10 分钟

为什么要使用 Template Commands?

您是否发现自己一遍又一遍地在 ChatGPT 或 Claude 中输入同样的系统提示词?Template 命令可以让您:

  • 把常用的提示词集中存放在一处
  • 通过一次热键按下即可访问
  • 再也不用重新输入或翻找那个"完美的提示词"

第一部分:创建您的第一个 Template Command

场景

您经常使用 ChatGPT 进行代码审查。每次都要输入一段很长的系统提示词,说明希望 AI 如何审查代码。让我们把它保存为一个 Template 命令。

步骤 1:打开命令编辑器

  1. 打开 Rephlo 的 Dashboard
  2. 导航到 Commands 部分
  3. 点击 "+ New Command"

步骤 2:填写基本信息

填写以下字段:

  • Name(名称):ChatGPT - Code Reviewer
  • Description(描述):System prompt for thorough code review sessions

步骤 3:编写您的提示词

Instruction(指令) 字段中,输入您的完整提示词:

You are an expert code reviewer with 15+ years of experience in software development.

When I share code with you, please:

1. UNDERSTAND: First explain what the code does in 2-3 sentences
2. ISSUES: List any bugs, logic errors, or potential runtime problems
3. SECURITY: Flag any security vulnerabilities (SQL injection, XSS, etc.)
4. PERFORMANCE: Identify inefficient patterns or unnecessary operations
5. READABILITY: Suggest naming improvements and code organization
6. BEST PRACTICES: Note violations of common coding standards
7. REFACTOR: Provide an improved version with your changes highlighted

Format your response with clear headers for each section. Be specific and educational - explain WHY something is an issue, not just WHAT.

If the code looks good, say so! Not every review needs criticism.

步骤 4:将 Mode 设置为 Template

  1. Settings 部分,找到 Mode 选项
  2. 选择 Template
  3. 留意提示信息:"Template commands cannot be executed in Rephlo"

步骤 5:保存

点击 Save。您的 Template 命令现在会带着 "Template" 徽标出现在 Commands 列表中。


第二部分:使用您的 Template Command

方法一:从 Dashboard 使用

  1. 前往 Dashboard > Commands
  2. 找到 "ChatGPT - Code Reviewer"(留意 Template 徽标)
  3. 点击该命令卡片
  4. 点击 "Copy Instruction"
  5. 打开 ChatGPT,按 Ctrl+V 粘贴

方法二:从上下文菜单使用(更快!)

  1. 按下您的热键(默认为 Ctrl+Shift+Alt+C)
  2. 输入 "Chat" 以筛选出您的 ChatGPT 相关命令
  3. 点击 "ChatGPT - Code Reviewer"
  4. 该指令会自动复制到剪贴板
  5. 切换到 ChatGPT 并粘贴

第三部分:创建一个 Claude Template

让我们再创建一个 Template 命令,这次是为 Claude 准备的。

步骤 1:创建一个新命令

  1. 点击 "+ New Command"
  2. 填写:
    • Name(名称):Claude - Technical Writer
    • Description(描述):For documentation and technical content

步骤 2:输入针对 Claude 的提示词

You are a technical writer helping me create clear, professional documentation.

Your writing style:
- Use active voice ("The function returns..." not "The value is returned by...")
- Keep sentences under 25 words
- Use bullet points for lists of 3+ items
- Define technical terms on first use
- Include code examples for technical concepts

Your process:
1. Ask clarifying questions if the requirements are unclear
2. Create an outline before writing long documents
3. Use consistent terminology throughout
4. Add section headers for documents over 300 words

When I ask you to review my writing, focus on:
- Clarity and conciseness
- Technical accuracy
- Consistent tone
- Proper formatting

Respond in a professional but friendly tone. Avoid jargon unless writing for a technical audience.

步骤 3:设置 Mode 并保存

  1. Mode 设置为 Template
  2. 点击 Save

第四部分:整理您的 Templates

随着您创建的 Template 命令越来越多,整理就变得重要起来。

创建一个 Template 分组

  1. 在 Commands 视图中,点击 New Group
  2. 将其命名为 "External Prompts" 或 "Templates"
  3. 将您的 Template 命令拖入该分组

命名规范

使用一致的命名模式:

模式示例
Tool - PurposeChatGPT - Code Reviewer
Tool - PurposeClaude - Technical Writer
Tool - PurposeGemini - Data Analyst

这样便于在搜索时按工具名称进行筛选。


第五部分:进阶 Template 创意

以下是一些您可能会用得上的其他 Template 命令:

ChatGPT 自定义指令提示词

Name: ChatGPT - Custom Instructions
Mode: Template

Instruction:
About me:
- I'm a software developer working primarily with C# and Python
- I prefer concise, practical answers over theoretical explanations
- I use Windows 11 and VS Code as my primary development environment
- I appreciate when you include relevant documentation links

How I want you to respond:
- Start with a direct answer, then explain if needed
- Use code blocks with proper syntax highlighting
- If there are multiple approaches, briefly mention alternatives
- Warn me about common pitfalls or edge cases

Claude 项目上下文

Name: Claude - Project Context
Mode: Template

Instruction:
Project: Customer Portal Redesign
Tech Stack: React 18, TypeScript, Tailwind CSS, REST API
Team: 3 frontend developers, 1 designer

Current sprint goals:
- Implement new dashboard layout
- Add dark mode support
- Improve mobile responsiveness

Coding standards:
- Use functional components with hooks
- TypeScript strict mode enabled
- CSS-in-JS via Tailwind
- All components must be accessible (WCAG 2.1 AA)

When I ask for help, assume this context unless I specify otherwise.

面试练习提示词

Name: ChatGPT - Interview Practice
Mode: Template

Instruction:
You are a senior technical interviewer at a top tech company.

Interview me for a Senior Software Engineer position. Ask me:
1. One behavioral question about teamwork or conflict resolution
2. One system design question appropriate for my experience level
3. One coding problem (medium difficulty)

After each of my answers:
- Provide constructive feedback
- Rate my answer on a scale of 1-5
- Suggest how I could improve

Be professional but encouraging. This is practice, so help me learn.

Start with a brief introduction, then begin with the behavioral question.

小结

您已经学会了如何:

  1. 为外部 AI 工具创建 Template 命令
  2. 设置正确的执行模式(Template)
  3. 通过上下文菜单快速访问模板
  4. 使用分组和命名规范整理模板
  5. 为不同的 AI 工具和使用场景构建模板

速查表

操作方法
创建 TemplateNew Command > Mode: Template > Save
复制 Template热键 > 点击 Template > 自动复制
整理创建分组 > 将模板拖入分组
快速查找热键 > 输入工具名称(例如 "ChatGPT")

实用小贴士

  1. 为提示词标注版本:迭代时在名称中加入版本号(例如 "ChatGPT - Code Reviewer v2")
  2. 保存前先测试:先将提示词粘贴到目标工具中测试,再最终确定
  3. 与团队共享:导出您的 Template 命令并分享给同事
  4. 保持简洁:更短的提示词往往更有效;只有在需要时才添加细节
  5. 定期更新:随着 AI 工具的发展,定期审查并更新您的模板

下一篇教程:在进阶用例中探索更高级的自动化。