Using Agent Skills
addyosmani/agent-skills
Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.
为 agent 编写文档。适用于创建或编辑 skills,或修改 AGENTS.md 或 CLAUDE.md 时. An agent skill from vinvcn/mattpocock-skills-zh-CN.
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill writing-for-agents -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install vinvcn/mattpocock-skills-zh-CN writing-for-agents --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/productivity/writing-for-agents .claude/skills/writing-for-agents && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "writing-for-agents" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/productivity/writing-for-agents into .claude/skills/writing-for-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-for-agents", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/productivity/writing-for-agentsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill writing-for-agents -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install vinvcn/mattpocock-skills-zh-CN writing-for-agents --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/productivity/writing-for-agents .agents/skills/writing-for-agents && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "writing-for-agents" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/productivity/writing-for-agents into .agents/skills/writing-for-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-for-agents", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill writing-for-agents -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install vinvcn/mattpocock-skills-zh-CN writing-for-agents --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/productivity/writing-for-agents .cursor/skills/writing-for-agents && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "writing-for-agents" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/productivity/writing-for-agents into .cursor/skills/writing-for-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-for-agents", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/vinvcn/mattpocock-skills-zh-CN.git --path skills/productivity/writing-for-agents--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill writing-for-agents -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install vinvcn/mattpocock-skills-zh-CN writing-for-agents --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/productivity/writing-for-agents .gemini/skills/writing-for-agents && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "writing-for-agents" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/productivity/writing-for-agents into .gemini/skills/writing-for-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-for-agents", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install vinvcn/mattpocock-skills-zh-CN writing-for-agentsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill writing-for-agents -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/productivity/writing-for-agents .github/skills/writing-for-agents && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "writing-for-agents" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/productivity/writing-for-agents into .github/skills/writing-for-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-for-agents", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill writing-for-agents -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install vinvcn/mattpocock-skills-zh-CN writing-for-agents --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/productivity/writing-for-agents .opencode/skills/writing-for-agents && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "writing-for-agents" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/productivity/writing-for-agents into .opencode/skills/writing-for-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "writing-for-agents", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
writing-for-agents为 agent 编写文档。适用于创建或编辑 skills,或修改 AGENTS.md 或 CLAUDE.md 时. An agent skill from vinvcn/mattpocock-skills-zh-CN.
Writing For Agents is an agent skill from vinvcn/mattpocock-skills-zh-CN. 为 agent 编写文档。适用于创建或编辑 skills,或修改 AGENTS.md 或 CLAUDE.md 时。
Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `SKILL-MECHANICS.md` and `agents/openai.yaml`).
It sits in Agent Workflows, covering Agent instruction files. The repository describes itself as: 这是 mattpocock/skills 的简体中文本地化版本。 The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit bf98e53. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Writing For Agents loads about 1.5k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 482 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from vinvcn/mattpocock-skills-zh-CN at commit bf98e53, republished under its MIT licence (© vinvcn). 482 words, ~1,463 tokens.
.claude/skills/writing-for-agents/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.为 agent 消费的任何文档提供参考:一个 skill、一个 AGENTS.md / CLAUDE.md、一个经 pointer 触达的文档。包装方式不同;写作本身并无不同:同样的杠杆让每一份都变得可预测:agent 每次运行都采取相同的 process,而不是产出相同的 output。
当你写的文档是 skill 时,阅读 SKILL-MECHANICS.md 了解 frontmatter、invocation 选择以及 router skills。
context pointer 是 agent context 中持有的一个 reference,它命名某个 context 之外的材料,并对触达它的条件进行编码。某个 skill 的 description 就是其一;AGENTS.md 中命名某个文档的一行是同一个对象。决定 agent 何时以及多可靠地触达材料的,是指针的 措辞,而不是它的目标。一个必须是目标的、却由措辞薄弱的 pointer 承载的内容,是一个 variance bug:先打磨措辞,只有打磨失败时才内联该材料。
一个 pointer 做两件事:说明材料是什么,并列出应触发触达它的 branches(一个 branch 是文档处理的一个独立情形,所以不同的 runs 会沿不同的路径穿过它)。一个始终加载的 pointer 的每个词都会在每一轮付出成本,所以它比正文更该被大力修剪:
你添加的每个文档和 pointer 都会花掉两个预算之一:
AGENTS.md、一个 skill description、任何每轮都躺在 context 里的东西,无论是否触发都要花 tokens 和注意力。只能通过 pointer 触达的材料,以该 pointer 自己那一行为代价逃过 context load;完全没有 pointer 的材料则完全由 cognitive load 承载。
一个文档由两类内容构成:steps(agent 执行的有序动作)和 reference(按需查阅的定义、规则、事实),它们自由混合:全是 steps(一份菜谱)、全是 reference(一次 review 的规则、本 skill),或两者都有。核心决策是每块内容放在 information hierarchy 的哪个位置,一个按 agent 需要材料的即时程度排序的 ladder:
把太少内容下放会让顶层膨胀;把太多内容下放会隐藏 agent 实际需要的材料。那种张力就是整个决策。
Progressive disclosure 是沿 ladder 下移的动作(移出主文件、放到一个 pointer 后面),让顶层保持清晰。它主要不是 token 优化:它是 hierarchy 被保护的方式。Branching 是最干净的 disclosure 测试:内联每个 branch 都需要的内容,只把部分 branches 触达的内容放到 pointer 后面。当一个文档有 steps 时,本应被 disclose 的 in-file reference 会把它们埋起来,把关注它们变成掷硬币,这是一个 variance 杠杆,而不只是可读性杠杆。
Co-location 是文件内的伴随动作:ladder 决定一块内容 下移多远,co-location 决定它一旦到了那里 什么在它旁边。把一个概念的定义、规则和 caveats 放在同一个 heading 下,而不是散落各处,这样读一部分时它的邻居也随之而来。检验标准:文档应该读起来像专门写给 agent 的 documentation:分组的材料读起来就是这样;散落的材料不是。(它与 duplication 不同:duplication 在两处重复同一含义;散落是把一个含义碎片化到许多处。)
Sprawl 是这里的失败模式:文档过长,即使每一行都 live 且 unique。注意力在多余内容上变稀薄,每一行多余的都要多维护一条。治疗方式是 ladder:把 reference disclose 到 pointers 后面,并按 branch 或 sequence 拆分,让每条路径只携带它需要的。
每个 step 都以一个 completion criterion 结束:告诉 agent 工作完成的条件。两个属性让它成为杠杆:
最强的 criteria 既可检查又穷尽。
把一个文档拆成两个会花掉两种 load 之一,所以只有当这一刀赚回成本时才拆:
SKILL-MECHANICS.md。leading word 是一个已经存在于模型预训练中的紧凑概念,agent 在运行文档时会用它思考(lesson、fog of war、tracer bullets)。它作为一个 token 反复出现,绝不作为一个句子,累积 distributed definition,并通过招募模型已持有的 priors,用最少的 tokens 锚定一整片行为。自己造词也可以,只要你定义清楚,但一个编造的词招募不到任何 priors,你会在定义上付出一个预训练词免费提供的东西;先伸手去拿一个已有的词。
它两次做锚定。正文中锚定 execution:每次出现该词,agent 都伸手去拿同样的行为,在 flat reference 内部它把注意力聚焦到要寻找的一类事物上。pointer 中锚定 invocation:当同一个词存在于你的 prompts、docs 和 codebase 中,agent 会把那份 shared language 连到该材料,更可靠地触达它。
寻找用 leading words 做重构的机会。一个在三处展开的 triad、一个花一句话来指向一个概念的 pointer,每一段都是恳求 collapse 成单个 token 的文字:
你赢两次:更少的 tokens,以及一个更尖锐的 hook 让 agent 挂起它的思考。假设每个文档都携带着 leading words 可以退役的 restatements,去找它们。
Negation 是这个杠杆旁边的失败模式:用禁止来引导会把被禁止的行为拖进 context,让它 更容易 浮现,而不是更难。Don't think of an elephant,而 elephant 就是全部;negation 是一个被强烈激活的概念压垮的弱修饰符,所以禁令读起来一半像是在叫你去做那件事。应 prompt positive:直接说明目标行为("write one-line comments"),让被禁止的那个从不被说出。只有当你无法正向表达某条 hard guardrail 时,prohibition 才配得上一个位置;即便如此,也要配上正向目标,让注意力落到该做什么上。
package.json scripts、config files、目录布局、--help output),而一个把它重述出来的文档是一个 cache:一次 lookup 的副本,只有当 lookup 很昂贵时才配得上它的 load。缓存那些 agent 查看环境也找不到的东西:未写下的约定、某个选择背后的原因、没有 config 会招认的 gotcha。把 one-file、one-command 的 lookups 留给 environment,在那里它们不会过时。© vinvcn, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files in skills/productivity/writing-for-agents of vinvcn/mattpocock-skills-zh-CN.
Open the folder on GitHubat commit bf98e53
Writing For Agents next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Writing For Agents this skillvinvcn/mattpocock-skills-zh-CN | 4.7k | — | ~1.5k | Automated safety check: Pass | MIT | |
| Using Agent Skillsaddyosmani/agent-skills | 104k | 4 repos | ~2.4k | Automated safety check: Pass | MIT | |
| Claude ReflectBayramAnnakov/claude-reflect | 1.8k | 2 repos | ~627 | Automated safety check: Pass | MIT | |
| Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills | 21k | — | ~1.9k | Automated safety check: Pass | MIT | |
| Writing For Agentsbestofjs/bestofjs | 3.1k | 18 repos | ~2.7k | Automated safety check: Pass | MIT | |
| Task Observerrebelytics/one-skill-to-rule-them-all | 3.2k | 1 repos | ~11k | Automated safety check: Pass | CC-BY-4.0 |
addyosmani/agent-skills
Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.
BayramAnnakov/claude-reflect
Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.
KKKKhazix/khazix-skills
Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.
bestofjs/bestofjs
Writing documents for agents. An agent skill from bestofjs/bestofjs.
rebelytics/one-skill-to-rule-them-all
Monitors task execution for skill improvement opportunities.
microsoft/SkillOpt
Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.
vinvcn/mattpocock-skills-zh-CN
设置 Claude Code hooks,在危险 git commands(push、reset --hard、clean、branch -D 等)执行前阻止它们。适用于用户想防止破坏性 git 操作、添加 git safety hooks,或在 Claude Code 中阻止 git push/reset 时。
vinvcn/mattpocock-skills-zh-CN
用于设计深模块的共享词汇。适用于用户想设计或改进模块接口、寻找深化机会、决定 seam 放在哪里、让代码更容易测试或更适合 AI 导航,或其他技能需要深模块词汇时。
vinvcn/mattpocock-skills-zh-CN
面向棘手缺陷和性能回退的诊断循环。适用于用户说 “diagnose” / “debug this”,或报告某些东西 broken、throwing、failing、slow 时。
vinvcn/mattpocock-skills-zh-CN
构建并打磨项目的领域模型。适用于讨论 codebase 术语、编写或编辑 GLOSSARY.md,或记录或编辑 ADR。
vinvcn/mattpocock-skills-zh-CN
将测试文件从 as 类型断言迁移到 @total-typescript/shoehorn。适用于用户提到 shoehorn、想替换测试中的 as,或需要局部测试数据时。
vinvcn/mattpocock-skills-zh-CN
用于撰写 PR 正文。适用于用户要求起草、改写或改进 PR 正文,或希望 PR 更便于审阅时. An agent skill from vinvcn/mattpocock-skills-zh-CN.
Categories
为 agent 编写文档。适用于创建或编辑 skills,或修改 AGENTS.md 或 CLAUDE.md 时. An agent skill from vinvcn/mattpocock-skills-zh-CN. Writing For Agents is an agent skill from vinvcn/mattpocock-skills-zh-CN.
Writing For Agents fits situations like: tasks that involve Agent instruction files.
Run `npx skills add vinvcn/mattpocock-skills-zh-CN --skill writing-for-agents -a claude-code`. Or copy the skill folder (skills/productivity/writing-for-agents in vinvcn/mattpocock-skills-zh-CN) into .claude/skills/writing-for-agents in your project. Claude Code loads it when a task matches its description.
Run `npx skills add vinvcn/mattpocock-skills-zh-CN --skill writing-for-agents -a codex`. Or copy the skill folder (skills/productivity/writing-for-agents in vinvcn/mattpocock-skills-zh-CN) into .agents/skills/writing-for-agents in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vinvcn/mattpocock-skills-zh-CN --skill writing-for-agents -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/writing-for-agents, .gemini/skills/writing-for-agents, .github/skills/writing-for-agents and .opencode/skills/writing-for-agents in your project.
SKILL.md names no scripts, command-line tools or credentials: Writing For Agents is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Writing For Agents is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Writing For Agents: Using Agent Skills (addyosmani/agent-skills, 104k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.8k stars), Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars) and Writing For Agents (bestofjs/bestofjs, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
vinvcn (a GitHub user) maintains it in vinvcn/mattpocock-skills-zh-CN, which has 4,712 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on October 8, 2026.
Source: vinvcn/mattpocock-skills-zh-CN on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.