writing-system-prompts
Writes and reviews system prompts for AI tools, agents, chatbots, and LLM products using a fixed section order and a quality checklist. Use when the user says "write a system prompt", or when drafting a system prompt or auditing one for missing stop criteria, tool rules, constraints, or examples. Not for compressing an existing prompt; use improving-prompts.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- writing-system-prompts
- description
- Writes and reviews system prompts for AI tools, agents, chatbots, and LLM products using a fixed section order and a quality checklist. Use when the user says "write a system prompt", or when drafting a system prompt or auditing one for missing stop criteria, tool rules, constraints, or examples. Not for compressing an existing prompt; use improving-prompts.
02 资源文件 3
- 参考文档agents/openai.yaml212 B
- 参考文档references/review-anti-patterns.md1.7 KB
- 参考文档references/section-guidance.md4.1 KB
03 SKILL.md 正文
System Prompt Engineering
Structure beats cleverness. Concrete examples beat abstract instructions.
A system prompt is a contract with the model. Every line must change its behavior in a way someone could test; cut the rest, including anything the model or its harness already does by default.
Section order
Follow this order and skip sections that don't apply. Read section guidance for each section's rules and good and bad examples.
1. Identity and role
2. Mission and stop criteria
3. Communication style
4. Core workflow
5. Tool usage rules
6. Domain-specific rules
7. Safety and constraints
8. Edge cases and error handling
9. Examples
10. Runtime context (injected at run time)
What a good prompt has
- A specific role, not "AI assistant".
- Explicit completion criteria: when to stop, and when to ask instead.
- Response length capped with a number ("fewer than 4 lines"), never an adjective ("be concise").
- A retry limit with an escalation path for agents.
- Constraints on security-critical and destructive actions, each with its reason, stated once.
- 3-10 concrete examples showing length and tone, tool-call decisions, and edge cases, with at least one bad-to-good pair. Examples are the highest-return part of the prompt.
- A runtime context section for values that change per session.
Write
- Infer what the conversation and supplied files already answer.
- Ask only the rest, in one message, and wait: what the AI does, who its user is, which tools it has, what "done" looks like, what must never happen, and the expected output format.
- Deliver the prompt in a fenced block, followed by one line per assumption you made.
Review
Map the prompt to the section order, noting missing and misplaced sections. Flag each review anti-pattern present. Then revise. Unless the user asked for another format, report:
## Findings
| Section | Issue | Fix |
| ------- | ----- | --- |
## Revised prompt
```text
<the full revised prompt>
```
04 同仓库更多 Skills
writing-prose
Writes and edits prose for people in a plain, conversational, short house style with no em dashes. Use when the user says "write this up", or when drafting or revising documentation, READMEs, explanations, blog posts, or other human-facing prose. Not for prompts written for agents; use writing-system-prompts or composing-agent-prompts.
writing-acceptance-criteria
Writes or rewrites acceptance criteria until each is provable: one observable outcome with a named check that can fail. Use when the user says "write acceptance criteria", or asks to write, rewrite, or tighten acceptance criteria or a definition of done. Not for proving work meets them; use proving-claims.
summarizing-shipped-work
Summarizes the user's merged GitHub PRs for a timeframe into a grouped, linked shipped-work report with highlights, and offers to update a brag document. Use when the user says "what shipped?", or when asked what the user shipped (this week, last month, a quarter, since a date), for a status update, or to update a brag doc.
running-retros
Mines a session transcript, past agent sessions, or named sources such as PR review comments for durable learnings, then proposes approval-gated edits to skills, AGENTS.md, or docs and tracker issues. Use when the user says "retro", or when the user explicitly asks for a retrospective. Never infer from session end or friction.
learning-from-mistakes
Codifies the latest correction or mistake in the conversation as a short imperative rule in the project or global CLAUDE.md or AGENTS.md, after the user approves it. Use when the user says "learn from this mistake", or when the user asks to learn from a mistake, remember a lesson for next time, add a rule to CLAUDE.md, or not repeat a behavior. Not for a whole session; use running-retros.
improving-prompts
Compresses and clarifies an existing LLM prompt through concept elevation, verifying that no original instruction is lost. Use when the user says "improve this prompt", or when the user supplies a prompt or prompt file and asks to improve, tighten, optimize, or refine it. Not for writing a new prompt; use writing-system-prompts.