system-prompts
它能做什么
这项技能为 AI 模型所阅读的说明设定了统一的写作风格,例如系统提示词和工具文档。适合编写提示词、并希望它们清晰一致的人。
适用场景
- ✓当你为 AI 助手编写或修改系统提示词的时候。
- ✓当你编写用于告诉 AI 如何使用某个工具的描述的时候。
- ✓当你希望智能体定义一致且便于检查的时候。
技能链接
https://github.com/can1357/oh-my-pi/blob/main/.omp/skills/system-prompts/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我们的客服助手编写一个系统提示词,包含清晰的“必须”和“禁止”规则,并在回复前加一份简短的检查清单。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会使用一套一致的段落标签、标准化的措辞来表达必须、禁止和可选的行为,以及简洁的祈使句风格。它也会指出,非常小的模型可能需要不同的写法。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
System Prompts
House style: dense, imperative, RFC-keyed.
Small models (≤2B; tiny/on-device, e.g. LFM2): MUST read small-models.md. Rules below assume frontier-class instruction following; several invert at that scale.
Tags
Tags: authoritative, literal structural markers; meaning exactly matches name. NEVER invent ornamental tags: <north-star>, <stance>, <protocol>, <directives>, <strengths> — noise.
| Tag | Purpose |
|---|---|
<system-conventions> |
Tag/RFC-keyword interpretation; contract. |
<stakes> |
Correctness importance; domain framing. |
<communication> |
Voice, tone, response shape. |
<critical> |
Inviolable rules; place at START and END. |
<completeness> |
Done definition; anti-shrink rules. |
<yielding> |
Pre-yield checklist; block conditions. |
<workflow> |
Numbered phases: scope → edit → decompose → work → verify. |
Normative Language
RFC 2119: full caps, no bold; all-caps form is the marker.
| Keyword | Meaning | Replaces |
|---|---|---|
| MUST / REQUIRED | Absolute requirement | "always", "make sure", "ensure" |
| NEVER (= MUST NOT) | Absolute prohibition | "do not", "don't" |
| SHOULD / RECOMMENDED | Strong preference; known-tradeoff deviation allowed | "prefer", "it's best to" |
| AVOID (= SHOULD NOT) | Strong discouragement | "try not to" |
| MAY / OPTIONAL | Truly optional | "can", "you could" |
Aliases: prefer NEVER to MUST NOT; AVOID to SHOULD NOT. Both: single-token in cl100k/o200k; identical authority.
Near top, inside <system-conventions>, state once:
RFC 2119 applies to MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.
NEVERandAVOIDMUST be interpreted as aliases forMUST NOTandSHOULD NOTrespectively.
NEVER convert factual descriptions (tool returns, parameter behavior), code blocks, examples, schema, or Handlebars template syntax.
Density
Load-bearing tokens only; every bullet adds a claim.
- One claim/bullet; cut behavior-neutral subclauses.
- Quick check
X? Y.replaces “If X, then Y.” - Reasoning ONLY when it changes the call.
- Bold lead names rule; NEVER restate in body.
- Prefer
→,=,+/</-,B+1,A..B. - Parallel edits:
add → +/<; delete → -; = ONLY when modifying inside.
Bad: - **Never fabricate anchor hashes.** Hashes are 2-letter content fingerprints, not arbitrary suffixes. You cannot increment them, guess the "next" one, or compute them locally. If a needed anchor is not in your last `read` output, issue another `read`.
Good: - **NEVER fabricate anchor hashes.** Missing? Re-`read`.
Bad: - **Do not replay the line past your range.** For `= A..B`, never end the payload with content that already exists at B+1. Stop the payload at the last line you are actually changing; if you need that next line gone, extend B.
Good: - **NEVER replay past your range.** Stop before B+1; extend B if it must go.
Tactical bullets: 5–12 words. Longer ONLY for multi-part contracts where every clause constrains parameter semantics or edge enumeration.
AVOID compressing factual reference (operator definitions, return formats, schema), worked examples, or first use of a non-obvious term.
Voice
Direct, imperative, second-person: “You MUST/NEVER/SHOULD.” No hedging, apology, ceremony, closing summaries, or time estimates.
Bad: "You might want to consider using X..."
Good: "You SHOULD use X."
Bad: "Please note that this is important..."
Good: "Critical: X."
Bad: "Make sure to run lsp references before modifying a symbol"
Good: "You MUST run `lsp references` before modifying any exported symbol."
Negation: pair positive alternative when non-obvious; otherwise NEVER X. alone.
Positioning
“Lost in the Middle”: start/end retain; middle degrades ~20%. Critical constraints at both edges; reference material, environment, templated content in middle.
Front matter:
- Role + agency one-liner (
You are THE staff engineer…). <system-conventions>— RFC contract, tag semantics.<stakes>— importance.<communication>— style.<critical>— top-priority rules.
Back matter:
- Environment/tool inventory — exploration, tool priority, harness specifics.
- Contract — completeness, yielding, workflow.
- Prompt >~150 lines: repeat most important
<critical>rule.
Tone Patterns That Work
Live-system-prompt patterns:
- Agency: "You have agency and taste: you delete code that isn't pulling its weight, refuse abstractions that are unnecessary, and prefer boring when it's called for."
- **Stakes anchorin
常见问题
这些提示词中的 MUST 和 NEVER 是什么意思?
它们以绝对的语气标记规则,使模型把要求或禁止视为硬性约束,而不是建议。
对于小型 AI 模型有专门的规则吗?
有。技能指出,非常小的模型可能需要不同的措辞,并指向一份专门的指南。
为什么要避免某些标签名称?
凭空编造的标签只会增加噪音而没有意义,因此技能只使用名称与用途相符的标签。
详情
作者的原始描述
Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense compression. Use when authoring or editing any prompt the model reads.
repo: can1357/oh-my-pi
热度
- GitHub 星标
- 38k
- 排名
- #7493
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …