Back to Library
Stage 01 / Primer

Slash Commands and Skills.

Two ways to give your agent a workflow. Slash commands run on your call: you type a short name and the same prompt fires every time. Skills are quieter. They sit in a folder waiting, and Claude reaches for one on its own when the situation matches what the skill is for. Same idea (reusable workflows), opposite triggers.

What you'll have
  • A clear split between work you'll trigger by name and work the agent should notice on its own.
  • A working slash command you can run with one word instead of retyping the same paragraph every morning.
  • The pattern for a first skill so the agent reaches for the right capability without you naming it.
4D Primer
Read time ~8 min
Track 4D & 8D (everyone)
Touches Slash commands · Skills · CLAUDE.md
Source guides/07-custom-commands.md
One-click start

Learn it, then build one.

Paste this into Claude Code. It pulls the official docs so you can ask anything, then offers to build you a real slash command or skill on the spot. You direct, it builds.

How this fits in the OS.

Depends on

Claude Code installed and a CLAUDE.md so the agent has the context to act on what you ask.

Uses

Two folders on your computer: ~/.claude/commands/ for slash commands and ~/.claude/skills/ for skills.

Unlocks

Repeatable workflows you don't have to retype, and capabilities the agent reaches for on its own.

The split, in one sentence.

A slash command runs when you type its name. A skill runs when Claude decides the moment fits. Same building block (a saved prompt), different trigger.

Both live as plain files on your computer. A slash command is one markdown file in ~/.claude/commands/. The filename becomes the command, so morning.md becomes /morning. A skill is a folder in ~/.claude/skills/ with a short description at the top that tells Claude when to use it. You never type the skill's name. Claude reads the description, recognizes a match in what you said, and reaches for it.

Slash commands: you press the button.

A slash command is a saved prompt with a short name. Anything you find yourself typing into Claude over and over is a candidate. Daily briefing, weekly review, "summarize this," "draft a reply to this email." You write the prompt once, save it as a markdown file, and from then on you type the name.

Your workshop repo already ships with working examples. They aren't theoretical: they are the same files you run during the workshop. A few of them, with what each one actually does:

  • /personalize walks you through the twenty-one personalization questions and writes the answers into your CLAUDE.md so the agent knows who you are.
  • /what-do-i-have inspects your CLAUDE.md, your commands folder, your skills folder, and your connected tools, then lists what you've got plus three useful next moves.
  • /log-decision captures a decision into your second brain: the full record, the raw context, and a short summary card, all in one step.
  • /safe drops the agent into Ask permissions by removing every auto-approve permission, so it asks before each action.
  • /update-course pulls the latest workshop updates from the upstream repo into your private copy without touching your personalized files.

Read any of those by opening the file. They're short, plain markdown. Yours will look the same when you write them.

Skills: the agent picks it up.

A skill is the same kind of saved instruction, but you don't trigger it. The agent does, based on the description you write.

Picture a meeting-prep skill in ~/.claude/skills/meeting-prep/. The description at the top reads something like "Research a person or company before a meeting. Use when the user mentions an upcoming call, intro, or first conversation." You never type /meeting-prep. You say "I've got a call with the new accountant tomorrow, prep me." Claude scans the descriptions of the skills on your computer, sees the match, and runs the steps inside.

That's the whole difference. The behavior is identical to a slash command. What changes is who notices the moment.

The agent does this for you

You don't have to know whether a request is going to land on a skill or not. Just ask the agent what you want. If a skill matches, Claude pulls it in and tells you. If nothing matches, the request runs normally. Skills are additive, not gatekeepers.

Side by side.

Same idea, written and fired two different ways. Here is the whole difference in one view:

Slash commandsSkills
Who triggers it You, on purpose. Claude, when it spots the match.
Where it lives ~/.claude/commands/morning.md ~/.claude/skills/meeting-prep/SKILL.md
What's in the file Just your prompt, in plain markdown. Your prompt plus a short description at the top telling Claude when to use it.
You run it by Typing /morning. Just asking. Claude notices and reaches for it.

So are these two things, or one?

This is the part that trips people up, so it is worth saying plainly. You write a slash command and a skill in two different folders, and they fire two different ways, so they feel like two separate tools. Underneath, they are the same kind of thing: a saved set of instructions Claude can run. A slash command is just one you trigger by hand. A skill is one Claude triggers for you when it spots the moment. Same engine, two ignition switches.

Why you will see them treated as one

These genuinely used to be two separate features. Anthropic merged them, so today a slash command is really a skill you are choosing to run manually. When you hit the forward slash in Claude Code and a menu pops up, you are looking at skills you can fire by name. People still call them slash commands out of habit (that is what they were), but it is the same machinery either way. The upshot: you do not have to agonize over the label. Decide who should pull the trigger, you or the agent, and that tells you which folder the file goes in.

Which one to write.

The shortest version of the decision:

  • Write a slash command when you want to be the trigger. Your morning briefing. Your weekly review. "Draft a reply to the email I'm about to paste." Anything where the moment is yours to declare.
  • Write a skill when you want the agent to notice the situation and reach for the capability without being told. Always lint before committing. Always cite sources when answering factual questions. Always run meeting prep when a call shows up on the calendar.

Slash commands are the simpler starting point. Almost everyone writes one or two of those before they write their first skill. Both files are short, both live as plain text, and both are easy to edit when you notice something missing.

What's actually inside a skill.

We have been calling a skill "a saved prompt," which is the right first picture but not the whole one. A skill is a folder, and it can hold more than instructions. The one required file is SKILL.md: a short description at the top (the part Claude reads to decide when to use it) followed by the steps themselves. Next to it, a skill can bundle reference documents and even small scripts that Claude runs for you.

meeting-prep/
├── SKILL.md        the description plus the instructions
├── reference.md    extra detail, opened only if the task needs it
└── prep.py         a script Claude can run, not just read

That is what lets a skill do more than a slash command without turning into a wall of text. The long detail sits in a reference file. The exact, repeatable part lives in a script, so it runs the same way every time instead of Claude improvising it. Claude reaches for each piece only when it needs that piece, which is the idea the next section is built on.

The fastest way to get this shape into your head is to read a few real ones. Anthropic keeps a public library of official skills, and it is a genuinely good exercise: open two or three SKILL.md files and the pattern clicks faster than any explanation can deliver it.

Can you have too many skills?

Two different answers, and the difference matters.

On cost, the answer is basically no. Claude does not load every skill's full instructions all the time. By default it only keeps each skill's one-line description in view (about a sentence). It opens the full SKILL.md when, and only when, your request matches that skill, and it cracks open the bundled files or runs the scripts only if the task actually reaches them. Anthropic calls this progressive disclosure: load a little, then more, only as needed.

Always loaded Every skill's name and one-line description. Just enough for Claude to know the skill exists and when it might fit. ~a sentence each
When it matches The full SKILL.md instructions. Claude opens the one skill your request matched and reads the steps inside. once, on use
Only if needed Bundled reference files and scripts. A long reference doc, or a script the task happens to call for. free until used

So installing a big pile of skills will not bloat your context or slow Claude down. That is the whole point of the design.

On picking the right one, though, there is a real ceiling. The more skill descriptions Claude has to scan, the harder it gets to reliably choose the right one in the moment. Tyler ran into exactly this when a single tool shipped dozens of skills at once: they all installed fine, but Claude stopped picking them dependably. Two things keep you on the right side of that line:

  • Write sharp descriptions. The one-line description is the part that is always in front of Claude. A vague one and the skill never gets chosen; a specific one ("use when the user mentions an upcoming call") and it fires at the right moment. This single sentence does more work than anything else in the file.
  • Route, once the catalog gets big. When you genuinely have dozens, the move is to put one "front desk" skill in charge of finding the rest, instead of making Claude scan them all. That pattern has its own card: Wrangle Many Skills.

A skill is instructions you are trusting.

Here is the flip side of "the agent reaches for it on its own." A skill can carry instructions and scripts that run on your computer with whatever access your agent has. When you wrote the skill, that is exactly what you want. When you download one from a stranger, you are trusting their file the same way you trust any program you install.

A careless or malicious skill could quietly tell Claude to do something you never asked for: copy a file somewhere, call an outside service, run a command. Anthropic's own guidance is blunt about it: use skills from sources you trust (ones you wrote, or that come from Anthropic), and audit anything from an unknown source before you let it run.

Before you install a borrowed skill

Open the SKILL.md and read it. This is the upside of skills being plain text: you can see exactly what it tells Claude to do, including any scripts it bundles. If it pulls content from the internet or touches files it has no reason to, skip it.

The AI Build Lab also ships a scanner for this, skills-guard, that flags the usual red flags (prompt injection, data exfiltration, destructive commands, leaked keys) before a skill ever touches your agent. Run pip install skills-guard, then skills-guard --check ./the-skill-folder.

Two habits that cost nothing: keep unfamiliar skills in Ask permissions so the agent asks before each action, and never put a real API key or password inside a skill file. Those belong in your secrets manager.

Prefer not to touch the terminal yourself? You direct an agent here, so let it do the setup. Paste this into Claude Code:

Paste into Claude Code Set up skills-guard for me. It's a public Python tool at https://github.com/aibuild-lab/skills-guard that scans a skill for unsafe patterns before I install it. Install the latest version straight from that GitHub repo, confirm it runs, and show me the one command I'll use to scan a skill folder. Then write me a slash command at ~/.claude/commands/update-skills-guard.md that re-runs that same install, so I can type /update-skills-guard whenever Tyler ships an update.

That last step closes the loop on this whole card: the agent writes you a slash command, /update-skills-guard, so pulling Tyler's next update is one word away.

What changes for you.

Once these two are in your kit, a few habits drop away:

  • You stop retyping yourself. The paragraph you used to paste every morning becomes /morning. One word, same result.
  • You stop naming tools. Give a skill a clear description once, and Claude reaches for it on its own when the moment matches. You ask for the outcome, not the capability.
  • Your setup compounds. Every command and skill you save stays. Six months in, your agent runs dozens of your own workflows that a fresh install has never heard of. That gap is your personalization.

Straight from the source.

Skills are an official Claude feature, and Anthropic's own documentation goes deeper than a primer can. Three worth a bookmark:

  • Using skills in Claude Code: the most hands-on of the three, and the closest to what you do in the workshop. Start here.
  • Agent Skills overview: the full picture of how skills load (the three levels) plus Anthropic's security guidance. A little more technical, but this is where progressive disclosure is spelled out.
  • Anthropic's official skills: a public library of skills Anthropic maintains, and the best place to read real SKILL.md files. It includes skill-creator, the skill whose whole job is helping Claude build you a new, well-structured skill. That is the one to reach for when you write your first.
  • Skills cookbook: for the builder track. A hands-on notebook that walks through creating a skill from scratch in code.

Where to go next.

The next layer is either deeper context for these workflows to draw on, or a bigger structure to host them in. Two natural moves:

Back to the Library