|
| 1 | +--- |
| 2 | +name: skill-author |
| 3 | +description: > |
| 4 | + Draft, validate, and install new agent skills. Use when asked to create a new |
| 5 | + skill, automate a workflow, or add a capability. Produces cross-compatible |
| 6 | + SKILL.md files that work in both Claude Code and IBM Bob. |
| 7 | +argument-hint: "[skill-name]" |
| 8 | +compatibility: "Claude Code, IBM Bob" |
| 9 | +metadata: |
| 10 | + version: "2026-03-25" |
| 11 | + capabilities: [bash, read_file, write_file] |
| 12 | +--- |
| 13 | + |
| 14 | +# Skill Authoring Meta-Skill |
| 15 | + |
| 16 | +Create new agent skills that work across Claude Code (CLI/IDE) and IBM Bob. |
| 17 | + |
| 18 | +## Skill Location |
| 19 | + |
| 20 | +Skills live under `.agents/skills/<name>/SKILL.md`. |
| 21 | + |
| 22 | +Discovery configuration varies by tool: |
| 23 | +- **Claude Code:** Add `"skillLocations": [".agents/skills"]` to `.claude/settings.json`. |
| 24 | + Without this, Claude Code looks in `.claude/skills/` by default. |
| 25 | +- **IBM Bob:** Discovers `.agents/skills/` natively per agentskills.io convention. |
| 26 | + |
| 27 | +Both tools read the same `SKILL.md` format. Use the frontmatter schema below |
| 28 | +to maximise compatibility. |
| 29 | + |
| 30 | +## Workflow |
| 31 | + |
| 32 | +1. **Name the skill** — kebab-case, max 64 chars (e.g. `api-tester`, `audit-markers`). |
| 33 | + |
| 34 | +2. **Scaffold the directory:** |
| 35 | + ``` |
| 36 | + .agents/skills/<name>/ |
| 37 | + ├── SKILL.md # Required — frontmatter + instructions |
| 38 | + ├── scripts/ # Optional — helper scripts |
| 39 | + └── templates/ # Optional — output templates |
| 40 | + ``` |
| 41 | + |
| 42 | +3. **Write SKILL.md** — YAML frontmatter + markdown body (see schema below). |
| 43 | + |
| 44 | +4. **Dry-run review** — mentally execute the skill against a realistic scenario |
| 45 | + before finalising. Walk through the procedure on a concrete example (a real |
| 46 | + file in the repo, not a hypothetical) and check for: |
| 47 | + - **Scaling gaps:** Does the procedure work for 1 file AND 100 files? If the |
| 48 | + skill accepts a directory or glob, it needs a triage strategy (e.g., "grep |
| 49 | + first to find candidates, then deep-read only files with issues") — not |
| 50 | + just "read every file fully." |
| 51 | + - **Boundary ambiguity:** If the skill defines categories or classifications, |
| 52 | + test the boundaries between adjacent categories with a real example. The |
| 53 | + edges are where agents will disagree or ask the user. Sharpen definitions |
| 54 | + until two agents reading the same test would classify it the same way. |
| 55 | + - **Stale references:** If the skill describes project state ("this hook needs |
| 56 | + to be added", "this marker is not yet registered"), verify those statements |
| 57 | + are still true. Embed checks ("read conftest.py to confirm") rather than |
| 58 | + assertions that rot. |
| 59 | + - **Output format at scale:** Run the report template mentally against the |
| 60 | + largest expected input. A per-function report for 5 files is fine; for 165 |
| 61 | + files it's unusable. Design output for the largest scope — summary table |
| 62 | + first, per-item detail only where issues exist. |
| 63 | + - **Format coverage:** If the skill operates on multiple input formats (e.g., |
| 64 | + `pytestmark` lists AND `# pytest:` comments), verify each format is |
| 65 | + explicitly addressed in the procedure. Implicit coverage causes agents to |
| 66 | + skip or guess. |
| 67 | + - **Rigid rules:** If you wrote "always X" or "never Y", find the edge case |
| 68 | + where the rule is wrong. Add the escape hatch. E.g., "per-function only" |
| 69 | + should say "module-level is acceptable when every function qualifies." |
| 70 | + |
| 71 | +5. **Validate:** |
| 72 | + - Check the skill is discoverable: list files in `.agents/skills/`. |
| 73 | + - Confirm no frontmatter warnings from the IDE. |
| 74 | + - Verify the skill does not conflict with existing skills or `AGENTS.md`. |
| 75 | + |
| 76 | +## SKILL.md Frontmatter Schema |
| 77 | + |
| 78 | +Use only fields from the **cross-compatible** set to avoid IDE warnings. |
| 79 | + |
| 80 | +### Cross-compatible fields (use these) |
| 81 | + |
| 82 | +| Field | Type | Purpose | |
| 83 | +|-------|------|---------| |
| 84 | +| `name` | string | Kebab-case identifier. Becomes the `/slash-command`. Max 64 chars. | |
| 85 | +| `description` | string | What the skill does and when to trigger it. Be specific — agents use this to decide whether to invoke the skill automatically. | |
| 86 | +| `argument-hint` | string | Autocomplete hint. E.g. `"[file] [--dry-run]"`, `"[issue-number]"`. | |
| 87 | +| `compatibility` | string | Which tools support this skill. E.g. `"Claude Code, IBM Bob"`. | |
| 88 | +| `disable-model-invocation` | boolean | `true` = manual `/name` only, no auto-invocation. | |
| 89 | +| `user-invocable` | boolean | `false` = hidden from `/` menu. Use for background knowledge skills. | |
| 90 | +| `license` | string | SPDX identifier if publishing. E.g. `"Apache-2.0"`. | |
| 91 | +| `metadata` | object | Free-form key-value pairs for tool-specific or custom fields. | |
| 92 | + |
| 93 | +### Tool-specific fields (put under `metadata`) |
| 94 | + |
| 95 | +These are useful but not universally supported — nest them under `metadata`: |
| 96 | + |
| 97 | +```yaml |
| 98 | +metadata: |
| 99 | + version: "2026-03-25" |
| 100 | + capabilities: [bash, read_file, write_file] # Bob/agentskills.io |
| 101 | +``` |
| 102 | +
|
| 103 | +Claude Code's `allowed-tools` and `context`/`agent` fields are recognised by |
| 104 | +Claude Code but may trigger warnings in Bob's validator. If needed, add them |
| 105 | +to `metadata` or accept the warnings. |
| 106 | + |
| 107 | +### Example frontmatter |
| 108 | + |
| 109 | +```yaml |
| 110 | +--- |
| 111 | +name: my-skill |
| 112 | +description: > |
| 113 | + Does X when Y. Use when asked to Z. |
| 114 | +argument-hint: "[target] [--flag]" |
| 115 | +compatibility: "Claude Code, IBM Bob" |
| 116 | +metadata: |
| 117 | + version: "2026-03-25" |
| 118 | + capabilities: [bash, read_file, write_file] |
| 119 | +--- |
| 120 | +``` |
| 121 | + |
| 122 | +## SKILL.md Body Structure |
| 123 | + |
| 124 | +After frontmatter, write clear markdown instructions the agent follows: |
| 125 | + |
| 126 | +1. **Context section** — what the skill operates on, key reference files. |
| 127 | +2. **Procedure** — numbered steps the agent follows. Be explicit about decisions and edge cases. |
| 128 | +3. **Rules / constraints** — hard rules the agent must not break. |
| 129 | +4. **Output format** — what the agent should produce (report, edits, summary). |
| 130 | + |
| 131 | +### Guidelines |
| 132 | + |
| 133 | +- **Be specific.** Vague instructions produce inconsistent results across models. |
| 134 | + "Check if markers are correct" is worse than "Compare the test's assertions |
| 135 | + to the qualitative decision rule in section 3." |
| 136 | +- **Reference project files.** Point to docs, configs, and examples by relative |
| 137 | + path so the agent can read them. E.g. "See `test/MARKERS_GUIDE.md` for the |
| 138 | + full marker taxonomy." |
| 139 | +- **Declare scope boundaries.** State what the skill does NOT do. E.g. "This |
| 140 | + skill does not modify conftest.py — flag infrastructure issues as notes." |
| 141 | +- **Use `$ARGUMENTS`** for user input. `$ARGUMENTS` is the full argument string; |
| 142 | + `$1`, `$2` etc. are positional. |
| 143 | +- **Keep SKILL.md under 500 lines.** Use supporting files for large reference |
| 144 | + material (link to them from the body). |
| 145 | +- **Portability:** use relative paths from the repo root, never absolute paths. |
| 146 | +- **Formatting:** use YYYY-MM-DD for dates, 24-hour clock for times, metric units. |
| 147 | +- **Design for variable scope.** If the skill can operate on a single file or an |
| 148 | + entire directory, provide a triage strategy for the large case. Agents given |
| 149 | + "audit everything" with no prioritisation will either read every file (slow) |
| 150 | + or skip files (incomplete). |
| 151 | +- **Sharpen category boundaries.** When defining classifications, the boundary |
| 152 | + between adjacent categories causes the most disagreement. Add a "key |
| 153 | + distinction from X" sentence for each pair of adjacent tiers. |
| 154 | +- **Avoid temporal assertions.** Don't write "this conftest hook needs to be |
| 155 | + added" — write "check whether conftest.py already has the hook." State that |
| 156 | + goes stale silently is worse than no guidance at all. |
| 157 | +- **Qualify absolutes.** "Always X" and "never Y" rules need escape hatches for |
| 158 | + the common exception. E.g., "per-function only — unless every function in the |
| 159 | + file qualifies, in which case module-level is acceptable." |
0 commit comments