M
MeshWorld.
AI Claude Agent Skills Claude Code 4 min read

What Are Claude Agent Skills and How Do They Work?

By Vishnu Damwala

Claude Code shipped with slash commands from the start — /commit, /review, /help. But in 2025, Anthropic introduced something more powerful: Agent Skills.

Skills are programmable, reusable capabilities you can add to Claude Code (and any compatible AI coding tool). They go beyond static commands. A skill can inject dynamic context, run shell commands, call APIs, and define exactly how Claude should behave for a specific workflow.

What a skill actually is

A skill is a directory containing a SKILL.md file and optional supporting files. That’s it.

The SKILL.md file defines:

  • The slash command that triggers the skill (e.g., /deploy)
  • A description of what the skill does
  • The prompt or instructions Claude follows when invoked
  • Optional lifecycle hooks (before/after execution)
  • Any tools the skill needs access to

When you run /deploy in Claude Code, Claude reads the SKILL.md, follows the instructions, uses the defined tools, and runs any hooks — all in one smooth flow.

The SKILL.md format

Here is a minimal example:

# Skill: Deploy to Staging

## Trigger
/deploy-staging

## Description
Runs build checks, tags the commit, and deploys to the staging environment.

## Instructions
1. Run `pnpm build` and report any errors.
2. If build passes, run `pnpm test` and stop if tests fail.
3. If tests pass, create a git tag with today's date.
4. Run `./scripts/deploy.sh staging` and report the output.
5. Confirm deployment by hitting the staging health endpoint.

## Tools
- shell: true
- read_file: true

## On Success
Report the staging URL and git tag created.

When you run /deploy-staging, Claude executes these steps in order, using shell access and file reads as needed.

Lifecycle hooks

Skills support hooks that run at key points:

  • PreToolUse — runs before a tool is called (e.g., validate input, log the action)
  • PostToolUse — runs after a tool completes (e.g., format output, trigger a follow-up action)
  • Notification — sends a message without blocking execution

Hooks are defined as shell commands in SKILL.md:

## Hooks
before_shell: echo "Running shell command: $TOOL_INPUT"
after_shell: echo "Command completed with exit code: $EXIT_CODE"

This gives you observability and control over exactly what the skill does at each step.

Dynamic context injection

One of the most useful features: skills can inject context that changes per invocation.

Instead of hardcoding values, you reference environment variables or dynamic inputs:

## Instructions
You are deploying to {{ env.DEPLOY_TARGET }}. The current branch is {{ git.branch }}.
Check if there are any open PRs before proceeding.

Claude fills in the actual values at runtime. This makes one skill work across different environments, branches, and configurations without duplicating it.

Official, verified, and community skills

The skills ecosystem has three tiers:

  1. Official skills — shipped by Anthropic as part of Claude Code (e.g., /commit, /review-pr)
  2. Verified skills — community-built, reviewed by Anthropic for quality and safety
  3. Community skills — open-source skills anyone can publish and use

You can install a community skill in one command:

claude skills install github:username/skill-name

Or add it to your project’s skills.json to share it with your team.

Why skills matter for developer workflows

Before skills, customizing Claude for your team meant:

  • Writing long system prompts
  • Maintaining a CLAUDE.md with workflow notes
  • Hoping Claude remembered to follow them

Skills make that customization explicit and executable. Instead of telling Claude “always run tests before committing”, you write a /commit skill that does exactly that, every time, with no reliance on context memory.

The practical difference:

ApproachReliabilityReusabilityShareability
System prompt instructionsMediumLowManual copy-paste
CLAUDE.md notesMediumLowPer-repo only
Agent SkillsHighHighOne command install

Skills vs MCP servers

Both extend Claude’s capabilities, but in different ways:

  • Skills are workflow scripts — they define how Claude behaves for a specific task in your development environment
  • MCP servers are tool providers — they expose capabilities Claude can call (like querying a database or searching files)

You can use both together. A skill might orchestrate several MCP tool calls as part of its workflow.

Next steps