跳到主要内容

Template 模式

Template 模式是三种命令执行模式之一。与 Combination 和 Standalone 模式不同,Template 命令永远不会在 Rephlo 内部通过 AI 模型运行——它的指令内容会直接复制到您的剪贴板,以便您粘贴到 ChatGPT、Claude 或 Gemini 等外部 AI 工具中使用。

什么是 Template 模式?

Template 命令保存的是一个完整、自成一体的 prompt。这里没有输入文本的采集,没有 Space 数据的注入,也没有模型调用。当您"使用"一个 Template 命令时,Rephlo 只会将指令文本复制到您的剪贴板并显示一条确认信息。

这使得 Template 模式非常适合那些您希望与其他命令一起整理保存、但要在别处运行的 prompt。

如需更深入地比较这三种模式,请参见 CommandsExecution Workflows


何时使用 Template 模式

当您想要以下操作时,Template 模式是正确的选择:

  • 为外部 AI 工具(ChatGPT、Claude、Gemini 等)存储可复用的 prompt
  • 与使用不同 AI 服务的同事分享 prompt
  • 构建 prompt 库,不依赖于已选中的文本
  • 将常用的 prompt 与您可执行的命令一起整理保存
使用场景为什么用 Template 模式?
ChatGPT system prompt完整的 prompt,可直接粘贴到 custom instructions 中
Claude 项目 prompt为 Claude 项目的上下文存储 prompt
面试准备用于练习的自成一体的 prompt
写作框架在开始撰写文档前粘贴使用的详细写作指南
研究方法论针对复杂主题的分步分析框架

如何创建一个 Template 命令

步骤 1:打开 Command Editor

  1. 进入侧边栏中的 Commands
  2. 点击 New Command(或编辑已有命令)。

步骤 2:配置为 Template

  1. 输入一个描述性的 Name(例如 "ChatGPT - Coding Assistant")。
  2. Instruction 字段中填写您完整的 prompt。
  3. Mode 设置为 Template
  4. 点击 Save

显示变量占位符的 template 命令详情

New Command 表单包含一个 Basic Info 部分(Name、Description)、一个用于填写完整 prompt 的 Instruction 文本区域,以及一个 Settings 部分,其中的 Mode 选择器提供 Standalone、Combination 和 Template 三个选项。选择 Template 后会显示一条说明,指出 template 命令不会在 Rephlo 中执行,而是通过 Copy Instruction 操作来使用。

注意:Template 命令会在命令列表和上下文菜单浮层中显示 TMPL 徽章,以便与可执行命令区分开来。


使用 Template 命令

Template 命令的工作方式与其他命令不同:它们不会执行,而是将 prompt 复制到您的剪贴板。

从命令列表操作

  1. Commands 中找到您的 Template 命令(可按 Template 筛选,只显示这类命令)。
  2. 留意命令名称旁的 TMPL 徽章。
  3. 使用 Copy Instruction 操作将 prompt 复制到剪贴板。
  4. 粘贴到 ChatGPT、Claude 或任何其他 AI 工具中。

从上下文菜单浮层操作

  1. 按下您的快捷键(默认情况下,Windows/Linux 上为 Ctrl+Shift+Alt+C,macOS 上为 Shift+Cmd+C)。
  2. 找到您的 Template 命令(标有 TMPL 徽章)。
  3. 选择该命令。
  4. 指令内容会自动复制到您的剪贴板,并弹出一条确认气泡提示。
  5. 切换到您的外部 AI 工具中并粘贴。

Template 模式的限制

由于 Template 命令是为在外部使用而设计的,Rephlo 会刻意禁用应用内执行。如果您尝试运行这样的命令,Rephlo 会显示一条消息,说明这是一个已保存的 prompt,并提示改用 Copy Instruction

功能是否支持?原因
在 Rephlo 中执行Template 是为外部工具保存的 prompt
已选中文本采集Template 是自成一体的
Space 数据注入不会组装任何运行时上下文
History 跟踪执行发生在外部

提示:如果您需要一个既能在 Rephlo 内部运行、又能在外部复用的命令,请创建两个版本——一个使用 Combination 或 Standalone 模式,另一个使用 Template 模式。


整理 Template 命令

使用 Command Groups

将 template 集中放入一个专用分组,以便统一管理:

  1. 进入 Commands
  2. 创建一个名为 "Templates" 或 "External Prompts" 的新分组(参见 Command Groups)。
  3. 将您的 Template 命令拖入该分组。

命名约定

在 Template 命令名称前加上目标工具的前缀,方便快速找到正确的 prompt:

  • "ChatGPT - Coding Assistant"
  • "Claude - Research Helper"
  • "Gemini - Data Analyst"

Template 命令示例

用于代码审查的 ChatGPT System Prompt

Name: ChatGPT - Code Reviewer
Mode: Template

Instruction:
You are an expert code reviewer with experience in multiple programming languages.
When I share code with you, please:

1. Identify the language and framework being used
2. Check for:
- Logic errors and bugs
- Security vulnerabilities
- Performance issues
- Code style and readability
3. Suggest specific improvements with examples
4. Rate the code quality on a scale of 1-10

Be constructive and educational in your feedback. Explain WHY something is an
issue, not just WHAT the issue is.

用于写作的 Claude 项目上下文

Name: Claude - Technical Writer
Mode: Template

Instruction:
You are a technical writer helping me create clear, concise documentation.

Guidelines:
- Use active voice
- Keep sentences under 20 words when possible
- Use bullet points for lists of 3+ items
- Include code examples for technical concepts
- Define jargon on first use

When I ask you to write or edit content, follow these guidelines strictly.
Ask clarifying questions if the requirements are unclear.

在不同模式之间转换

您可以随时更改一个命令的执行模式:

  1. 以编辑模式打开该命令。
  2. 更改 Mode 设置。
  3. 点击 Save

转换为 Template 模式:

  • 该命令将不再出现在执行工作流中。
  • 已选中文本采集和 Space 数据注入将不再适用。

从 Template 模式转换:

  • 对于 Standalone 模式,请在您希望插入已选中文本的位置添加一个 {{input_content}} 占位符。
  • 对于 Combination 模式,您可以选择性地指定一个默认的 Space,以便自动注入上下文。

下一步:使用 AI Command Builder 通过简单的自然语言描述来构建命令。