You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+89Lines changed: 89 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,95 @@ Add a row to the skills table in `README.md`:
64
64
-**Provide complete, copy-pasteable snippets** — not fragments.
65
65
-**Reference packages by full name** (e.g., `package:mocktail`, not just "mocktail").
66
66
-**Show anti-patterns alongside correct patterns** when helpful, so readers understand both what to do and what to avoid.
67
+
-**Keep prose tight** — every word in a SKILL.md consumes tokens in the model's context window. Verbose instructions reduce the space available for the user's actual work. Apply these techniques:
68
+
-**Decision tables over prose chains** — replace long if/else narratives with a table or compact bulleted list.
69
+
-**One sentence per rule** — if a guideline needs a paragraph to explain, it may be too complex or doing too much.
70
+
-**Cut redundancy** — don't restate in an "Important" footer what the body already says.
71
+
-**Collapse conditional blocks** — when multiple branches share structure, describe the shared part once and list only what differs.
72
+
73
+
## Shared Resources & Skill Boundaries
74
+
75
+
### The skill directory boundary
76
+
77
+
A skill can only reference files inside its own directory. Paths that escape the skill folder (e.g., `../shared/references/foo.md`) will fail validation with a `reference-exists` error. This applies to both markdown reference links and script paths in `!` blocks.
78
+
79
+
### Sharing content across skills
80
+
81
+
When multiple skills need the same content (templates, instructions, procedures), store the canonical file in `skills/shared/` and create a **symlink** inside each skill that needs it.
**Referencing in SKILL.md** — always use the local path:
110
+
111
+
```markdown
112
+
Follow the [validation and fix procedure](references/validate-and-fix.md).
113
+
```
114
+
115
+
Never reference `../shared/` directly in a SKILL.md — the symlink makes the shared file appear local.
116
+
117
+
### Shared scripts
118
+
119
+
The same boundary rule applies to scripts. Store canonical scripts in `skills/shared/scripts/`, symlink into each skill's `scripts/` directory, and reference them locally.
-**Deterministic** — no LLM judgment needed, just structured output
141
+
-**Reusable** — the same logic appears in 2+ skills
142
+
-**Multi-step** — combines several commands with conditional logic
143
+
144
+
Keep inline bash when:
145
+
146
+
- It's a single, simple command (e.g., `git rev-parse --abbrev-ref HEAD`)
147
+
- The model needs to see the raw output to make a decision
148
+
- The command is skill-specific and unlikely to be reused
149
+
150
+
**Script conventions:**
151
+
152
+
- Use `#!/usr/bin/env bash` and `set -euo pipefail` — this exits on any error (`-e`), treats unset variables as errors (`-u`), and fails the whole pipeline if any command in a pipe fails (`-o pipefail`). Without it, scripts can silently swallow failures.
153
+
- Output structured, parseable text (e.g., `KEY=value` lines)
0 commit comments