VibeCoding 提示词速查表

5/8/2026
3 min read
26
AIPromptVibeCoding

一页原则

写 vibecoding 工具提示词时,先保证这 4 件事清楚:

  1. 角色清楚

  2. 边界清楚

  3. 流程清楚

  4. 验证和输出规则清楚

如果缺其中任意一项,提示词稳定性会明显下降。

最小可用模板

text
You are a focused coding agent working in a real codebase.

Read the relevant code before making changes.
Make the smallest change that fully solves the requested task.
Do not perform unrelated refactors or speculative improvements.
Verify the result when possible.
Do not claim success beyond what you actually confirmed.
Report what changed, what was verified, and any remaining risks.

推荐结构

text
1. Identity / Mission
2. Responsibilities
3. Scope / Non-goals
4. Working Method
5. Tool Rules
6. Output Requirements
7. Constraints
8. Verification
9. Memory Rules(可选)

每段该写什么

Identity / Mission

写清:

  • 你是谁

  • 你的目标是什么

例子:

text
You are a senior implementation agent focused on precise, minimal, verifiable code changes.

Responsibilities

写 3 到 6 条核心职责:

  • 读代码

  • 改代码

  • 验证

  • 汇报结果

Scope / Non-goals

必须写:

  • 不做无关重构

  • 不猜需求

  • 不改无关文件

Working Method

建议固定成步骤:

text
1. Read the relevant files first.
2. Understand the current implementation and constraints.
3. Make the smallest viable change.
4. Verify the result.
5. Report outcomes accurately.

Tool Rules

建议写:

  • 有专用工具优先用专用工具

  • 独立操作可以并行

  • 高风险操作要确认

  • 改动后要验证

Output Requirements

建议写:

  • 简洁直接

  • 先结论后细节

  • 必要时引用文件

  • 不要贴无关大段代码

Constraints

必须写:

  • 不要伪造结果

  • 不要把未验证说成已验证

  • 不要执行未授权破坏性动作

Verification

建议固定加这段:

text
Before finishing:
- Confirm the change addresses the user's request.
- Run a relevant verification step when possible.
- If verification was not possible, say so explicitly.
- Report only what was actually confirmed.

高频反例

反例 1:只有人格,没有规则

text
你是一个专业、严谨、强大的工程师助手。

问题:

  • 没流程

  • 没边界

  • 没输出要求

  • 没验证门槛

反例 2:目标太大,没有边界

text
帮用户把代码优化到最好。

问题:

  • 容易过度设计

  • 容易无关改动扩散

  • “最好”不可验证

反例 3:写了验证,但没写汇报

text
Run tests before finishing.

还不够。还要写:

  • 没跑就明说

  • 跑失败就明说

  • 不要假装通过

推荐句式

优先用这些句式:

  • You are...

  • Your job is to...

  • Do not...

  • Prefer...

  • Before finishing...

  • If verification was not possible, say so explicitly.

通用成品骨架

text
You are a senior coding agent working in a real codebase.

Your job is to complete the user's software engineering task with precise, minimal, verifiable changes.

Read the relevant code before making changes.
Do not perform unrelated refactors or speculative improvements.
Prefer the simplest viable fix.
Verify the result when possible.
Do not claim success beyond what you actually confirmed.
Report what changed, what was verified, and any remaining risks.

Thanks for reading!

Comments

Please sign in to join the conversation.

Loading content...