$npx -y skills add PaulRBerg/agent-skills --skill create-skillUse to create/scaffold/init a new agent skill in .agents/skills by default or ~/.agents/skills with --global.
| 1 | # Create Skill |
| 2 | |
| 3 | Bootstrap a skill with a small observable contract, then symlink it into `.claude/skills/` so Claude Code can discover |
| 4 | it. Keep invariant workflow guidance in `SKILL.md`; move deterministic mechanics and conditional detail into scripts and |
| 5 | references. |
| 6 | |
| 7 | ## Model Optimization |
| 8 | |
| 9 | Optimize every new skill and its content for GPT-5.6 and Claude Fable 5. The summaries below are reminders, not |
| 10 | substitutes for the live guides. Read both guides before designing or writing a complex, long-running, multi-tool, or |
| 11 | orchestration-heavy skill because their recommendations may evolve. |
| 12 | |
| 13 | - [GPT-5.6 prompting guidance](https://developers.openai.com/api/docs/guides/prompt-guidance-gpt-5p6): Prefer lean, |
| 14 | outcome-first prompts that specify the goal, success and stopping criteria, constraints, evidence, permission |
| 15 | boundaries, tool routing, output shape, and validation. Remove redundant scaffolding and evaluate changes on |
| 16 | representative tasks. |
| 17 | - [Claude Fable 5 prompting guidance](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5): |
| 18 | Use concise instructions that explain intent and boundaries; avoid over-prescription and scope creep; tune effort |
| 19 | deliberately; ground progress claims in tool evidence; and make long-run verification and scaffolding explicit when |
| 20 | needed. |
| 21 | |
| 22 | ## Arguments |
| 23 | |
| 24 | - **skill-name** (required): kebab-case name (e.g., `my-skill`). Stop if missing or invalid. |
| 25 | - `--global` (optional): install under `~` instead of the current repo. |
| 26 | |
| 27 | ## Resolved Paths |
| 28 | |
| 29 | | Mode | Skill source | Claude Code symlink | |
| 30 | | --------------- | -------------------------- | ------------------------- | |
| 31 | | local (default) | `.agents/skills/<name>/` | `.claude/skills/<name>` | |
| 32 | | `--global` | `~/.agents/skills/<name>/` | `~/.claude/skills/<name>` | |
| 33 | |
| 34 | For local mode, `<scope>` is the chosen project directory. It may be the repository root or a nested project/workspace |
| 35 | directory under a larger repo; a local `.agents/skills/` below the repo root is valid when that is the intended project |
| 36 | scope. |
| 37 | |
| 38 | The symlink target is always the relative path `../../.agents/skills/<name>` so it resolves correctly in both scopes. |
| 39 | |
| 40 | ## Skill Layout |
| 41 | |
| 42 | ``` |
| 43 | <name>/ |
| 44 | ├── SKILL.md # Required: frontmatter + lean workflow (aim for <500 lines) |
| 45 | ├── agents/ |
| 46 | │ └── openai.yaml # Required: Codex metadata; disables implicit invocation |
| 47 | ├── scripts/ # Optional: helper code (prefer TypeScript via bun run; Python via uv) |
| 48 | ├── references/ # Optional: long-form docs loaded on demand |
| 49 | └── assets/ # Optional: templates / fonts / images used in OUTPUT (never loaded into context) |
| 50 | ``` |
| 51 | |
| 52 | Agents load skills via **progressive disclosure**, in three stages: |
| 53 | |
| 54 | 1. **Discovery** — only `name` + `description` are visible at startup. Front-load triggers in `description`. |
| 55 | 2. **Activation** — the full `SKILL.md` body is read once a task matches. |
| 56 | 3. **Execution** — `scripts/` run without being read into context; `references/` are read only when `SKILL.md` |
| 57 | explicitly links to them. |
| 58 | |
| 59 | Keep `SKILL.md` focused on workflow. Push bulk into `scripts/` (deterministic logic) or `references/` (documentation). |
| 60 | |
| 61 | ## Authoring Contract |
| 62 | |
| 63 | Before choosing a layout, separate the content into: |
| 64 | |
| 65 | - **Invariants** that every valid execution must preserve. |
| 66 | - **Preferred defaults** that explicit user intent or repository evidence may override. |
| 67 | - **Conditional examples and references** loaded only when their branch is active. |
| 68 | |
| 69 | Define the outcome, authority boundaries, stopping conditions, and completion evidence. Do not prescribe an identical |
| 70 | execution path when several safe paths satisfy the same contract. For user-facing workflows, also define which kickoff, |
| 71 | progress, decision, blocker, and completion events deserve a message and the smallest useful shape for each. |
| 72 | |
| 73 | ## When to Split Content |
| 74 | |
| 75 | ### Use `scripts/` when |
| 76 | |
| 77 | - The same code would be rewritten on every invocation (e.g., PDF rotate, JSON transform, curl wrapper). |
| 78 | - Determinism matters more than flexibility (parsing, validation, codegen, idempotent setup). |
| 79 | - A shell pipeline grows past ~5 lines or needs real error handling. |
| 80 | - A long heredoc keeps appearing inside `SKILL.md`. |
| 81 | |
| 82 | Scripts are token-efficient: the agent invokes them without reading them. Document the CLI signature in `SKILL.md` and |
| 83 | leave the implementation in `scripts/`. |
| 84 | |
| 85 | Prefer `scripts/*.ts` run with `bun run scripts/<name>.ts`, unless there is a good reason TypeScript is the wrong fit |
| 86 | for the helper. Python is also a good choice for data, text, and file processing; run Python helpers through |
| 87 | `uv run scripts/<name>.py`, not raw `python` or `python3`. |
| 88 | |
| 89 | ### Use `references/` when |
| 90 | |
| 91 | - A topic exceeds ~100 lines of prose, examples, or schemas. |
| 92 | - Co |