[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CBB5ZVCHEEE4TQ4S435BQS":3,"skill-same:01M6CBB5ZVCHEEE4TQ4S435BQS":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":51,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":53,"install":54,"resources":67},"01M6CBB5ZVCHEEE4TQ4S435BQS","writing-for-agents",null,"Writing rules for documents an agent consumes — skills, AGENTS.md, instruction files, and docs reached by a pointer","shahboura\u002Fagents-opencode","shahboura","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F210767?v=4","01M6C6WKTBT0NH92BEPQRHQSYM","Shehab El Hadidy","01M6C6WKYXG8AE68MCGBNE5ZFR",2,"MIT","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[29,30,31,32,33,34,35,36],"writing","writing for agents","docs","documentation","documents","Rules","opencode","files","2026-11-10 10:12:30",false,"---\nname: writing-for-agents\ndescription: Writing rules for documents an agent consumes — skills, AGENTS.md, instruction files, and docs reached by a pointer\nlicense: MIT\ncompatibility: opencode\nmetadata:\n  author: shahboura\n  version: \"1.0.0\"\n  audience: maintainers\n  workflow: documentation\n  adapted-from: \"mattpocock\u002Fskills (MIT)\"\n---\n\n# Writing for Agents\n\nRules for any text an agent reads: a skill, an `AGENTS.md`, a doc reached through\na pointer. The reader is a model with a fixed attention budget, not a colleague\nwho asks follow-up questions.\n\n## What I do\n\n- Check pointer wording, load cost, and document hierarchy before drafting\n- Rewrite steps into completion criteria the agent can check\n- Replace prohibitions and restatements with one positive target\n- Prune duplicates, no-ops, and sediment, starting with the environment's own sources\n\n## When to use me\n\nActivate when writing or editing:\n\n- A skill, agent file, instruction file, or `AGENTS.md`\n- A doc that another document points at (\"read X for details\")\n- A prompt, checklist, or command body an agent executes\n- A doc that keeps growing while compliance stays flat\n\n## Key Rules\n\n### 1. Context pointers\n\nA pointer is a line that tells the agent when to open something else. The pointer\nis always loaded; its target is not.\n\n- **Wording decides invocation.** If the sentence never names the situation, the\n  skill never loads. Write the situation, not the concept: \"before merging a\n  migration\" beats \"for database concerns\".\n- **One trigger per branch.** Each \"when\" clause maps to exactly one skill. Two\n  skills in one sentence split the decision and the agent picks neither.\n- **Front-load the leading word.** Put the discriminating term first in the\n  sentence, so the match happens before attention drifts: \"Ambiguous request →\n  `alignment`\", not \"If the request is ambiguous, consider loading…\".\n\n### 2. Two loads\n\n- **Context load:** tokens paid every time the file is read. Lower it by writing less,\n  or by moving detail behind a pointer.\n- **Cognitive load:** the human's memory of what exists and when to reach for it. Lower\n  it with fewer files and names that are findable without a map.\n- A new file trades context load for cognitive load. Make that trade knowingly.\n\n### 3. Information hierarchy\n\nThree tiers, cheapest first:\n\n1. **In-file step** — the agent must do it now.\n2. **In-file reference** — available beside the step, read when needed.\n3. **Disclosed reference** — a separate file behind a pointer.\n\n- **Progressive disclosure:** push detail down only when it is not needed on\n  every pass. Anything load-bearing for the step stays in the step.\n- **Co-location:** keep what changes together, together. A rule and its exception\n  should not be separated by three sections.\n- **Sprawl:** if one reader needs three documents to do one thing, the hierarchy\n  is wrong. The top document holds the decision and points to the mechanics.\n\n### 4. Steps and completion criteria\n\n- A **step** says what to do. A **completion criterion** says how you know it is\n  done. Agents stop at the first plausible stopping point.\n- **Clarity is not demand.** A clear instruction is understood; a demanding one\n  is binding. \"Consider X\" gets skipped; \"Do X before Y\" gets done.\n- **Premature completion:** any step without a checkable end state gets declared\n  complete at the cheapest point. Give it an observable end: a command, an exit\n  code, a file that exists.\n- **Post-completion pull:** text after the stop condition (\"then also…\") pulls the\n  agent past the finish line or stops it early. Put the finish line last, or move\n  the extra work before it.\n\n### 5. Leading words\n\n- One pretrained token replaces a paragraph: *atomic*, *idempotent*, *regression*,\n  *root cause*, *frozen snapshot*. The model already knows the pattern; naming it\n  is cheaper than describing it.\n- **Hunt restatements.** If the same idea appears twice, keep the version with the\n  leading word and delete the other. Two spellings of one rule read as two rules.\n\n### 6. Negation\n\n- **Prohibitions activate the banned behaviour.** \"Do not use tabs\" makes tabs\n  salient. State the positive target instead: \"Indent with two spaces\".\n- Keep a prohibition only when the failure is silent and costly, and always pair\n  it with the replacement behaviour.\n\n### 7. Pruning\n\n- **Single source of truth:** one normative home per rule. Everything else points\n  at it or is deleted.\n- **The environment is a source.** Package scripts, config, directory layout, and\n  CLI help already state facts. Do not restate them; your copy goes stale, theirs\n  does not.\n- **No-ops:** delete lines that repeat the model's default (\"be careful\", \"write\n  clean code\"). They cost tokens and change nothing.\n- **Sediment:** text accumulates because adding feels safer than deleting. On\n  every edit, remove one thing.\n\n## Review checklist\n\n- [ ] Pointer names the triggering situation; leading word comes first\n- [ ] Always-loaded text earns its tokens; detail sits one level down\n- [ ] Every step has an observable completion criterion\n- [ ] No restated leading word, no bare prohibition\n- [ ] No fact the repo already stores in scripts, config, or layout\n","# Writing for Agents\n\nRules for any text an agent reads: a skill, an `AGENTS.md`, a doc reached through\na pointer. The reader is a model with a fixed attention budget, not a colleague\nwho asks follow-up questions.\n\n## What I do\n\n- Check pointer wording, load cost, and document hierarchy before drafting\n- Rewrite steps into completion criteria the agent can check\n- Replace prohibitions and restatements with one positive target\n- Prune duplicates, no-ops, and sediment, starting with the environment's own sources\n\n## When to use me\n\nActivate when writing or editing:\n\n- A skill, agent file, instruction file, or `AGENTS.md`\n- A doc that another document points at (\"read X for details\")\n- A prompt, checklist, or command body an agent executes\n- A doc that keeps growing while compliance stays flat\n\n## Key Rules\n\n### 1. Context pointers\n\nA pointer is a line that tells the agent when to open something else. The pointer\nis always loaded; its target is not.\n\n- **Wording decides invocation.** If the sentence never names the situation, the\n  skill never loads. Write the situation, not the concept: \"before merging a\n  migration\" beats \"for database concerns\".\n- **One trigger per branch.** Each \"when\" clause maps to exactly one skill. Two\n  skills in one sentence split the decision and the agent picks neither.\n- **Front-load the leading word.** Put the discriminating term first in the\n  sentence, so the match happens before attention drifts: \"Ambiguous request →\n  `alignment`\", not \"If the request is ambiguous, consider loading…\".\n\n### 2. Two loads\n\n- **Context load:** tokens paid every time the file is read. Lower it by writing less,\n  or by moving detail behind a pointer.\n- **Cognitive load:** the human's memory of what exists and when to reach for it. Lower\n  it with fewer files and names that are findable without a map.\n- A new file trades context load for cognitive load. Make that trade knowingly.\n\n### 3. Information hierarchy\n\nThree tiers, cheapest first:\n\n1. **In-file step** — the agent must do it now.\n2. **In-file reference** — available beside the step, read when needed.\n3. **Disclosed reference** — a separate file behind a pointer.\n\n- **Progressive disclosure:** push detail down only when it is not needed on\n  every pass. Anything load-bearing for the step stays in the step.\n- **Co-location:** keep what changes together, together. A rule and its exception\n  should not be separated by three sections.\n- **Sprawl:** if one reader needs three documents to do one thing, the hierarchy\n  is wrong. The top document holds the decision and points to the mechanics.\n\n### 4. Steps and completion criteria\n\n- A **step** says what to do. A **completion criterion** says how you know it is\n  done. Agents stop at the first plausible stopping point.\n- **Clarity is not demand.** A clear instruction is understood; a demanding one\n  is binding. \"Consider X\" gets skipped; \"Do X before Y\" gets done.\n- **Premature completion:** any step without a checkable end state gets declared\n  complete at the cheapest point. Give it an observable end: a command, an exit\n  code, a file that exists.\n- **Post-completion pull:** text after the stop condition (\"then also…\") pulls the\n  agent past the finish line or stops it early. Put the finish line last, or move\n  the extra work before it.\n\n### 5. Leading words\n\n- One pretrained token replaces a paragraph: *atomic*, *idempotent*, *regression*,\n  *root cause*, *frozen snapshot*. The model already knows the pattern; naming it\n  is cheaper than describing it.\n- **Hunt restatements.** If the same idea appears twice, keep the version with the\n  leading word and delete the other. Two spellings of one rule read as two rules.\n\n### 6. Negation\n\n- **Prohibitions activate the banned behaviour.** \"Do not use tabs\" makes tabs\n  salient. State the positive target instead: \"Indent with two spaces\".\n- Keep a prohibition only when the failure is silent and costly, and always pair\n  it with the replacement behaviour.\n\n### 7. Pruning\n\n- **Single source of truth:** one normative home per rule. Everything else points\n  at it or is deleted.\n- **The environment is a source.** Package scripts, config, directory layout, and\n  CLI help already state facts. Do not restate them; your copy goes stale, theirs\n  does not.\n- **No-ops:** delete lines that repeat the model's default (\"be careful\", \"write\n  clean code\"). They cost tokens and change nothing.\n- **Sediment:** text accumulates because adding feels safer than deleting. On\n  every edit, remove one thing.\n\n## Review checklist\n\n- [ ] Pointer names the triggering situation; leading word comes first\n- [ ] Always-loaded text earns its tokens; detail sits one level down\n- [ ] Every step has an observable completion criterion\n- [ ] No restated leading word, no bare prohibition\n- [ ] No fact the repo already stores in scripts, config, or layout\n",{"name":5,"license":15,"metadata":42,"description":7,"compatibility":35},{"author":9,"version":43,"audience":44,"workflow":32,"adapted-from":45},"1.0.0","maintainers","mattpocock\u002Fskills (MIT)","main","9b951b5b2e5d07d427baff330db5deb2a8c67511",".opencode\u002Fskills\u002Fwriting-for-agents",0,"https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode","https:\u002F\u002Fagnts.elkodr.com\u002F","https:\u002F\u002Fgithub.com\u002Fshahboura","2026-11-05 13:30:42",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add shahboura\u002Fagents-opencode --skill writing-for-agents",{"tool":60,"command":61},"bunx","bunx skills add shahboura\u002Fagents-opencode --skill writing-for-agents",{"tool":63,"command":64},"pnpm","pnpm dlx skills add shahboura\u002Fagents-opencode --skill writing-for-agents","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",true,[],[69,75,83,88,93,98],{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":37},"01M6CBBX1C6NV7VY8XK21DV5FW","python","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Fvalid\u002F.opencode\u002Fskills\u002Fpython\u002FSKILL.md",[],[71],{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":37},"01M6CBBVB7W6ABJH8XP3Z8PPMK","docs-validation","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Fvalid\u002F.opencode\u002Fskills\u002Fdocs-validation\u002FSKILL.md",[],[31,81,82],"validation","docs validation",{"skillNo":84,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":37},"01M6CBBT2WC781609MH5RN7KM7","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Funknown-skill\u002F.opencode\u002Fskills\u002Fpython\u002FSKILL.md",[],[71],{"skillNo":89,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":37},"01M6CBBRNY6TDRZ5627GC8436D","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Funknown-skill\u002F.opencode\u002Fskills\u002Fdocs-validation\u002FSKILL.md",[],[31,81,82],{"skillNo":94,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":37},"01M6CBBQDS170GBYA1CVW3DC5D","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Finline-skill\u002F.opencode\u002Fskills\u002Fpython\u002FSKILL.md",[],[71],{"skillNo":99,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":37},"01M6CBBP222WAW802YHY37F48A","https:\u002F\u002Fgithub.com\u002Fshahboura\u002Fagents-opencode\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fvalidate-agents\u002Finline-skill\u002F.opencode\u002Fskills\u002Fdocs-validation\u002FSKILL.md",[],[31,81,82]]