writing-for-agents
Skill này làm gì
Skill đưa ra hướng dẫn viết cho các tài liệu mà agent AI đọc, như skill và tệp hướng dẫn dự án. Dành cho người viết chỉ dẫn mà agent phải làm theo một cách đáng tin cậy.
Khi nào nên dùng
- ✓Khi bạn đang tạo hoặc sửa một skill cho agent.
- ✓Khi bạn đang viết tệp AGENTS.md hoặc CLAUDE.md.
- ✓Khi bạn muốn agent làm theo một tài liệu giống nhau trong mọi lần chạy.
Liên kết skill
https://github.com/mattpocock/skills/blob/main/skills/productivity/writing-for-agents/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
“Giúp tôi viết lại CLAUDE.md để agent làm theo các quy tắc dự án của chúng tôi đáng tin cậy hơn.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill giải thích cách viết các con trỏ và điều kiện kích hoạt rõ ràng để agent biết khi nào đọc từng phần. Nó khuyên làm rõ câu chữ trước khi thêm nhiều nội dung hơn.
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.
Reference for writing any document an agent consumes: a skill, an AGENTS.md / CLAUDE.md, a doc reached by a pointer. The packaging differs; the writing does not: the same levers make each one predictable, since the agent takes the same process every run rather than producing the same output.
When the document you're writing is a skill, read SKILL-MECHANICS.md for frontmatter, invocation choice, and router skills.
Context pointers
A context pointer is a reference held in the agent's context that names some out-of-context material and encodes the condition for reaching it. A skill's description is one; a line in AGENTS.md naming a doc is the same object. The pointer's wording, not its target, decides when the agent reaches the material, and how reliably. A must-have target behind a weakly worded pointer is a variance bug: sharpen the wording first, and inline the material only if sharpening fails.
A pointer does two jobs: state what the material is, and list the branches that should trigger reaching it (a branch is a distinct case the document handles, so different runs take different paths through it). Every word of an always-loaded pointer costs on every turn, so it earns even harder pruning than the body:
- Front-load the leading word: the pointer is where it does its triggering work.
- One trigger per branch. Synonyms that rename a single branch are one branch written twice; collapse them and keep only genuinely distinct branches.
- Cut identity the body already carries.
The two loads
Every document and pointer you add spends one of two budgets:
- Context load is the cost of always-loaded material on the agent's window: an
AGENTS.mdline, a skill description, anything sitting in context every turn, spending tokens and attention whether or not it fires. - Cognitive load is the cost on the human: which documents exist and when to reach for each. The human is the index. Not a cost to minimise: it is the price of human agency; spend it where human judgement matters, remove it where it does not.
Material reached only through a pointer escapes context load at the price of the pointer's own line; material with no pointer at all rides entirely on cognitive load.
Information hierarchy
A document is built from two content types: steps (the ordered actions the agent performs) and reference (definitions, rules, facts consulted on demand). The two mix freely: all steps (a recipe), all reference (a review's rules, this skill), or both. The core decision is where each piece sits on the information hierarchy, a ladder ranked by how immediately the agent needs the material:
- In-file step is the primary tier: what the agent does, in order.
- In-file reference is consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung), which is a fine arrangement, not a smell.
- Disclosed reference is pushed out into a separate file, reached by a context pointer, loaded only when the pointer fires. Spans a sibling file in the same folder through fully external reference that lives anywhere and any document can point at.
Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.
Progressive disclosure is the move down the ladder (out of the main file and behind a pointer) so the top stays legible. Not primarily a token optimisation: it is how the hierarchy is protected. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. When a document has steps, in-file reference that should be disclosed buries them and turns attending to them into a coin-flip: a variance lever, not just a legibility one.
Co-location is the within-file companion: where the ladder decides how far down a piece sits, co-location decides what sits beside it once there. Keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it. The test: the document should read like documentation written for the agent. Grouped material reads that way; scattered material does not. (Distinct from duplication: that repeats one meaning in two places; scattering fragments one meaning across many.)
Sprawl is the failure mode here: a document simply too long, even when every line is live and unique. Attenti
Câu hỏi thường gặp
Con trỏ ngữ cảnh là gì?
Đó là một tham chiếu mà agent giữ, gọi tên một phần tài liệu và giải thích khi nào nên đọc nó.
Nó có bao gồm cả thiết lập tệp skill không?
Có. Với skill, nó chỉ đến một tài liệu tham khảo riêng về frontmatter và cách skill được gọi.
Tại sao cách diễn đạt lại quan trọng đến vậy?
Skill nói cách diễn đạt của một con trỏ quyết định khi nào agent tiếp cận tài liệu, quan trọng hơn cả chính tài liệu.
Chi tiết
Mô tả gốc của tác giả
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
repo: mattpocock/skills
Độ phổ biến
- Sao GitHub
- 310k
- Vị trí xếp hạng
- #125
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
ask-matt
310kCho phép agent của bạn đóng vai người hướng dẫn một bộ skill lập trình, chỉ bạn đến đúng skill cho tình huống của mình, từ ý tưởng đến mã đã phát hành.
code-review
310kKiểm tra thay đổi của bạn theo tiêu chuẩn mã của repo và đặc tả gốc, chạy song song hai lượt đánh giá trước khi merge.
domain-modeling
310kXây dựng một bảng thuật ngữ dự án dùng chung và ghi lại các quyết định thiết kế quan trọng, để mã dùng cùng những từ mà nhóm bạn dùng.
implement-spec
310kBiến một đặc tả đã hoàn chỉnh và các ticket của nó thành mã chạy được, xử lý các ticket theo thứ tự và gộp chúng vào một nhánh.
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.
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ó.
prompt-caching-strategy
280kGiúp agent tối ưu prompt cho các mô hình ngôn ngữ. Phân tích cách prompt được xây dựng để giảm chi phí và tăng tốc phản hồi bằng cách tái sử dụng thông tin.