/claude-code-hero:level-3-the-goblin-lairfrom claude-code-hero
Teaches how to create custom slash commands in `.claude/commands/` with YAML frontmatter and `$ARGUMENTS` for dynamic input. Useful for turning repetitive multi-line prompts into single `/command` invocations.
Ships in claude-code-hero. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create a custom slash command at .claude/commands/hero-spell.md with valid YAML frontmatter and a useful prompt body.
You've written standing orders in CLAUDE.md. But some tasks don't belong in permanent instructions -- they're things you do repeatedly, on demand. Slash commands turn multi-line prompts into single invocations. Type /your-command and the whole prompt fires. They're the simplest extension point Claude Code offers, and once you've built one, you'll build a dozen.
You descend a narrow staircase. The air thickens. Somewhere below, you hear them -- goblins. Dozens of them, doing the same tedious work over and over. Running the same prompts. Copying the same boilerplate. Repeating the same instructions that could be written once and invoked forever.
Your weapon against this horde: a slash command.
Every spell needs a name. Yours is hero-spell -- but not just any spell. You're forging /fire-magic-missile. Create .claude/commands/hero-spell.md. It must have:
--- markers containing a description field and an argument-hint field$ARGUMENTS in the prompt body to accept a targetThe filename becomes the command name: hero-spell.md becomes /hero-spell. But a spell without a target is just noise. Use $ARGUMENTS so the caster can aim. /hero-spell the goblin king should replace $ARGUMENTS with "the goblin king".
Your command should generate a dramatic battle message when invoked. Something like: "Describe the casting and impact of a magic missile spell aimed at $ARGUMENTS. Be dramatic but brief -- three to four sentences. Include the sound it makes and what happens on impact."
The content is fun, but the mechanism is real. $ARGUMENTS is how every serious slash command accepts dynamic input. You'll use this pattern for code review targets, file paths, branch names -- anything you'd pass as an argument.
Before you verify, cast the spell. Type /hero-spell the goblin king in Claude Code. You should see Claude generate a dramatic battle scene targeting "the goblin king." That's $ARGUMENTS at work -- your prompt body with the target swapped in. If the command doesn't appear when you type /, the file isn't in the right place or the frontmatter is malformed.
Hold onto this spell. You'll see it again.
The file goes at .claude/commands/hero-spell.md. If the directory doesn't exist, create it. The filename (minus .md) becomes the command name -- so this becomes /hero-spell.
The frontmatter needs description and argument-hint:
---
description: What this command does (shows up in the command list)
argument-hint: [target]
---
Your prompt body here. Use $ARGUMENTS where the target goes.
The argument-hint shows up as placeholder text after the command name -- /hero-spell [target] in the command list. $ARGUMENTS gets replaced with whatever follows the command name: /hero-spell the goblin king becomes "the goblin king" in the prompt body.
When you're ready, run /claude-code-hero:verify to check your work.
.claude/commands/hero-spell.mdtest -f .claude/commands/hero-spell.md && echo "exists" || echo "missing"--- delimiters at the top)description field with a real description (not empty, not "test")argument-hint field (e.g., [target])$ARGUMENTS for dynamic input (the spell needs a target)The goblins scatter. Where repetition once ruled, a single word now carries your intent. And that spell you just forged? Keep it close. It has a future you haven't seen yet.
Notice the --- markers at the top of your command? That incantation -- YAML frontmatter -- appears in every spell in this realm. Commands, rules, skills, agents -- they all begin the same way. Remember this pattern. You'll see it again.
Next, you'll learn who holds the keys to what powers flow through this realm.
What SKILL.md sets; muted values are Claude Code's defaults
15 skills in this plugin
/level-0-the-thresholdClaude Code Hero Level 0: The Threshold -- learn the basics of talking to Claude Code before entering the dungeon/level-10-the-hall-of-watchersClaude Code Hero Level 10: The Hall of Watchers -- add a PreToolUse prompt hook with a multi-tool matcher/level-11-the-oracle-wellClaude Code Hero Level 11: The Oracle Well -- connect an MCP server and gain a new tool/level-12-the-warbandClaude Code Hero Level 12: The Warband -- write a dynamic workflow that fans work out across agents/level-1-the-map-roomClaude Code Hero Level 1: The Map Room -- explore the project's .claude/ directory and document what lives there/level-2-the-tomeClaude Code Hero Level 2: The Tome of First Instructions -- create .claude/CLAUDE.md with real personal instructionsnpx claudepluginhub kylesnowschwartz/claude-code-hero --plugin claude-code-heroOther plugins' skills for the same job