Claude
Skills
Sign in
Back

claude-code

Included with Lifetime
$97 forever

# Claude Code Expert Skill

AI Agents

What this skill does

# Claude Code Expert Skill

This skill provides comprehensive guidance on using Claude Code, Anthropic's agentic coding tool.

## When to Use This Skill

Use this skill when users need help with:
- Understanding Claude Code features and capabilities
- Setting up and configuring Claude Code
- Working with slash commands, hooks, and plugins
- Using MCP servers and Agent Skills
- Troubleshooting Claude Code issues
- Understanding best practices for Claude Code usage
- Deploying Claude Code in enterprise environments
- Using Claude Code with IDEs (VS Code, JetBrains)

## Core Concepts

### What is Claude Code?

Claude Code is Anthropic's agentic coding tool that lives in your terminal and helps you turn ideas into code faster. Key features include:

- **Agentic Capabilities**: Claude autonomously plans, executes, and validates tasks
- **Terminal Integration**: Works directly in your command line
- **IDE Support**: Extensions for VS Code and JetBrains IDEs
- **Extensibility**: Plugins, skills, slash commands, and MCP servers
- **Enterprise Ready**: SSO, sandboxing, monitoring, and compliance features

### Architecture Components

1. **Subagents**: Specialized AI agents for specific tasks
   - `planner`: Research and create implementation plans
   - `code-reviewer`: Review code quality and security
   - `tester`: Run tests and validate implementations
   - `debugger`: Investigate and diagnose issues
   - `docs-manager`: Manage technical documentation
   - `ui-ux-designer`: Design and implement UI/UX
   - `database-admin`: Database optimization and management
   - And many more specialized agents

2. **Agent Skills**: Modular capabilities that extend functionality
   - Package instructions, metadata, and resources
   - Automatically discovered and used by Claude
   - Shareable across projects and teams

3. **Slash Commands**: User-defined operations that expand to prompts
   - Located in `.claude/commands/`
   - Execute with `/command-name`
   - Can accept arguments

4. **Hooks**: Shell commands that execute in response to events
   - Pre/post tool execution hooks
   - User prompt submit hooks
   - Customizable validation and automation

5. **MCP Servers**: Model Context Protocol integrations
   - Connect external tools and services
   - Provide resources, tools, and prompts
   - Remote and local server support

## Installation & Setup

### Prerequisites
- macOS, Linux, or Windows (WSL2)
- Node.js 18+ or Python 3.10+
- API key from Anthropic Console

### Installation
```bash
# Install via npm (recommended)
npm install -g @anthropic-ai/claude-code

# Or via pip
pip install claude-code
```

### Authentication
```bash
# Login with API key
claude login

# Or set environment variable
export ANTHROPIC_API_KEY=your_api_key
```

### First Run
```bash
# Start interactive session
claude

# Run with specific task
claude "implement user authentication"

# Use in specific directory
cd /path/to/project
claude
```

## Common Workflows

### 1. Feature Implementation
```bash
# Use the cook command for feature work
/cook implement user authentication with JWT

# Or start with planning
/plan implement payment integration with Stripe
```

### 2. Bug Fixing
```bash
# Quick fixes
/fix:fast the login button is not working

# Complex debugging
/debug the API returns 500 errors intermittently

# Fix type errors
/fix:types
```

### 3. Code Review & Testing
```bash
# Review recent changes
claude "review my latest commit"

# Run tests
/test

# Fix test failures
/fix:test the user service tests are failing
```

### 4. Documentation
```bash
# Create initial documentation
/docs:init

# Update existing docs
/docs:update

# Summarize changes
/docs:summarize
```

### 5. Git Operations
```bash
# Commit changes
/git:cm

# Commit and push
/git:cp

# Create pull request
/git:pr feature-branch main
```

## Slash Commands Reference

### Development Commands
- `/cook [task]`: Implement features
- `/plan [task]`: Research and create implementation plans
- `/debug [issue]`: Debug technical issues
- `/test`: Run test suite
- `/refactor`: Improve code quality

### Fix Commands
- `/fix:fast [issue]`: Quick fixes
- `/fix:hard [issue]`: Complex issues with planning
- `/fix:types`: Fix TypeScript errors
- `/fix:test [issue]`: Fix test failures
- `/fix:ui [issue]`: Fix UI issues
- `/fix:ci [url]`: Fix CI/CD issues
- `/fix:logs [issue]`: Analyze logs and fix

### Documentation Commands
- `/docs:init`: Create initial documentation
- `/docs:update`: Update existing documentation
- `/docs:summarize`: Summarize codebase

### Git Commands
- `/git:cm`: Stage and commit
- `/git:cp`: Stage, commit, and push
- `/git:pr [branch] [base]`: Create pull request

### Planning Commands
- `/plan:two [task]`: Create plan with 2 approaches
- `/plan:ci [url]`: Plan CI/CD fixes
- `/plan:cro [issue]`: Create CRO optimization plan

### Content Commands
- `/content:fast [request]`: Quick copy writing
- `/content:good [request]`: High-quality copy
- `/content:enhance [issue]`: Enhance existing content
- `/content:cro [issue]`: Conversion rate optimization

### Design Commands
- `/design:fast [task]`: Quick design
- `/design:good [task]`: High-quality design
- `/design:3d [task]`: 3D designs with Three.js
- `/design:screenshot [path]`: Design from screenshot
- `/design:video [path]`: Design from video

### Deployment Commands
- `/deploy`: Deploy using `dx up`
- `/deploy-check`: Check deployment readiness

### Other Commands
- `/brainstorm [question]`: Brainstorm features
- `/ask [question]`: Answer technical questions
- `/scout [prompt]`: Scout directories
- `/watzup`: Review recent changes
- `/bootstrap [requirements]`: Bootstrap new project
- `/journal`: Write journal entries

## Agent Skills

### Creating Skills

Skills are located in `.claude/skills/` and consist of:

1. **skill.md**: Main skill instructions
2. **skill.json**: Metadata and configuration

Example skill.json:
```json
{
  "name": "my-skill",
  "description": "Brief description of when to use this skill",
  "version": "1.0.0",
  "author": "Your Name"
}
```

Example skill.md structure:
```markdown
# Skill Name

Description of what this skill does.

## When to Use This Skill

Specific scenarios when Claude should activate this skill.

## Instructions

Step-by-step instructions for Claude to follow.

## Examples

Concrete examples of skill usage.
```

### Best Practices for Skills

1. **Clear Activation Criteria**: Define exactly when the skill should be used
2. **Concise Instructions**: Focus on essential information
3. **Actionable Guidance**: Provide clear steps Claude can follow
4. **Examples**: Include concrete examples of expected inputs/outputs
5. **Scope Limitation**: Keep skills focused on specific domains

### Using Skills via API

Skills can be used with the Claude API:

```typescript
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });

const response = await client.messages.create({
  model: 'claude-sonnet-4-5-20250929',
  max_tokens: 4096,
  skills: [
    {
      type: 'custom',
      custom: {
        name: 'document-creator',
        description: 'Creates professional documents',
        instructions: 'Follow corporate style guide...'
      }
    }
  ],
  messages: [{ role: 'user', content: 'Create a project proposal' }]
});
```

## MCP Server Integration

### What is MCP?

Model Context Protocol (MCP) allows Claude Code to connect to external tools and services.

### Configuration

MCP servers are configured in `.claude/mcp.json`:

```json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "your_github_token"
      }
    }
  }
}
```

### Common MCP Servers

- **@modelcontextprotocol/server-filesystem**: File system access
- **@modelcontextpro
Files: 3
Size: 48.8 KB
Complexity: 34/100
Category: AI Agents

Related in AI Agents