$npx -y skills add testdouble/han --skill guidanceAuthoritative guidance for building Claude Code skills, agents, and plugins, plus init and update steps that install and refresh the plugin-building skills in the current repository. Use when you need the rules or best practices for a skill, agent, hook, or plugin — designing, re
| 1 | This skill has three modes. Pick the mode from how it was invoked, then follow |
| 2 | only that mode's steps. |
| 3 | |
| 4 | - If the invocation argument is `init` or `initialize` (any case), run |
| 5 | **Initialization Mode**. |
| 6 | - If the invocation argument is `update` or `refresh` (any case), run |
| 7 | **Update Mode**. |
| 8 | - Otherwise, run **Guidance Mode**. |
| 9 | |
| 10 | ## Guidance Mode |
| 11 | |
| 12 | Serve the relevant guidance for what the user is building. Do not read every |
| 13 | guidance document — that defeats the purpose. Find the one or two that apply, |
| 14 | read them, and apply them. |
| 15 | |
| 16 | The guidance documents live in this skill's own `references/` directory. Use |
| 17 | this map to choose, then read only the specific file(s) you need: |
| 18 | |
| 19 | - Deciding whether something should be a skill, agent, or hook → |
| 20 | `${CLAUDE_SKILL_DIR}/references/plugin-entity-taxonomy.md`. |
| 21 | - Authoring or hardening a skill (descriptions, frontmatter, progressive |
| 22 | disclosure, allowed-tools, scripts, composition, testing, troubleshooting) → |
| 23 | the files under `${CLAUDE_SKILL_DIR}/references/skill-building-guidance/`. |
| 24 | - Authoring an agent (domain focus, self-containment, model selection, |
| 25 | multi-agent economics, graceful degradation) → the files under |
| 26 | `${CLAUDE_SKILL_DIR}/references/agent-building-guidelines/`. |
| 27 | - Plugin or marketplace configuration files (plugin.json, marketplace.json, |
| 28 | monitors.json, themes.json) → the files under |
| 29 | `${CLAUDE_SKILL_DIR}/references/claude-marketplace-and-plugin-configuration/`. |
| 30 | - Versioning, README structure, local development, the iterative development |
| 31 | process, and specialization-versus-model-tier reasoning → the top-level |
| 32 | files in `${CLAUDE_SKILL_DIR}/references/`. |
| 33 | - Copyable starter files → `${CLAUDE_SKILL_DIR}/references/templates/`. |
| 34 | |
| 35 | Steps: |
| 36 | |
| 37 | 1. Identify what the user is building or asking about. |
| 38 | 2. List the relevant subdirectory under `${CLAUDE_SKILL_DIR}/references/` to |
| 39 | see the available documents, using the map above. |
| 40 | 3. Read only the document(s) that directly apply. |
| 41 | 4. Apply the guidance to the user's situation. Cite the document you used so |
| 42 | the user can read it in full if they want. |
| 43 | |
| 44 | ## Initialization Mode |
| 45 | |
| 46 | Install the plugin-building skills into the current repository so anyone using |
| 47 | the repo can run them and consult the guidance, with no dependency on this |
| 48 | plugin remaining installed. |
| 49 | |
| 50 | 1. Run `${CLAUDE_SKILL_DIR}/scripts/init-guidance.sh` from the repository root. |
| 51 | The script vendors three skills into `.claude/skills/` under a `plugin-` |
| 52 | prefix so they never collide with this plugin's own slash commands: a |
| 53 | guidance-only `plugin-guidance` skill (whose `references/` directory is the |
| 54 | single in-repo copy of the guidance documents), `plugin-skill-builder`, and |
| 55 | `plugin-agent-builder` (with their names, cross-references, and guidance paths |
| 56 | rewritten to that vendored copy). It then writes the path-scoped rule index at |
| 57 | `.claude/rules/plugin-building-guidance.md`. Capture its output. |
| 58 | 2. Report to the user what was written: the three vendored skills, the total |
| 59 | file count, the rule index path, and the `paths:` globs. Explain that the |
| 60 | three skills are now available directly in the repo (`/plugin-guidance`, |
| 61 | `/plugin-skill-builder`, `/plugin-agent-builder`) and that the rule index is |
| 62 | an index only — Claude Code loads it when a matching skill or agent file is |
| 63 | touched, and it points to the vendored guidance so only the documents the |
| 64 | current file needs are loaded, not all of them. |
| 65 | 3. Do not commit. Leave the new files staged for the user to review. |
| 66 | |
| 67 | ## Update Mode |
| 68 | |
| 69 | Refresh the vendored skills and their rule index in a repository that already |
| 70 | has them, so contributors get the current skills and guidance after this plugin |
| 71 | has been updated. Updating is the same vendoring operation as Initialization |
| 72 | Mode — it replaces every vendored skill in full (each `SKILL.md` and the |
| 73 | guidance documents under `plugin-guidance/references/`, removing any files that |
| 74 | the plugin source has since dropped) and regenerates the rule index — but it |
| 75 | first confirms the skills are actually installed before touching anything. |
| 76 | |
| 77 | 1. Check whether the skills are already installed at the expected location. |
| 78 | Run `find .cl |