Back to all articles
10 MIN READ

Custom Skills & Agents: Extend Claude Code's Capabilities

By Dorian Laurenceau

๐Ÿ“… Last reviewed: April 24, 2026. Updated with April 2026 findings and community feedback.

Claude Code becomes exponentially more powerful when you extend it with custom skills-reusable capabilities that transform it into a specialized expert for any task. Whether you need a security auditor, a test generator, or a documentation writer, skills let you package that expertise once and use it forever.


Introduction to Skills

Why Skills Matter

Traditional ApproachSkills Approach
Repeat instructions every sessionDefine once, use forever
Inconsistent behaviorConsistent, tested behavior
Manual context managementAutomatic context loading
Single-purpose promptsComposable building blocks

The Skills Hierarchy

.claude/
โ”œโ”€โ”€ CLAUDE.md            # Project-level context
โ”œโ”€โ”€ settings.json        # Configuration
โ””โ”€โ”€ skills/              # Skills directory
    โ”œโ”€โ”€ code-review/
    โ”‚   โ””โ”€โ”€ SKILL.md
    โ”œโ”€โ”€ security-audit/
    โ”‚   โ””โ”€โ”€ SKILL.md
    โ””โ”€โ”€ test-generator/
        โ””โ”€โ”€ SKILL.md

Skills are where the hype most frequently exceeds what's actually shipping. A recurring observation across r/ClaudeAI threads: users spend a weekend writing five custom skills, then watch three of them never get invoked because the descriptions don't match how they actually phrase tasks. The mechanism is documented in Anthropic's skills announcement โ€” Claude reads the description field and decides whether the skill is relevant โ€” but the implication is under-appreciated: a skill that nobody can summon is just a folder of dead prose.

What practitioners actually do: treat SKILL.md like a CLI man page, not like a wiki article. The best skills in the wild (see community collections on github.com and in the MCP servers registry) have descriptions written in the exact phrasing a user would type, plus a tight list of preconditions. Everything else โ€” context, examples, rationale โ€” lives inside, and is only read when the skill is actually triggered.

Where the community correctly pushes back: skills are not a substitute for deterministic scripts. If your "skill" is really a 15-step bash pipeline, write the bash pipeline and let the skill call it. The strength of skills is discretionary invocation under ambiguity; the strength of scripts is repeatability under certainty. Mixing those roles is how teams end up with agents that feel magical on day one and broken by week two.


Skill Architecture

Every skill is defined by a SKILL.md file with a specific structure:

SKILL.md Anatomy

---
name: security-audit
description: Comprehensive security analysis following OWASP standards
allowed-tools: Read, Grep, Glob, Bash
context: fork
model: sonnet
---

# Security Audit Skill

You are a security expert...

[Detailed instructions]

Frontmatter Fields

Context Modes


Interactive Skill Builder

Use this wizard to create your own custom skill. Choose a type, configure options, and generate a complete SKILL.md file:


Built-in Skills

Claude Code comes with several pre-built skills you can use immediately or customize:

1. Code Review Skill

---
name: code-review
description: Thorough code review with actionable feedback
allowed-tools: Read, Grep, Glob
context: fork
---

# Code Review Skill

You are a senior engineer conducting a thorough code review.

## Review Checklist
- [ ] Logic correctness
- [ ] Error handling
- [ ] Performance implications
- [ ] Security considerations
- [ ] Test coverage
- [ ] Code style/conventions

## Severity Levels
- ๐Ÿ”ด Critical: Must fix before merge
- ๐ŸŸก Warning: Should address
- ๐ŸŸข Suggestion: Nice to have
- โ„น๏ธ Info: FYI only

## Output Format
For each finding:
1. File and line number
2. Severity level
3. Issue description
4. Suggested fix with code example

2. Test Generator Skill

---
name: test-generator
description: Generate comprehensive test suites with TDD methodology
allowed-tools: Read, Write, Grep, Bash
context: fork
---

# Test Generator Skill

You are a testing expert practicing TDD methodology.

## Test Types to Generate
1. **Unit Tests**: Pure function testing
2. **Integration Tests**: Component interaction
3. **Edge Cases**: Boundary conditions
4. **Error Cases**: Expected failures

## Framework Detection
- React: Jest + React Testing Library
- Node: Vitest or Jest
- Python: pytest
- Go: testing package

## Naming Convention
`test_[function_name]_[scenario]_[expected_result]`

Example:
```python
def test_validate_email_empty_string_returns_false():
    assert validate_email("") == False

Coverage Goals

  • โ†’Happy path: 100%
  • โ†’Edge cases: 80%
  • โ†’Error handling: 90%

### 3. Documentation Skill

```markdown
---
name: documentation
description: Generate comprehensive documentation for any codebase
allowed-tools: Read, Write, Grep, Glob
context: fork
---

# Documentation Skill

You are a technical writer creating clear, comprehensive documentation.

## Documentation Types
1. **README.md**: Project overview, setup, usage
2. **API Docs**: Endpoint reference with examples
3. **Code Docs**: JSDoc/docstrings
4. **Guides**: How-to tutorials

## Quality Checklist
- [ ] Clear purpose statement
- [ ] Prerequisites listed
- [ ] Step-by-step instructions
- [ ] Code examples for key features
- [ ] Troubleshooting section
- [ ] Contribution guidelines

## Style Guide
- Use active voice
- Keep sentences short
- Include code examples
- Add diagrams for complex flows
- Link to related resources

Agent Patterns

Combine skills into powerful agents for complex workflows:

Pattern 1: Sequential Pipeline

# PR Review Agent

## Steps
1. Run `code-review` skill on changed files
2. Run `security-audit` skill on changed files  
3. Run `test-generator` for new code paths
4. Compile results into PR comment format

## Configuration
```json
{
  "name": "pr-review-agent",
  "skills": ["code-review", "security-audit", "test-generator"],
  "mode": "sequential"
}

Pattern 2: Parallel Analysis

# Codebase Health Check Agent

## Parallel Skills
- Performance analyzer
- Security auditor
- Dependency checker
- Code quality scorer

## Aggregation
Combine all results into unified health report with scores.

Pattern 3: Conditional Branching

# Smart Review Agent

## Logic
IF file is `.py`:
  โ†’ Run Python-specific review
ELIF file is `.tsx`:
  โ†’ Run React + TypeScript review
ELIF file is `.sql`:
  โ†’ Run SQL security review
ELSE:
  โ†’ Run generic code review

Advanced Techniques

1. Skill Composition

Create meta-skills that combine others:

---
name: full-audit
description: Complete codebase audit combining multiple skills
allowed-tools: Task, Read, Grep
---

# Full Audit Meta-Skill

## Execution Order
1. Spawn `security-audit` task
2. Spawn `performance-review` task  
3. Spawn `accessibility-check` task
4. Await all results
5. Generate unified report

## Usage
Use the `Task` tool to spawn sub-agents:
- Each skill runs in forked context
- Results are collected and synthesized
- Final report highlights critical issues first

2. Dynamic Skill Loading

Load skills based on project type:

---
name: project-analyzer
description: Detect project type and load appropriate skills
allowed-tools: Read, Glob, Task
---

# Project Analyzer

## Detection Logic
1. Check for package.json โ†’ Load Node.js skills
2. Check for requirements.txt โ†’ Load Python skills
3. Check for go.mod โ†’ Load Go skills
4. Check for Cargo.toml โ†’ Load Rust skills

## Per-Project Skills
- Node.js: eslint-check, npm-audit, jest-runner
- Python: pylint-check, bandit-audit, pytest-runner
- Go: golint-check, gosec-audit, gotest-runner

3. Skill Chaining with State

Pass state between skills:

---
name: refactor-pipeline
description: Multi-stage refactoring with state preservation
allowed-tools: Read, Write, Edit, Task
---

# Refactor Pipeline

## Stage 1: Analysis
- Identify code smells
- Map dependencies
- Output: analysis.json

## Stage 2: Planning
- Input: analysis.json
- Generate refactor plan
- Output: plan.json

## Stage 3: Execution
- Input: plan.json
- Apply refactoring
- Run tests after each change

## Stage 4: Verification
- Run full test suite
- Compare before/after metrics
- Generate summary report

4. User Interaction Skills

Skills that prompt for user input:

---
name: interactive-setup
description: Guided project setup with user prompts
allowed-tools: Read, Write, Bash
---

# Interactive Setup Skill

## Flow
1. Detect project type
2. Ask: "Which testing framework?"
   - Options: Jest, Vitest, Mocha
3. Ask: "Include TypeScript?"
   - Options: Yes, No
4. Ask: "Add CI/CD?"
   - Options: GitHub Actions, GitLab CI, None

## Based on answers:
- Generate appropriate configuration files
- Install dependencies
- Create starter tests

Pro Tips

Do's โœ…

  1. โ†’Keep skills focused - Single responsibility
  2. โ†’Include examples - Show expected input/output
  3. โ†’Define clear outputs - Specify format expectations
  4. โ†’Version your skills - Track changes in git
  5. โ†’Test skills regularly - Validate with real use cases

Don'ts โŒ

  1. โ†’Don't hardcode paths - Use patterns and relative paths
  2. โ†’Don't grant unnecessary tools - Principle of least privilege
  3. โ†’Don't make skills too generic - Specific is better
  4. โ†’Don't skip the description - Others need to understand
  5. โ†’Don't forget edge cases - Define behavior for unusual inputs

Test Your Knowledge


Continue Learning

Now that you can create custom skills:

  1. โ†’Master Hooks - Trigger skills automatically with event hooks
  2. โ†’Explore MCP Servers - Connect skills to external services
  3. โ†’Build Workflows - Orchestrate multi-tool pipelines
GO DEEPER โ€” FREE GUIDE

Module 2 โ€” Structured Outputs

Learn to get reliable, formatted responses like JSON and tables.

D

Dorian Laurenceau

Full-Stack Developer & Learning Designer

Full-stack web developer and learning designer. I spent 4 years as a freelance full-stack developer and 4 years teaching React, JavaScript, HTML/CSS and WordPress to adult learners. Today I design learning paths in web development and AI, grounded in learning science. I founded learn-prompting.fr to make AI practical and accessible, and built the Bluff app to gamify political transparency.

Prompt EngineeringLLMsFull-Stack DevelopmentLearning DesignReact
Published: January 16, 2025Updated: April 24, 2026
Newsletter

Weekly AI Insights

Tools, techniques & news โ€” curated for AI practitioners. Free, no spam.

Free, no spam. Unsubscribe anytime.

FAQ

What are Claude Code skills?+

Skills are reusable instruction sets packaged as SKILL.md files. They teach Claude new behaviors and can be invoked with /skill-name or automatically matched based on your request.

Where do I put skill files?+

Personal skills go in ~/.claude/skills/ (available everywhere). Project skills go in .claude/skills/ (version-controlled with your project and shared with your team).

What's the difference between skills and MCP servers?+

Skills are instruction sets that guide Claude's behavior. MCP servers connect Claude to external tools and data sources. Skills tell Claude HOW to work; MCP provides WHAT to work with.

Can I share skills with my team?+

Yes, put skills in .claude/skills/ directory and commit to your repository. Your entire team will have access to the same custom capabilities.