Index of every page on this site: llms.txt
All skills
ehnruiz avatar

/writing-for-agents

@aaa4d45
Run it yourself

Writing documents for agents. Use when creating or editing a skill (its SKILL.md, description or reference files), when modifying AGENTS.md or CLAUDE.md, or when reviewing an agent-facing document that behaves inconsistently across runs. Prose that people read, such as a memo or a one-pager, follows its own rules.

Use this Skill: https://skilld.dev/gh/ehnruiz/claude-skills/writing-for-agents

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL-MECHANICS.md

≈842 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Skill mechanics

The skill-specific branch of writing-for-agents: what changes when the document is a skill (frontmatter, the invocation choice, and router skills). Everything else about writing it is the universal reference in SKILL.md.

Frontmatter

The portable fields of the agentskills.io format are name (matching the folder name) and description. Agents add their own: Claude Code reads disable-model-invocation and argument-hint, for example, and an agent that does not know a field ignores it. A skill shared across agents keeps to the portable fields and puts anything else in the body, so it behaves the same everywhere.

Invocation

Two choices, trading the two loads:

  • A model-invoked skill keeps a description, so the agent can fire it autonomously, and other skills can reach it. You can still type its name: model-invocation always includes user reach; a description only ever adds agent discovery, never removes the human's. The description is the skill's top-level context pointer, forced to stay loaded at all times: permanent context load in exchange for discoverability. A model-invoked skill whose content is all reference is also one home for shared reference: another skill can invoke it, so reference needed by several skills lives in one place. Mechanics: omit disable-model-invocation, and write a model-facing description carrying the trigger branches (the pointer-writing rules in SKILL.md apply in full).
  • A user-invoked skill strips the description from the agent's reach: only the human typing its name can invoke it, and no other skill can. Zero context load, but it spends cognitive load: you are the index that must remember it exists. Mechanics (Claude Code): set disable-model-invocation: true; the description becomes human-facing: a one-line summary, trigger lists stripped.

Pick model-invocation only when the agent must reach the skill on its own, or another skill must. If it only ever fires by hand, make it user-invoked and pay no context load.

Where the agent has no user-invoked switch, or the skill is shared across agents, approximate it in the description itself: name the one explicit request that should fire it ("Use only when the user asks for a handoff"), so the always-loaded pointer stays short and rarely fires on its own.

Shared reference that two user-invoked skills both need can live in neither: with no descriptions, neither can fire the other. Push it to a plain file outside the skill system: external reference any skill can point at.

Splitting by invocation

The invocation cut of splitting (the sequence cut lives in SKILL.md): split off a model-invoked skill when you have a distinct leading word that should trigger it on its own (a trigger word you actually use in your prompts), or another skill must reach it. You pay context load for the new always-loaded description, so that independent reach has to be worth it.

Router skills

When user-invoked skills multiply past what you can remember, that piled-up cognitive load is cured by a router skill: one user-invoked skill that names the others and when to reach for each, so the human has one skill to remember instead of many. It can only hint, never fire them: user-invoked skills have no description, so nothing but the human can reach them.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts15d3 checks · Risk SAFE
  • Gen Agent Trust Hub15d

    The skill provides a set of best practices and guidelines for writing documentation and instruction sets specifically for AI agents. It contains no executable scripts, network requests, or attempts to override agent safety protocols.

  • Socket15d

    No alerts

  • Snyk15d

    Risk: LOW · No issues

Signed by skilld at aaa4d45. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 6 days ago.

Activeupdated last month

README badge

README badge for ehnruiz/claude-skills/writing-for-agents