prompt-leverage
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePrompt Leverage
提示词强化
Turn the user's current prompt into a stronger working prompt without changing the underlying intent. Preserve the task, fill in missing execution structure, and add only enough scaffolding to improve reliability.
在不改变用户核心意图的前提下,将当前提示词转换为更有效的可执行提示词。保留原有任务,补充缺失的执行结构,仅添加必要的框架内容以提升可靠性。
Workflow
工作流程
- Read the raw prompt and identify the real job to be done.
- Infer the task type: coding, research, writing, analysis, planning, or review.
- Rebuild the prompt with the framework blocks in .
references/framework.md - Keep the result proportional: do not over-specify a simple task.
- Return both the improved prompt and a short explanation of what changed when useful.
- 阅读原始提示词,明确实际需要完成的任务。
- 推断任务类型:编码、研究、写作、分析、规划或审核。
- 使用中的框架模块重建提示词。
references/framework.md - 保持结果与任务匹配:不要对简单任务过度指定细节。
- 必要时,同时返回优化后的提示词和简短的修改说明。
Transformation Rules
转换规则
- Preserve the user's objective, constraints, and tone unless they conflict.
- Prefer adding missing structure over rewriting everything stylistically.
- Add context requirements only when they improve correctness.
- Add tool rules only when tool use materially affects correctness.
- Add verification and completion criteria for non-trivial tasks.
- Keep prompts compact enough to be practical in repeated use.
- 保留用户的目标、约束条件和语气,除非它们存在冲突。
- 优先补充缺失的结构,而非全面改写风格。
- 仅当上下文要求能提升正确性时才添加。
- 仅当工具使用对正确性有实质性影响时才添加工具规则。
- 为非简单任务添加验证和完成标准。
- 保持提示词足够简洁,以便重复使用。
Framework Blocks
框架模块
Use these blocks selectively.
- : state the task and what success looks like.
Objective - : list sources, files, constraints, and unknowns.
Context - : set depth, breadth, care, and first-principles expectations.
Work Style - : state when tools, browsing, or file inspection are required.
Tool Rules - : define structure, formatting, and level of detail.
Output Contract - : require checks for correctness, edge cases, and better alternatives.
Verification - : define when the agent should stop.
Done Criteria
选择性使用以下模块。
- :说明任务内容以及成功的标准。
Objective - :列出信息来源、文件、约束条件和未知事项。
Context - :设定深度、广度、细致程度以及基于第一性原理的预期。
Work Style - :说明何时需要使用工具、浏览或文件检查。
Tool Rules - :定义输出结构、格式和详细程度。
Output Contract - :要求对正确性、边缘情况和更优方案进行检查。
Verification - :定义Agent应停止工作的条件。
Done Criteria
Output Modes
输出模式
Choose one mode based on the user request.
- : provide the upgraded prompt only.
Inline upgrade - : provide the prompt plus a brief list of improvements.
Upgrade + rationale - : convert the prompt into a reusable fill-in-the-blank template.
Template extraction - : explain how to apply the framework automatically before execution.
Hook spec
根据用户请求选择一种模式。
- :仅提供优化后的提示词。
Inline upgrade - :提供提示词以及简短的改进说明列表。
Upgrade + rationale - :将提示词转换为可复用的填空式模板。
Template extraction - :说明如何在执行前自动应用该框架。
Hook spec
Hook Pattern
钩子模式
When the user asks for a hook, model it as a pre-processing layer:
- Accept the current prompt.
- Classify the task and risk level.
- Expand the prompt using the framework blocks.
- Return the upgraded prompt for execution.
- Optionally keep a diff or summary of injected structure.
Use when a deterministic first-pass rewrite is helpful.
scripts/augment_prompt.py当用户要求创建钩子时,将其建模为预处理层:
- 接收当前提示词。
- 对任务和风险等级进行分类。
- 使用框架模块扩展提示词。
- 返回优化后的提示词以供执行。
- 可选择保留结构注入的差异或摘要。
当需要确定性的首轮改写时,可使用。
scripts/augment_prompt.pyQuality Bar
质量标准
Before finalizing, check the upgraded prompt:
- still matches the original intent
- does not add unnecessary ceremony
- includes the right verification level for the task
- gives the agent a clear definition of done
If the prompt is already strong, say so and make only minimal edits.
最终确定前,检查优化后的提示词:
- 是否仍符合原始意图
- 是否未添加不必要的冗余内容
- 是否针对任务添加了合适的验证级别
- 是否为Agent明确了完成标准
如果提示词本身已经足够完善,说明情况并仅进行最小化修改。