Module 04 — Skills, commands & plugins

In this module

Instead of repeating the same instructions at every session, you will know how to encapsulate them in commands. You will understand how a skill lets Claude automatically apply your architecture conventions without you having to remind them, and how a community-packaged plugin can deliver in 30 seconds a workflow that would have taken you hours to build.

4.1 — Anatomy of a slash command

Slash commands are Markdown files that Claude Code loads and runs as specialized prompts. Unlike native commands (/clear, /compact, /help), custom slash commands are files you create, share via Git, and use to encapsulate repeated workflows in a single invocation.

File format

A slash command is an .md file placed in one of the locations recognized by Claude Code. The file can start with an optional YAML frontmatter, followed by the Markdown content that forms the prompt:

---
description: Generate a unit test for the target file
argument-hint: [file-path]
allowed-tools: Read, Write, Bash(npm:*)
---

Read the file @$1 and generate a complete unit test.
Use the test framework already present in the project.
Run the tests to verify they pass.

The frontmatter is entirely optional. A file containing only Markdown works, Claude Code interprets it as a raw prompt. But the frontmatter adds structure: description shows up in autocomplete, argument-hint guides the user, and allowed-tools restricts the tools available during execution.

Command locations

  • Project: .claude/commands/, versioned in Git, shared with the team
  • User: ~/.claude/commands/, personal, available across all projects
  • Plugin: /commands/, distributed through a plugin

Invocation uses /file-name (without the .md extension). Sub-directories become namespaces: .claude/commands/test/unit.md is invoked with /test:unit.

Key takeaways

• A slash command = a Markdown file with a reusable prompt

• YAML frontmatter is optional but adds description, allowed tools and argument hints

• Three locations: project (.claude/commands/), user (~/.claude/commands/), plugin

• Sub-directories create namespaces (invocation with :)

In this module

  1. 4.1 — Anatomy of a slash command Available
  2. 4.2 — Dynamic arguments: $ARGUMENTS, $1, $2
  3. 4.3 — The @ syntax and file inclusion
  4. 4.4 — The ! syntax and inline bash execution
  5. 4.5 — The YAML frontmatter in detail
  6. 4.6 — Organization and namespacing of commands
  7. 4.7 — Creating your first skill (SKILL.md)
  8. 4.8 — Anatomy of a Claude Code plugin
  9. 4.9 — Plugin hooks: automating reactions
  10. 4.10 — Installing and managing plugins
  11. 4.11 — Creating a custom agent
  12. 4.12 — Advanced patterns and composition

Locked content

Unlock the full course to access this module.

Unlock

Already purchased? Recover access