Claude Code is powerful out of the box. But skills and subagents turn it into a system that compounds — reusable commands, specialized agents, and workflows that scale with your codebase.
What Are Claude Code Skills?
If you've used Claude Code for more than a week, you've probably noticed a pattern: you type the same kinds of instructions over and over. "Review this PR with focus on security." "Deploy to staging and run smoke tests." "Refactor this component using the patterns from our design system."
Skills solve this. A skill is a reusable slash command that gives Claude specific instructions for a task. Instead of typing a paragraph every time you want Claude to do something, you type /deploy or /review-pr and it knows exactly what to do, how to do it, and what standards to follow.
Think of skills as your personal Claude playbook — encoded in markdown files, version-controlled alongside your code, and shared across your entire team. They follow the Agent Skills open standard, which means they work across multiple AI tools, not just Claude Code.
This matters because the biggest productivity drain with AI coding assistants isn't the AI's capability. It's the context you have to provide every single time. Skills eliminate that friction entirely.
Anatomy of a Skill
Every skill lives in a SKILL.md file. It has two parts: YAML frontmatter that tells Claude when and how to use the skill, and markdown content with the actual instructions Claude follows when the skill is invoked.
You can store skills in two places. Global skills go in ~/.claude/skills/ and are available in every project. Project skills go in .claude/skills/ within your repository and are shared with anyone who clones the repo.
The Frontmatter
The frontmatter is where you configure how the skill behaves. The name field sets the slash command name. The description tells Claude (and your team) what the skill does. The invocation field controls when the skill triggers — user means it only runs when explicitly called, while auto lets Claude invoke it when it detects a matching situation.
The agent field is where things get interesting. You can specify which subagent configuration to use — built-in agents like Explore or Plan, or any custom subagent you've defined in .claude/agents/. This lets you create skills that delegate to specialized agents optimized for specific tasks.
The Instructions
Below the frontmatter, you write plain markdown instructions. These are injected as Claude's system prompt when the skill runs. You can include step-by-step procedures, code patterns to follow, validation checks, and references to project files.
The power here is specificity. A generic instruction like "review this code" produces generic results. A skill that says "check for SQL injection in any raw query, verify all user inputs pass through our sanitization middleware, flag any use of eval() or Function(), and cross-reference against our OWASP checklist at docs/security.md" produces consistently excellent results.
Built-in Skills Worth Knowing
Claude Code ships with a set of bundled skills that are available in every session. These are worth learning before you start building your own, because they cover the most common workflows and serve as excellent templates.
/commit
Analyzes staged changes, drafts a commit message following your repo's conventions, and creates the commit. It reads recent commit history to match your style. Sounds simple, but it eliminates the context switch between coding and committing, and it produces consistently better commit messages than most developers write under time pressure.
/simplify
Reviews recently changed code for reuse opportunities, quality issues, and efficiency improvements. This is the skill I run after every significant implementation — it catches the abstractions you missed and the edge cases you forgot while focused on making the happy path work.
/loop
Runs a prompt or slash command on a recurring interval. You can set a fixed interval like /loop 5m /deploy-check or let Claude self-pace. This is how you build monitoring workflows — watching a build, polling for deployment status, or periodically checking test results while you work on something else.
/review-pr
Fetches a pull request, analyzes every commit, checks for security issues, tests coverage gaps, and provides structured feedback. Combine this with project-specific rules in your CLAUDE.md and you get code review that enforces your team's standards automatically.
Building Your Own Skills
The built-in skills are useful, but the real power is in building skills tailored to your project. Here's the framework I use when creating custom skills for teams.
Step 1 — Identify the Repetition
Look at your last 20 Claude Code conversations. What instructions did you type more than twice? What context did you keep providing? Those are your skill candidates. Common patterns: deployment procedures, code review checklists, migration steps, component scaffolding, and test writing conventions.
Step 2 — Write the Instructions
Write your skill instructions as if you're briefing a senior developer who just joined the team. They're smart but they don't know your project. Be explicit about file paths, naming conventions, testing requirements, and what "done" looks like. Vague skills produce vague results.
Include references to your project's documentation. If you have a style guide at docs/style.md, tell the skill to read it. If there's a component template at templates/component.vue, point to it. The more grounded your skill is in actual project artifacts, the better the output.
Step 3 — Set the Right Invocation
Use invocation: user for skills that should only run when explicitly called — deployment, database migrations, anything with side effects. Use invocation: auto for skills that should fire when Claude detects a matching pattern — like automatically applying your component naming convention when it sees you creating a new component.
Auto-invoked skills are powerful but use them carefully. A skill that fires when you don't expect it is worse than no skill at all.
Step 4 — Commit and Share
Put project-specific skills in .claude/skills/ and commit them. Now every developer on the team has the same slash commands, the same standards enforcement, and the same workflow shortcuts. This is how you scale AI-assisted development beyond individual productivity — you encode your team's collective intelligence into reusable commands.
"The biggest productivity drain with AI coding assistants isn't the AI's capability. It's the context you have to provide every single time. Skills eliminate that friction entirely."
Agents and Subagents
Skills tell Claude what to do. Agents control how it does it. Claude Code's agent system lets you spawn specialized subagents — isolated instances that handle specific parts of a task with their own tools, context, and instructions.
The built-in agents cover the most common patterns. Explore is optimized for codebase navigation — fast file searching, pattern matching, and understanding project structure. Plan is a software architect agent that designs implementation strategies, identifies critical files, and considers trade-offs before you write any code. The general-purpose agent handles everything else.
But the real power is in custom agents. You define them in .claude/agents/ with their own system prompts, tool access, and behavioral constraints. A security-review agent that only has read access and focuses exclusively on vulnerability patterns. A migration agent that understands your database schema and ORM conventions. A documentation agent that reads your code and generates docs matching your existing style.
Why Subagents Matter
Subagents aren't just about parallelism. They're about context isolation. When you ask Claude to do ten things in one conversation, context bleeds between tasks. The code review influences the refactoring. The deployment check changes how it writes tests.
Subagents solve this by running in isolation. Each one gets a clean context window, focused instructions, and only the tools it needs. The results flow back to the main conversation, but the work happens in a controlled environment. This is the same principle behind microservices — bounded contexts produce better results than monolithic processes.
A skill can specify agent: my-custom-agent in its frontmatter, and now your slash command delegates to a specialized agent. /security-scan spawns your security agent. /plan-feature spawns your architecture agent. The skill provides the instructions; the agent provides the execution environment.
Real-World Skill Patterns
Here are the skill patterns I've found most valuable across different projects. These aren't hypothetical — they're running in production codebases right now.
Component Scaffolding
A skill that creates new components following your exact project conventions. It reads your existing component templates, applies your naming patterns, sets up the test file structure, and adds the component to your barrel exports. What used to be 15 minutes of boilerplate becomes /new-component Button.
Database Migration Validator
Before running any migration, this skill checks for destructive changes, verifies rollback scripts exist, validates that the migration is compatible with zero-downtime deployment, and tests it against a schema snapshot. It catches the migration that drops a column you're still reading from in production — before it reaches staging.
Release Notes Generator
Reads the git log since the last tag, categorizes changes by type (feature, fix, chore), pulls PR descriptions for context, and generates release notes in your team's format. Some teams want changelogs. Others want Slack-friendly summaries. The skill encodes whatever format your team uses.
Incident Response Runbook
When something breaks at 2 AM, the last thing you want is to remember the exact sequence of diagnostic commands. This skill takes an error description, checks logs, identifies the likely service, runs your standard diagnostics, and produces a structured incident report — all from /incident "API returning 503 on /users endpoint".
The Agent Skills Open Standard
Claude Code skills follow the Agent Skills open standard. This is worth understanding because it means your investment in writing skills isn't locked into a single tool. The same SKILL.md files work across compatible AI tools — your skills are portable.
Claude Code extends the standard with additional features like invocation control, subagent execution, and dynamic context injection. But the base format is interoperable. If you switch tools or use multiple AI assistants across your team, your skills library travels with you.
This is also why skills belong in your repository, not in a personal config. They're project artifacts just like your CI configuration, your linting rules, and your testing standards. They codify how your team works — and they should evolve alongside your code.
The teams I work with who get the most out of Claude Code share one trait: they treat their .claude/ directory as seriously as their src/ directory. Skills are code. Version them. Review them. Iterate on them. The compound returns are enormous.
Skills plug directly into the broader stack of AI automations for business — the research agents, outreach pipelines, and support triage workflows that actually ship. If you're building these systems for a team and want a partner who thinks about them as infrastructure, the AI automation service is built exactly for that.
FAQ
Common questions.
What is a Claude Code skill?
A Claude Code skill is a reusable slash command defined as a markdown file that tells Claude how to do a specific task — how to review a PR, how to deploy, how to write a migration, how to run the project's own conventions. Instead of retyping a paragraph of context every time you want Claude to do a task, you type /review-pr or /deploy and Claude loads the skill's instructions, tools, and constraints automatically. Skills live in the repo, get version-controlled with the code, and give every engineer on the team the same upgraded Claude experience.
What is the difference between a skill and a subagent in Claude Code?
A skill is a procedure — how to perform a task. A subagent is an isolated worker — a separate Claude instance with its own context window, tool allowlist, and model choice, spawned to handle work the main conversation should not consume its context doing. Common pattern: the main agent drives the conversation, and when a long research or exploration task comes up, it spawns a subagent with a tight prompt. The subagent returns a summary; the main context stays clean. Skills say 'how to do X'; subagents decide 'who does X'.
How do I build a custom Claude Code slash command?
Create a markdown file at .claude/skills/<name>.md in your repo with two things: frontmatter (name, description, optional argument hints and allowed tools) and a body that describes how Claude should perform the task — instructions, conventions, edge cases, examples. Restart Claude Code; the skill is now callable as /<name>. Keep the body focused on non-obvious instructions — what a new engineer would not derive from reading the code. The skill should fit comfortably on a screen. Long, rambling skills degrade faster than short sharp ones.
Can I share Claude Code skills across a team?
Yes — that is the whole point. Skills committed to the repo under .claude/skills/ are available to everyone who clones it. You can also ship personal skills at the user level (~/.claude/skills/) that stay local to your machine, and plugin-namespaced skills that come from an installed plugin. The team pattern most repos settle on: shared skills for project-specific workflows (deploy, review, release), personal skills for individual productivity (inbox triage, journal, day-planner), and plugin skills for anything installable.
When should I use a subagent instead of a skill?
Use a skill when the task is a procedure your main agent should run in the current conversation. Use a subagent when the task is either large enough to bloat the main context (a multi-file codebase exploration, a long research dive) or independent enough to run in parallel (launching three agents to investigate three modules simultaneously). The cost of a subagent is a cold start and no shared memory with the main conversation; the benefit is a clean context, focused tool permissions, and the ability to parallelise. If the work is short and the output is small, just use a skill.
What is the Agent Skills open standard?
The Agent Skills standard is an emerging format for describing reusable AI skills in a tool-agnostic way — the same markdown skill file should work across Claude Code, other Claude clients, and third-party agent frameworks that adopt the spec. In practice today, the format is stable in Claude Code and is being referenced by other tool vendors. For a team, writing skills against the standard today is a cheap hedge: the markdown is simple, portable, and unlikely to be invalidated by future changes to any single vendor's implementation.
Part of the /ai hub
Free download · 6 pages · PDF
10 AI workflows that actually save hours.
Real agentic workflows running in production — not prompt packs. Stacks, costs, and failure modes from projects that shipped.
No spam. You also get the Sunday note — unsubscribe in one click.