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.
为智能体编写文档。当你正在创建或编辑技能,或者修改 AGENTS.md / CLAUDE.md 时使用. An agent skill from devcxl/mattpocock-skills-zh.
$ npx skills add devcxl/mattpocock-skills-zh --skill writing-for-agents -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install devcxl/mattpocock-skills-zh 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/devcxl/mattpocock-skills-zh.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/devcxl/mattpocock-skills-zh/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/devcxl/mattpocock-skills-zh/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 devcxl/mattpocock-skills-zh --skill writing-for-agents -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install devcxl/mattpocock-skills-zh writing-for-agents --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/devcxl/mattpocock-skills-zh.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/devcxl/mattpocock-skills-zh/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 devcxl/mattpocock-skills-zh --skill writing-for-agents -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install devcxl/mattpocock-skills-zh writing-for-agents --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/devcxl/mattpocock-skills-zh.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/devcxl/mattpocock-skills-zh/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/devcxl/mattpocock-skills-zh.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 devcxl/mattpocock-skills-zh --skill writing-for-agents -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install devcxl/mattpocock-skills-zh 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/devcxl/mattpocock-skills-zh.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/devcxl/mattpocock-skills-zh/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 devcxl/mattpocock-skills-zh 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 devcxl/mattpocock-skills-zh --skill writing-for-agents -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/devcxl/mattpocock-skills-zh.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/devcxl/mattpocock-skills-zh/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 devcxl/mattpocock-skills-zh --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 devcxl/mattpocock-skills-zh writing-for-agents --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/devcxl/mattpocock-skills-zh.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/devcxl/mattpocock-skills-zh/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为智能体编写文档。当你正在创建或编辑技能,或者修改 AGENTS.md / CLAUDE.md 时使用. An agent skill from devcxl/mattpocock-skills-zh.
Writing For Agents is an agent skill from devcxl/mattpocock-skills-zh. 为智能体编写文档。当你正在创建或编辑技能,或者修改 AGENTS.md / CLAUDE.md 时使用。
Its SKILL.md is about 1.2k 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: Matt Pocock 技能集的中文翻译版 — 地道中文,原汁原味的技术术语。基于 mattpocock/skills 复刻。每日中午12点钟同步. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 15ac33e. 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.2k tokens when it runs. Until then it costs about 18 tokens; SKILL.md has 110 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 devcxl/mattpocock-skills-zh at commit 15ac33e, republished under its MIT licence (© devcxl). 110 words, ~1,175 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.一份用于编写智能体所阅读的任何文档的参考:一个技能、一份 AGENTS.md / CLAUDE.md、一份通过指针触达的文档。包装方式各异,但写作规则是一致的:同样的杠杆让每份文档都变得可预测,因为智能体每次运行采取的是同一个流程,而不是产出同一个输出。
当你正在编写的文档是一个技能时,请阅读 SKILL-MECHANICS.md,了解前置元数据、调用方式的选择,以及路由技能。
上下文指针(context pointer) 是智能体上下文中持有的一条引用,它指向一份"上下文之外"的资料,并编码了触达该资料的条件。技能的 description 就是一条;AGENTS.md 中指向某份文档的一行也是同一回事。决定智能体何时、以多高的可靠性触达这份资料的,是这条指针的措辞,不是它的指向。一个本应被触达的指向目标,却藏在一段措辞含糊的指针背后:这是一个方差 bug:先打磨措辞;只有当打磨失败时,才把资料直接内联进去。
一条指针承担两件事:说明这份资料是什么,以及列出应当触发触达它的分支(branch 是这份文档所处理的一种独立情形,所以不同次运行会走不同的路径)。每一条始终加载的指针里的每一个词,在每一次轮次中都在付代价,所以它需要比正文更严格的精简:
你新增的每一份文档与每一条指针,都在花两种预算之一:
AGENTS.md、一条技能描述,任何始终留在上下文里、无论是否触发都在消耗 token 与注意力的东西。只通过指针触达的资料,逃脱了上下文负载,代价是这条指针自身那一行;完全没有指针的资料,则完全依靠认知负载。
一份文档由两种内容类型组成:步骤(steps)(智能体按顺序执行的动作)和参考资料(reference)(按需查阅的定义、规则、事实)。两者可以自由混合:全是步骤(一份操作指南)、全是参考资料(一份审查规则,就像本技能)、或者两者兼具。核心决策是:每块内容应该放在信息层次的哪一级:这是一架按"智能体对资料的即时需要程度"排序的梯子:
向下推得不够,顶层就会臃肿;向下推得太多,就会把智能体真正需要的资料藏起来。这种张力就是整个决策。
渐进披露(Progressive disclosure) 是沿着这架梯子向下移动(移出主文件、藏到指针背后)的过程,目的是让顶层保持清晰可读。它主要不是为了优化 token:它是保护这架层次结构的手段。分支是最干脆的披露测试:每个分支都需要的内容内联,只有部分分支才会触达的内容推到指针背后。当一份文档有步骤时,本应被披露的文件内参考资料会把它们埋掉,让关注它们变成一件靠运气的事:这是一个方差杠杆,不只是一个可读性杠杆。
共置(Co-location) 是文件内的同伴概念:层次结构决定一块内容要放得多深,共置决定一旦放到那里,什么内容与它并排。把一个概念的定义、规则、注意事项放在同一个标题下,而不是散布在各处,这样读到一处时,它旁边的内容也会跟着进入视野。检验标准是:这份文档读起来,应该像为智能体写的文档。归在一处的资料读起来是这样;分散的资料则不是。(这与"重复"是不同的概念:重复是把同一个意思说两遍;分散是把一个意思碎成多块。)
蔓延(Sprawl) 是这里的失败模式:一份文档即使每行都是活的、独特的,也只是单纯地太长。注意力会在冗余中变薄,每多出一行就多一分维护相关性的负担。治疗手段就是这架梯子:通过指针披露参考资料,并按分支或顺序拆分,让每条路径只携带它需要的内容。
每一步都以一个完成标准收尾:告诉智能体"工作完成"的那个条件。两个性质让它成为一个杠杆:
最强的完成标准,既是可检验的,也是穷尽性的。
把一份文档拆成两份,是在花两种负载中的一种,所以只有在切分"赚得到"时才拆:
SKILL-MECHANICS.md。引导词(leading word) 是一个已经存在于模型预训练中的紧凑概念,智能体在执行这份文档时就是用这个词来思考的(lesson、fog of war、tracer bullets)。它作为一个 token:而不是一句句子:被反复使用,能在最少 token 数下累积一个分布式的定义,并通过调用模型已经持有的先验知识,锚定一整片行为。造一个新词也行,前提是你把它定义清楚;但生造的词招不来任何先验:你得用定义 token 来支付一个预训练词免费给你的东西;先去找一个已有的词。
它锚定两次。在正文中,执行:每次这个词出现,智能体都会唤起同样的行为;在扁平参考资料内部,它把注意力集中在一类该去找的东西上。在一条指针里,调用:当同一个词同时出现在你的 prompt、文档与代码库中时,智能体会把这种共享语言与那份资料关联起来,更可靠地触达它。
去主动寻找可以用引导词重构的机会。一个被展开在三处的三元组,一条用一句话去暗示某个想法的指针。每一处都在哀求被压缩成一个 token:
你赢两次:token 更少,并且给智能体提供了一个更锐利的"挂钩"来挂住它的思考。假设每一份文档都带着一些引导词可以替换掉的复述。去找它们。
否定(Negation) 是这条杠杆旁边的失败模式:用禁止来引导,会把被禁止的行为拽进上下文,让它变得更可触达,而不是更少。"不要想一头大象",于是大象就出现了;否定是一个弱修饰,被强烈激活的概念压过,于是禁止被半读成"去做这件事"。请正面提示:陈述目标行为(比如"写单行注释"),这样被禁止的那个就根本不会被说出来。只有当一个禁令无法正面措辞时,它才有立足之地;即便如此,也要把它和正面的目标搭配起来,让注意力落在"该做什么"上。
package.json 脚本、配置文件、目录布局、--help 输出),而把环境复述一遍的文档就是一份缓存(cache):一份"查找"的副本,只有当这次查找代价高昂时才赚得回来。缓存那些智能体通过查找得不到的东西:未被写下的惯例、选择背后的原因、配置不会坦白的小坑。把那些"一个文件、一条命令"就能查到的查找,交给环境本身,它永远不会过时。© devcxl, 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 devcxl/mattpocock-skills-zh.
Open the folder on GitHubat commit 15ac33e
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 skilldevcxl/mattpocock-skills-zh | 437 | — | ~1.2k | Automated safety check: Pass | MIT | |
| Using Agent Skillsaddyosmani/agent-skills | 103k | 4 repos | ~2.4k | Automated safety check: Pass | MIT | |
| Claude ReflectBayramAnnakov/claude-reflect | 1.7k | 2 repos | ~627 | Automated safety check: Pass | MIT | |
| Writing For Agentsbestofjs/bestofjs | 3.1k | 19 repos | ~2.7k | Automated safety check: Pass | MIT | |
| Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills | 21k | — | ~1.9k | Automated safety check: Pass | MIT | |
| Task Observerrebelytics/one-skill-to-rule-them-all | 3.2k | 1 repos | ~12k | 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.
bestofjs/bestofjs
Writing documents for agents. An agent skill from bestofjs/bestofjs.
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.
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.
devcxl/mattpocock-skills-zh
设置 Claude Code 钩子,在危险 Git 命令(push、reset --hard、clean、branch -D 等)执行前将其拦截。当用户想要防止破坏性 Git 操作、添加 Git 安全钩子或在 Claude Code 中阻止 git push/reset 时使用。
devcxl/mattpocock-skills-zh
将 issue 和外部 PR 推过一组分诊角色的状态机——分类、验证、必要时盘问,并写出 agent 就绪的任务简报. An agent skill from devcxl/mattpocock-skills-zh.
devcxl/mattpocock-skills-zh
设计深度模块的共享词汇。当用户想要设计或改进模块的接口、寻找深化机会、决定 seam 的位置、让代码更可测试或更易被 AI 导航,或者其他 skill 需要深度模块词汇时使用。
devcxl/mattpocock-skills-zh
针对棘手 bug 和性能回归的诊断循环。当用户说"诊断"/"调试这个",或报告某处崩溃/报错/不正常/缓慢时使用. An agent skill from devcxl/mattpocock-skills-zh.
devcxl/mattpocock-skills-zh
构建和完善项目的领域模型。当讨论代码库术语、编写或编辑 GLOSSARY.md,或记录或编辑 ADR 时使用. An agent skill from devcxl/mattpocock-skills-zh.
devcxl/mattpocock-skills-zh
将测试文件从 as 类型断言迁移到 @total-typescript/shoehorn。当用户提到 shoehorn、想要在测试中替换 as、或需要部分测试数据时使用。
Categories
为智能体编写文档。当你正在创建或编辑技能,或者修改 AGENTS.md / CLAUDE.md 时使用. An agent skill from devcxl/mattpocock-skills-zh. Writing For Agents is an agent skill from devcxl/mattpocock-skills-zh.
Writing For Agents fits situations like: tasks that involve Agent instruction files.
Run `npx skills add devcxl/mattpocock-skills-zh --skill writing-for-agents -a claude-code`. Or copy the skill folder (skills/productivity/writing-for-agents in devcxl/mattpocock-skills-zh) into .claude/skills/writing-for-agents in your project. Claude Code loads it when a task matches its description.
Run `npx skills add devcxl/mattpocock-skills-zh --skill writing-for-agents -a codex`. Or copy the skill folder (skills/productivity/writing-for-agents in devcxl/mattpocock-skills-zh) 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 devcxl/mattpocock-skills-zh --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.2k tokens (SKILL.md is roughly 4.7k 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, 103k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.7k stars), Writing For Agents (bestofjs/bestofjs, 3.1k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
devcxl (a GitHub user) maintains it in devcxl/mattpocock-skills-zh, which has 437 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 7, 2026.
Source: devcxl/mattpocock-skills-zh on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.