Harness Engineering 6 months ahead, in a few hours.

Module 04 — Skills, commands & plugins

Updated

In this module

You will know how to write a skill in a SKILL.md file and run it as a slash command. You will check that Claude loads it at the right time. You will also know how to choose between a skill, a rule and a hook, install a plugin after auditing it, and create your first custom agent. You will discover ready-made skill packs, such as Superpowers or Android Skills. You will end by building your own plugin and distributing it to your team.

4.1 — Create a Claude Code skill: SKILL.md and slash command

You often retype the same instruction, for example "review my changes before I commit". A skill records it once and for all. It is a folder that contains a SKILL.md file, with instructions written in Markdown.

A skill triggers in two ways. You can run it yourself as a slash command, by typing /skill-name. Claude can also load it on its own, when your request matches its description.

Your first skill

Create this file in your project, at .claude/skills/quick-review/SKILL.md:

---
description: Reviews uncommitted changes and reports bugs, omissions and missing tests. Use when someone asks for a review before a commit.
---

Review the current changes before the commit.

1. Run `git diff HEAD` to see the changes.
2. Report likely bugs first, then forgotten edge cases.
3. List the missing tests.
4. End with a one-line verdict: ready to commit, or needs fixing.

Do not modify any file.

The folder name gives the command its name. Type /quick-review in Claude Code and Claude follows these four steps. You have nothing to restart, because Claude Code watches the .claude/skills/ folder. If the command does not appear, type /reload-skills.

The two parts of SKILL.md

The block between the two --- lines is called the frontmatter. It holds settings in YAML format. The only one that matters to get started is description. Claude reads this sentence to decide whether the skill answers your request.

The rest of the file is the prompt. Claude receives it only when the skill triggers. While the skill sleeps, only its description takes up space in your context window.

Supporting files in the folder

The skill folder can contain other files, such as a checklist or a script. Claude opens them only if SKILL.md mentions them and the task calls for it.

.claude/skills/quick-review/
├── SKILL.md
├── security-checklist.md
└── scripts/
    └── count-todos.sh

For example, write "for a change to authentication, read security-checklist.md" in SKILL.md. To call a script, use the ${CLAUDE_SKILL_DIR} variable, which Claude Code replaces with the path of the skill folder. The line bash ${CLAUDE_SKILL_DIR}/scripts/count-todos.sh therefore works wherever the skill is installed. Keep SKILL.md under 500 lines and move the details into these supporting files.

What about slash commands in .claude/commands/?

Before skills, a custom slash command was a single file, for example .claude/commands/quick-review.md. This format still works and creates the same /quick-review command. The two formats have merged and accept the same frontmatter. For a new need, write a skill, which has the advantage of its own folder. Section 4.2 covers what you need to know about the older format.

Key takeaways

• A skill is a folder that contains a SKILL.md file. The file starts with a frontmatter, the header between two --- lines that holds the description, then gives the instructions.

• You run it with /name, and Claude can also load it on its own thanks to its description.

• The folder can contain supporting files and scripts, called with ${CLAUDE_SKILL_DIR}.

• Files in .claude/commands/ still work, but a new need is written as a skill.

In this module

  1. 4.1 — Create a Claude Code skill: SKILL.md and slash command Available
  2. 4.2 — Where to store a skill and how Claude triggers it
  3. 4.3 — Slash command arguments: $ARGUMENTS, $0, $1
  4. 4.4 — Dynamic context in a skill: include a file with @, run shell with !
  5. 4.5 — The SKILL.md frontmatter: tools, model and triggering
  6. 4.6 — Skill, CLAUDE.md, rule or hook: which one to choose
  7. 4.7 — Install and audit a Claude Code plugin
  8. 4.8 — Create a custom agent: your first subagent
  9. 4.9 — Guided exercise: write a skill, run it and check that it triggers
  10. 4.10 — Skills and plugins to install
  11. 4.11 — Build your plugin

Locked content

Unlock the full course to access this module.

€89 excl. VAT

€106.80 incl. VAT for EU customers · One-time payment

Already purchased? Recover access

Go further