Authoring instruction text
Rules for the text the plugins load into a session. .github/scripts/skill-lint.mjs checks the budgets.
Budgets
Budgets count the words of the body after the front matter, the same on every host without a tokenizer. Above the budget the lint warns, above the cap it fails.
| Text | Budget | Cap |
|---|---|---|
SKILL.md | 1,200 | 3,000 |
Skill reference file (any other .md in a skill folder) | 1,500 | 3,000 |
cl-workflow entry skill: every file in skills/workflow/ | 450 | 900 |
Subagent prompt (plugins/*/agents/) | 400 | 600 |
Rules file (plugins/*/rules/) | 450 | 600 |
Working rules (plugins/cl-skills/rules/global.md) | 1,667 | 1,667 |
Bot brief (SOUL.md) | 600 | 800 |
Bot procedure (coordinate/bot-*.md) | 450 | 900 |
| Listed description of a skill or an agent | 300 characters | 1,024 characters |
A file that was over its cap when the budgets began is listed in AT_SIZE in the lint at that size: it may shrink, never grow. When it shrinks, lower its entry in the same change.
Structure
SKILL.mdis the overview: when the skill applies, its steps, and a link to each reference file. Reference files link fromSKILL.mdonly, one level deep, so the model reads each one whole instead of following a chain.- A file over 1,000 words opens with a contents list, so a partial read still shows what the file holds.
- One job per skill.
- A guide that a
cl-skillsskill and another plugin's skill both need has one source in the other plugin; thecl-skillsskill holds a copy whose first line is<!-- copy of <source path>: ... -->.node .github/scripts/skills-doc.mjswrites the copy from the source, and its--checkfails on a drifted copy or a relative link in the source, so the source links with full URLs or#anchors. - Text that must survive a long session goes in the first 5,000 tokens of a skill: after compaction, Claude Code attaches each invoked skill again, cut to that length.
Front matter
- A skill's front matter holds only the keys of Claude Code's skill front matter; Codex reads
name,descriptionandmetadata. CedarLoom's own fields go undermetadataas double-quoted strings:whenandwritesfor Skills,codex: "false"for a skill that runs only in Claude Code. - An agent's front matter holds only the keys of the subagent front matter that plugin agents read.
- The lint refuses any other key.
Descriptions
- Third person ("Reviews a pull request ..."), never "I" or "you": the description goes into the system prompt.
- The use case first, then the details: a host's listing can cut a long description short.
Invocation
disable-model-invocation: truefor a skill only the user starts: one with side effects or a moment the user picks (a setup, a release, a mode switch). Claude Code leaves it out of the model's listing; for Codex the lint requirespolicy.allow_implicit_invocation: falsein the skill's OpenAI YAML.user-invocable: falsefor background knowledge the model loads when it applies but nobody types as a command: the skill leaves the/menu and stays in the model's listing.
Writing
- No restating: each fact lives in the one file that owns it, and other files link to it. No recap of headings, code, labels or another file.
- Scripts and hooks over wording: a rule that a script, hook or check can enforce goes there, and the text names it at most.
- A change removes as much as it adds: new instruction text replaces or tightens old text, so the totals hold.
Sources: Claude Code skills, Agent Skills best practices.