$npx -y skills add OdradekAI/bundles-forge --skill authoringUse when writing, completing, improving, or adapting SKILL.md and agents/*.md in a bundle-plugin — integrating external skills, filling scaffolded stubs, or rewriting for better triggering and token efficiency
| 1 | # Authoring Skill Content |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Guide the authoring of effective SKILL.md files, agent definitions (`agents/*.md`), and supporting resources within a bundle-plugin. Good content is the difference between skills that agents consistently find and follow — and ones that get ignored or misinterpreted. |
| 6 | |
| 7 | **Core principle:** Write for the agent's experience. Every instruction should be discoverable (good description), loadable (right size), and followable (clear, motivated instructions). Skills are the first-class source of truth in a bundle-plugin — docs and README must not contradict skill content (see `bundles-forge:auditing` — `references/source-of-truth-policy.md`). |
| 8 | |
| 9 | **Skill type:** Hybrid — follow the execution flow rigidly (Entry Detection → Path steps → Validation), but apply writing guidance flexibly based on context. The process is discipline-enforcing; the content decisions are pattern-based. |
| 10 | |
| 11 | **Announce at start:** "I'm using the authoring skill to help [write / complete / improve / adapt] [skill / agent] content." |
| 12 | |
| 13 | ## Entry Detection |
| 14 | |
| 15 | Determine the authoring path from context: |
| 16 | |
| 17 | | Context | Path | |
| 18 | |---------|------| |
| 19 | | `skill-inventory` from blueprinting, or user requests writing new SKILL.md / agent definition from scratch | **Path 1: New Content** | |
| 20 | | User provides an existing/external skill to add into a project, or asks to adapt a skill to match project conventions | **Path 2: Integrate Content** | |
| 21 | | `scaffold-output` directories exist but SKILL.md body has < 10 non-empty lines | **Path 3: Complete Content** | |
| 22 | | User provides existing in-project `skill-md` to improve, or `optimization-spec` from optimizing with specific changes | **Path 4: Improve Content** | |
| 23 | |
| 24 | When the target is an agent definition (`agents/*.md`) rather than a skill, follow the same path logic but use the agent authoring conventions from `references/agent-authoring-guide.md`. |
| 25 | |
| 26 | ## Step 0: Project Context (all paths) |
| 27 | |
| 28 | Before writing any content, verify scope and detect the project context: |
| 29 | |
| 30 | 0. **Triage: should this be a skill?** — Before writing, verify the content warrants a skill: |
| 31 | - One-off, project-specific conventions → belongs in CLAUDE.md / AGENTS.md, not a skill |
| 32 | - Mechanically enforceable constraints (regex, schema validation) → automate with scripts, not documentation |
| 33 | - Standard practices well-documented by the platform → don't duplicate, cross-reference instead |
| 34 | - Skip this check when arriving from `bundles-forge:blueprinting` (triage already done during design) |
| 35 | 1. **Detect project root** — look for `skills/` directory + `package.json` above the target |
| 36 | 2. **If project exists**, read 2-3 existing SKILL.md files to extract the project's conventions: |
| 37 | - Description style (verb form after "Use when", scoping patterns) |
| 38 | - Section structure (which headings, in what order) |
| 39 | - Cross-reference format (`project:skill-name` prefix) |
| 40 | - Token efficiency patterns (use of `references/`, line counts) |
| 41 | 3. **If no project** (standalone authoring), use the conventions from `references/skill-writing-guide.md` directly |
| 42 | |
| 43 | ## Path 1: New Content |
| 44 | |
| 45 | Write skill or agent content from scratch. |
| 46 | |
| 47 | 1. **Gather requirements** — from `skill-inventory` and design document context (blueprinting), user description, or conversation context. Identify: skill purpose, triggering scenarios, expected inputs/outputs, relationship to other skills. When a design document is available, leverage its project overview, target users, and use cases to write more targeted descriptions and overviews |
| 48 | 2. **Load writing guide** — read `references/skill-writing-guide.md` (frontmatter conventions, description rules, instruction style) |
| 49 | 3. **Write frontmatter** — `name` (kebab-case matching directory), `description` (start with "Use when...", under 250 chars, triggering conditions only) |
| 50 | 4. **Write Overview** — 1-3 sentences: what the skill does, core principle, skill type declaration (rigid / flexible / hybrid) |
| 51 | 5. **Write the process** — step-by-step execution flow. Use imperative form. Explain why, not just what. Include at least one concrete example per key instruction |
| 52 | 6. **Write Common Mistakes** — table of pitfalls and fixes (at least 3 entries) |
| 53 | 7. **Write Inputs / Outputs / Integration** — declare artifact IDs, calling relationships, and pairing skills |
| 54 | 8. **Check external dependencies:** |
| 55 | - **Declaration syntax** — if the skill references MCP tools or CLI commands, read `references/skill-writing-guide.md` "External Tool References" section for `allowed-tools` declaration, fallback patterns, and CLI vs MCP guidance |
| 56 | - **Prerequisites section** — if `allowed-tools` declares external CLI tools (not `git`, `python`, `node`, `npm`, `npx`, `bash`, or paths under ` |