AI-101

Lesson 21

Understanding Skills

AI Confidence: 90%

AI-generated

Understanding Skills

Learning Objectives

Distinguish skills from built-in commands

List the five bundled skills that ship with Claude Code

Invoke skills with /skill-name

Know when Claude invokes skills automatically

Understand how skills extend Claude's capabilities

Introduction

Skills are how Claude Code learns new tricks. Unlike built-in commands that run fixed logic, skills give Claude a playbook to follow. They can be as simple as a set of coding conventions or as complex as a multi-step workflow.

Claude Code ships with bundled skills, and you can create your own. This lesson introduces how skills work and covers the skills that come built in. Later lessons teach you to create custom skills.

Skills vs Built-in Commands

Both appear when you type /, but they work differently:

Built-in commands execute immediately with fixed behavior:

/clear - Always clears history the same way

/cost - Always shows token usage

/model - Always opens model picker

Skills provide instructions that Claude follows:

/simplify - Claude reviews code using the skill's playbook

/debug - Claude investigates using the skill's approach

/batch - Claude orchestrates using the skill's workflow

Skills are flexible. Claude interprets the instructions and adapts to your situation. Built-in commands are rigid. They do exactly one thing.

Bundled Skills

Claude Code ships with five bundled skills:

/batch <instruction>

Orchestrates large-scale changes across your codebase. You describe what should change:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

The skill:

Researches your codebase

Breaks work into independent units

Spawns parallel agents in isolated worktrees

Each agent implements its unit

Creates pull requests for each change

Use for bulk migrations, refactors, or updates that touch many files.

/simplify [focus]

Reviews your recent changes for code quality:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Three agents review in parallel for:

Code reuse opportunities

Quality issues

Efficiency improvements

Results are aggregated and fixes applied. Covered in detail in the previous unit.

/debug [description]

Enables debug logging and helps troubleshoot:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

The skill:

Enables detailed logging

Reads session debug logs

Analyzes the problem you described

Suggests investigation paths

Use for complex bugs that need internal logging.

/loop [interval] <prompt>

Runs a prompt repeatedly on an interval:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop
[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

The skill:

Runs your prompt immediately

Waits the specified interval

Runs again

Continues until you stop it

Use for polling, monitoring, or babysitting long processes.

/claude-api

Loads Claude API reference material:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

The skill loads documentation for:

Claude API for your language (Python, TypeScript, etc.)

Agent SDK reference

Tool use, streaming, batches, structured outputs

Common pitfalls

This skill also activates automatically when your code imports the Anthropic SDK.

Invoking Skills

Type / followed by the skill name:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Arguments come after the skill name. What arguments are accepted depends on the skill.

See available skills:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Lists all skills available in your current session, including bundled skills and any custom skills.

Tab completion:

Type /sim and press Tab to complete to /simplify.

Automatic Invocation

Some skills can be invoked by Claude automatically when relevant.

For example, /claude-api activates when you work with code that imports the Anthropic SDK. You do not have to type the command. Claude sees the context and loads the skill.

Bundled skills have descriptions that tell Claude when to use them. When your question matches a skill's purpose, Claude may apply it automatically.

You can disable automatic invocation for specific skills by setting disable-model-invocation: true in the skill's configuration (covered in the next lesson).

Skills in Action

Example: Batch migration

You have 50 React class components to convert to functional components.

Without skills: Ask Claude to convert each file one by one. Very slow.

With /batch:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude:

Finds all class components

Creates a conversion plan

Spawns agents in parallel

Each agent converts files independently

Creates PRs for review

What would take hours happens in minutes.

Example: Debug session

Your API returns 500 errors intermittently.

Without skills: Ask Claude to investigate, hope it finds the issue.

With /debug:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude:

Enables detailed logging

Reads recent error logs

Traces the error through code

Identifies likely causes

The debug skill gives Claude access to internal logs that are normally hidden.

Key Takeaways

Skills provide playbooks that Claude follows, unlike fixed built-in commands

Five bundled skills: /batch, /simplify, /debug, /loop, /claude-api

Invoke with /skill-name followed by arguments

Some skills activate automatically when context matches

Skills extend what Claude can do beyond basic commands

Use /skills to see what is available

Try It Yourself

Explore bundled skills:

Start Claude Code and run /skills to see available skills.

Run /simplify if you have recent changes to review.

Run /loop 1m /cost to check cost every minute. Stop with Escape after a few iterations.

Run /debug with a description of any issue you are curious about.

If you have code that uses the Claude API, notice if /claude-api activates.

This exercise introduces you to what bundled skills can do.

Sources

https://code.claude.com/docs/en/skills - Skills documentation, bundled skills reference

https://code.claude.com/docs/en/commands - How skills appear alongside commands

https://code.claude.com/docs/en/best-practices - Using skills effectively