system-prompts
Skill này làm gì
Skill này đặt ra một phong cách chuẩn để viết các chỉ dẫn mà mô hình AI đọc, như system prompt và tài liệu công cụ. Skill dành cho người viết prompt và muốn chúng rõ ràng, nhất quán.
Khi nào nên dùng
- ✓Khi bạn đang viết hoặc chỉnh sửa một system prompt cho trợ lý AI.
- ✓Khi bạn đang viết mô tả cho biết AI nên dùng một công cụ thế nào.
- ✓Khi bạn muốn một định nghĩa agent nhất quán và dễ kiểm tra.
Liên kết skill
https://github.com/can1357/oh-my-pi/blob/main/.omp/skills/system-prompts/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Viết một system prompt cho trợ lý hỗ trợ khách hàng của chúng tôi, với các quy tắc phải và không được rõ ràng, và một danh sách kiểm tra ngắn trước khi trả lời.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent dùng một bộ thẻ phần nhất quán, cách diễn đạt chuẩn cho hành vi bắt buộc, bị cấm và tùy chọn, và phong cách mệnh lệnh cô đọng. Nó cũng lưu ý rằng các mô hình rất nhỏ có thể cần cách diễn đạt khác.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
MUST và NEVER trong các prompt này nghĩa là gì?
Chúng đánh dấu các quy tắc có lực tuyệt đối, nên mô hình coi yêu cầu hoặc điều cấm là chắc chắn chứ không phải gợi ý.
Có quy tắc nào cho các mô hình AI nhỏ không?
Có. Skill nói rằng các mô hình rất nhỏ có thể cần cách diễn đạt khác và chỉ đến một hướng dẫn riêng cho chúng.
Vì sao tránh một số tên thẻ?
Các thẻ tự đặt thêm nhiễu mà không có ý nghĩa, nên skill chỉ dùng thẻ có tên khớp với mục đích của chúng.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 38k
- Vị trí xếp hạng
- #7493
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
Skill tương tự
writing-skills
311kDạy agent của bạn viết skill mới và kiểm thử từng skill trước, kiểm tra xem skill có thực sự thay đổi cách agent hành xử hay không.
writing-for-agents
310kGiải thích cách viết hướng dẫn rõ ràng cho agent AI, gồm skill, tệp AGENTS.md và CLAUDE.md, để agent cư xử nhất quán.
bengali-nlp
280kGiúp agent của bạn xử lý văn bản tiếng Bengali, hỗ trợ hiểu ngôn ngữ này, chuẩn hóa văn bản và xử lý các đặc điểm riêng của nó.