Project Context
- personal config directory: !
echo "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
- project .han/config.md: !
cat .han/config.md 2>/dev/null || echo ""
As your first action, use the Read tool on .han/config.md inside the personal config directory path above. A read
that returns no file is no personal configuration: continue silently. When that file or the project .han/config.md
probe supplies content, apply it per config-rule.md, which governs precedence
between the two files, relative-path resolution, and what to do with a file that reads but cannot be used.
This skill has three modes. Pick the mode from how it was invoked, then follow only that mode's steps.
- If the invocation argument is
init or initialize (any case), run Initialization Mode.
- If the invocation argument is
update or refresh (any case), run Update Mode.
- Otherwise, run Guidance Mode.
Guidance Mode
Serve the relevant guidance for what the user is building. Do not read every guidance document — that defeats the
purpose. Find the one or two that apply, read them, and apply them.
The guidance documents live in this skill's own references/ directory. Use this map to choose, then read only the
specific file(s) you need:
- Deciding whether something should be a skill, agent, or hook →
${CLAUDE_SKILL_DIR}/references/plugin-entity-taxonomy.md.
- Authoring or hardening a skill (descriptions, frontmatter, progressive disclosure, allowed-tools, scripts,
composition, testing, troubleshooting) → the files under
${CLAUDE_SKILL_DIR}/references/skill-building-guidance/.
- Authoring an agent (domain focus, self-containment, model selection, multi-agent economics, graceful degradation) →
the files under
${CLAUDE_SKILL_DIR}/references/agent-building-guidelines/.
- Plugin or marketplace configuration files (plugin.json, marketplace.json, monitors.json, themes.json) → the files
under
${CLAUDE_SKILL_DIR}/references/claude-marketplace-and-plugin-configuration/.
- Versioning, README structure, local development, the iterative development process, and
specialization-versus-model-tier reasoning → the top-level files in
${CLAUDE_SKILL_DIR}/references/.
- Writing the instructions for a target model (how Sonnet 5, Opus 5, and Fable 5 differ in following instructions, which
instructions to leave out, and how to calibrate length, narration, and scope) →
${CLAUDE_SKILL_DIR}/references/per-model-authoring.md.
- Copyable starter files →
${CLAUDE_SKILL_DIR}/references/templates/.
Steps:
- Identify what the user is building or asking about.
- List the relevant subdirectory under
${CLAUDE_SKILL_DIR}/references/ to see the available documents, using the map
above.
- Read only the document(s) that directly apply.
- Apply the guidance to the user's situation. Cite the document you used so the user can read it in full if they want.
Initialization Mode
Install the plugin-building skills into the current repository so anyone using the repo can run them and consult the
guidance, with no dependency on this plugin remaining installed.
- Run
${CLAUDE_SKILL_DIR}/scripts/init-guidance.sh from the repository root. The script vendors three skills into
.claude/skills/ under a plugin- prefix so they never collide with this plugin's own slash commands: a
guidance-only plugin-guidance skill (whose references/ directory is the single in-repo copy of the guidance
documents), plugin-skill-builder, and plugin-agent-builder (with their names, cross-references, and guidance
paths rewritten to that vendored copy). It then writes the path-scoped rule index at
.claude/rules/plugin-building-guidance.md. Capture its output.
- Report to the user what was written: the three vendored skills, the total file count, the rule index path, and the
paths: globs. Explain that the three skills are now available directly in the repo (/plugin-guidance,
/plugin-skill-builder, /plugin-agent-builder) and that the rule index is an index only — Claude Code loads it
when a matching skill or agent file is touched, and it points to the vendored guidance so only the documents the
current file needs are loaded, not all of them.
- Do not commit. Leave the new files staged for the user to review.
Update Mode
Refresh the vendored skills and their rule index in a repository that already has them, so contributors get the current
skills and guidance after this plugin has been updated. Updating is the same vendoring operation as Initialization Mode
— it replaces every vendored skill in full (each SKILL.md and the guidance documents under
plugin-guidance/references/, removing any files that the plugin source has since dropped) and regenerates the rule
index — but it first confirms the skills are actually installed before touching anything.
- Check whether the skills are already installed at the expected location. Run
find .claude -maxdepth 3 \( -path '*/skills/plugin-guidance' -o -name plugin-building-guidance.md \) from the
repository root. The skills are installed only when both the .claude/skills/plugin-guidance directory and the
.claude/rules/plugin-building-guidance.md rule index turn up.
- If the skills are not installed (the
find turns up neither, or only one of the two), do not update. Tell the
user the skills are not installed at the expected location (.claude/skills/plugin-guidance/ and
.claude/rules/plugin-building-guidance.md) and ask whether they want to install them now. If they confirm, switch
to Initialization Mode and run its steps. If they decline, stop without writing anything.
- If the skills are installed, run
${CLAUDE_SKILL_DIR}/scripts/init-guidance.sh from the repository root. The
script removes each vendored skill directory and re-copies it fresh from the plugin source, so every SKILL.md and
every guidance document under plugin-guidance/references/ is replaced with the current version (and any file the
plugin has since removed is dropped), then regenerates the rule index at .claude/rules/plugin-building-guidance.md.
Capture its output.
- Report to the user what was refreshed: the three vendored skills, the total file count, the rule index path, and the
paths: globs.
- Do not commit. Leave the changes staged for the user to review.
1---2name: guidance3description: >4 Authoritative guidance for building Claude Code skills, agents, and plugins, plus init and update steps that install5 and refresh the plugin-building skills in the current repository. Use when you need the rules or best practices for a6 skill, agent, hook, or plugin — designing, reviewing, hardening, or checking one against the guidance. Run with `init`7 to vendor the guidance, skill-builder, and agent-builder skills into the current repository (so they run with no8 dependency on this plugin) plus a path-scoped rule index, or `update` to refresh an already-vendored copy. Does not9 run an interview to build a new skill or agent from scratch — use skill-builder or agent-builder. Does not write10 feature code, review application code, or build non-plugin features.11allowed-tools: Read, Glob, Grep, Bash(find *)12metadata:13 source: https://skillmd.com/skills/testdouble/guidance14---1516## Project Context1718- personal config directory: !`echo "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"`19- project .han/config.md: !`cat .han/config.md 2>/dev/null || echo ""`2021As your first action, use the Read tool on `.han/config.md` inside the `personal config directory` path above. A read22that returns no file is no personal configuration: continue silently. When that file or the `project .han/config.md`23probe supplies content, apply it per [config-rule.md](../../references/config-rule.md), which governs precedence24between the two files, relative-path resolution, and what to do with a file that reads but cannot be used.2526This skill has three modes. Pick the mode from how it was invoked, then follow only that mode's steps.2728- If the invocation argument is `init` or `initialize` (any case), run **Initialization Mode**.29- If the invocation argument is `update` or `refresh` (any case), run **Update Mode**.30- Otherwise, run **Guidance Mode**.3132## Guidance Mode3334Serve the relevant guidance for what the user is building. Do not read every guidance document — that defeats the35purpose. Find the one or two that apply, read them, and apply them.3637The guidance documents live in this skill's own `references/` directory. Use this map to choose, then read only the38specific file(s) you need:3940- Deciding whether something should be a skill, agent, or hook →41 `${CLAUDE_SKILL_DIR}/references/plugin-entity-taxonomy.md`.42- Authoring or hardening a skill (descriptions, frontmatter, progressive disclosure, allowed-tools, scripts,43 composition, testing, troubleshooting) → the files under `${CLAUDE_SKILL_DIR}/references/skill-building-guidance/`.44- Authoring an agent (domain focus, self-containment, model selection, multi-agent economics, graceful degradation) →45 the files under `${CLAUDE_SKILL_DIR}/references/agent-building-guidelines/`.46- Plugin or marketplace configuration files (plugin.json, marketplace.json, monitors.json, themes.json) → the files47 under `${CLAUDE_SKILL_DIR}/references/claude-marketplace-and-plugin-configuration/`.48- Versioning, README structure, local development, the iterative development process, and49 specialization-versus-model-tier reasoning → the top-level files in `${CLAUDE_SKILL_DIR}/references/`.50- Writing the instructions for a target model (how Sonnet 5, Opus 5, and Fable 5 differ in following instructions, which51 instructions to leave out, and how to calibrate length, narration, and scope) →52 `${CLAUDE_SKILL_DIR}/references/per-model-authoring.md`.53- Copyable starter files → `${CLAUDE_SKILL_DIR}/references/templates/`.5455Steps:56571. Identify what the user is building or asking about.582. List the relevant subdirectory under `${CLAUDE_SKILL_DIR}/references/` to see the available documents, using the map59 above.603. Read only the document(s) that directly apply.614. Apply the guidance to the user's situation. Cite the document you used so the user can read it in full if they want.6263## Initialization Mode6465Install the plugin-building skills into the current repository so anyone using the repo can run them and consult the66guidance, with no dependency on this plugin remaining installed.67681. Run `${CLAUDE_SKILL_DIR}/scripts/init-guidance.sh` from the repository root. The script vendors three skills into69 `.claude/skills/` under a `plugin-` prefix so they never collide with this plugin's own slash commands: a70 guidance-only `plugin-guidance` skill (whose `references/` directory is the single in-repo copy of the guidance71 documents), `plugin-skill-builder`, and `plugin-agent-builder` (with their names, cross-references, and guidance72 paths rewritten to that vendored copy). It then writes the path-scoped rule index at73 `.claude/rules/plugin-building-guidance.md`. Capture its output.742. Report to the user what was written: the three vendored skills, the total file count, the rule index path, and the75 `paths:` globs. Explain that the three skills are now available directly in the repo (`/plugin-guidance`,76 `/plugin-skill-builder`, `/plugin-agent-builder`) and that the rule index is an index only — Claude Code loads it77 when a matching skill or agent file is touched, and it points to the vendored guidance so only the documents the78 current file needs are loaded, not all of them.793. Do not commit. Leave the new files staged for the user to review.8081## Update Mode8283Refresh the vendored skills and their rule index in a repository that already has them, so contributors get the current84skills and guidance after this plugin has been updated. Updating is the same vendoring operation as Initialization Mode85— it replaces every vendored skill in full (each `SKILL.md` and the guidance documents under86`plugin-guidance/references/`, removing any files that the plugin source has since dropped) and regenerates the rule87index — but it first confirms the skills are actually installed before touching anything.88891. Check whether the skills are already installed at the expected location. Run90 `find .claude -maxdepth 3 \( -path '*/skills/plugin-guidance' -o -name plugin-building-guidance.md \)` from the91 repository root. The skills are installed only when both the `.claude/skills/plugin-guidance` directory and the92 `.claude/rules/plugin-building-guidance.md` rule index turn up.932. If the skills are **not** installed (the `find` turns up neither, or only one of the two), do not update. Tell the94 user the skills are not installed at the expected location (`.claude/skills/plugin-guidance/` and95 `.claude/rules/plugin-building-guidance.md`) and ask whether they want to install them now. If they confirm, switch96 to **Initialization Mode** and run its steps. If they decline, stop without writing anything.973. If the skills **are** installed, run `${CLAUDE_SKILL_DIR}/scripts/init-guidance.sh` from the repository root. The98 script removes each vendored skill directory and re-copies it fresh from the plugin source, so every `SKILL.md` and99 every guidance document under `plugin-guidance/references/` is replaced with the current version (and any file the100 plugin has since removed is dropped), then regenerates the rule index at `.claude/rules/plugin-building-guidance.md`.101 Capture its output.1024. Report to the user what was refreshed: the three vendored skills, the total file count, the rule index path, and the103 `paths:` globs.1045. Do not commit. Leave the changes staged for the user to review.