From af7602f40ab5db03102547ca76718a9bfc70b3e5 Mon Sep 17 00:00:00 2001 From: daymade Date: Thu, 29 Jan 2026 20:17:04 +0800 Subject: [PATCH] docs(skill-creator): Enhance frontmatter documentation with $ARGUMENTS and examples Improvements to the YAML frontmatter documentation merged from PR #6: - Add explanation of $ARGUMENTS placeholder and how it works with skill invocation - Add inline example showing /deep-research invocation with arguments - Expand allowed-tools field with more wildcard examples (npm, docker compose) - Add hooks field example showing pre-invoke configuration - Update init_skill.py template with wildcard examples and $ARGUMENTS hint Co-Authored-By: Claude Opus 4.5 --- skill-creator/SKILL.md | 7 +++++-- skill-creator/scripts/init_skill.py | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/skill-creator/SKILL.md b/skill-creator/SKILL.md index 2910240..5ffbfcb 100644 --- a/skill-creator/SKILL.md +++ b/skill-creator/SKILL.md @@ -66,10 +66,12 @@ allowed-tools: Read, Grep, Bash(git *) | `agent` | No | Which subagent type to use when `context: fork` is set. Options: `Explore`, `Plan`, `general-purpose`, or custom agents from `.claude/agents/`. Default: `general-purpose`. | | `disable-model-invocation` | No | Set to `true` to prevent Claude from automatically loading this skill. Use for workflows you want to trigger manually with `/name`. Default: `false`. | | `user-invocable` | No | Set to `false` to hide from the `/` menu. Use for background knowledge users shouldn't invoke directly. Default: `true`. | -| `allowed-tools` | No | Tools Claude can use without asking permission when this skill is active. Example: `Read, Grep, Bash(git *)`. | +| `allowed-tools` | No | Tools Claude can use without asking permission when this skill is active. Supports wildcards: `Read, Grep, Bash(git *)`, `Bash(npm *)`, `Bash(docker compose *)`. | | `model` | No | Model to use when this skill is active. | | `argument-hint` | No | Hint shown during autocomplete to indicate expected arguments. Example: `[issue-number]` or `[filename] [format]`. | -| `hooks` | No | Hooks scoped to this skill's lifecycle. See Claude Code Hooks documentation for configuration format. | +| `hooks` | No | Hooks scoped to this skill's lifecycle. Example: `hooks: { pre-invoke: [{ command: "echo Starting" }] }`. See Claude Code Hooks documentation. | + +**Special placeholder:** `$ARGUMENTS` in skill content is replaced with text the user provides after the skill name. For example, `/deep-research quantum computing` replaces `$ARGUMENTS` with `quantum computing`. ##### When to Use `context: fork` @@ -93,6 +95,7 @@ Research $ARGUMENTS thoroughly: 2. Read and analyze the code 3. Summarize findings with specific file references ``` +When invoked as `/deep-research authentication flow`, `$ARGUMENTS` becomes `authentication flow`. **Example: Reference skill that runs inline:** ```yaml diff --git a/skill-creator/scripts/init_skill.py b/skill-creator/scripts/init_skill.py index b51dde7..6390036 100755 --- a/skill-creator/scripts/init_skill.py +++ b/skill-creator/scripts/init_skill.py @@ -23,8 +23,8 @@ description: [TODO: Complete and informative explanation of what the skill does # agent: Explore # Subagent type when context: fork (Explore, Plan, general-purpose, or custom) # disable-model-invocation: true # Only allow manual /skill-name invocation, prevent auto-triggering # user-invocable: false # Hide from / menu (for background knowledge only) -# allowed-tools: Read, Grep # Tools allowed without permission prompts -# argument-hint: [filename] # Autocomplete hint for arguments +# allowed-tools: Read, Grep, Bash(git *), Bash(npm *) # Tools allowed without permission prompts (wildcards supported) +# argument-hint: [filename] # Autocomplete hint for arguments. Use $ARGUMENTS in content to access user input --- # {skill_title}