Master Claude Code in a Week (Part 10): Plugins & Advanced Features

· 5 min read

This is the final part of the "Master Claude Code in a Week" series. In this article, we'll explore Plugins and Advanced Features of Claude Code.

What are Plugins?

Plugins are bundled packages of all features we've learned: CLAUDE.md, Memory, Hooks, MCP, and Subagents combined into shareable packages for teams or communities.

┌────────────────────────────────────────────────────────────────┐
│                    PLUGIN ARCHITECTURE                          │
├────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌──────────── Plugin Package ────────────┐                   │
│  │                                        │                    │
│  │  ┌─────────────────────────────────┐  │                    │
│  │  │         CLAUDE.md               │  │  Instructions     │
│  │  │    (Project Instructions)       │  │                    │
│  │  └─────────────────────────────────┘  │                    │
│  │                                        │                    │
│  │  ┌─────────────────────────────────┐  │                    │
│  │  │         Memory/                 │  │  Context          │
│  │  │    (Project Memories)           │  │                    │
│  │  └─────────────────────────────────┘  │                    │
│  │                                        │                    │
│  │  ┌─────────────────────────────────┐  │                    │
│  │  │         Hooks/                  │  │  Automation       │
│  │  │    (Event Handlers)             │  │                    │
│  │  └─────────────────────────────────┘  │                    │
│  │                                        │                    │
│  │  ┌─────────────────────────────────┐  │                    │
│  │  │         Agents/                 │  │  Specialization   │
│  │  │    (Subagents)                  │  │                    │
│  │  └─────────────────────────────────┘  │                    │
│  │                                        │                    │
│  │  ┌─────────────────────────────────┐  │                    │
│  │  │      settings.json              │  │  MCP Config       │
│  │  │    (MCP Servers)                │  │                    │
│  │  └─────────────────────────────────┘  │                    │
│  │                                        │                    │
│  └────────────────────────────────────────┘                   │
│                                                                 │
└────────────────────────────────────────────────────────────────┘

Creating a Plugin

Structure

my-plugin/
├── README.md              # Documentation
├── install.sh             # Installation script
├── CLAUDE.md              # Instructions template
├── memory/
│   ├── patterns.md
│   └── decisions.md
├── hooks/
│   ├── pre-commit.sh
│   └── post-edit.py
├── agents/
│   ├── code-reviewer.md
│   └── test-engineer.md
└── mcp/
    └── settings.json      # MCP configuration

Example: Laravel Plugin

install.sh:

#!/bin/bash

# Laravel Plugin Installation
echo "Installing Laravel Plugin for Claude Code..."

# Create directories
mkdir -p .claude/{memory,hooks,agents}

# Copy CLAUDE.md
cp templates/CLAUDE.md ./CLAUDE.md

# Copy memory files
cp memory/*.md .claude/memory/

# Copy hooks
cp hooks/*.sh .claude/hooks/
chmod +x .claude/hooks/*.sh

# Copy agents
cp agents/*.md .claude/agents/

# Add MCP configuration
if [ -f ~/.claude/settings.json ]; then
    echo "Merging MCP configuration..."
    # Merge logic here
fi

echo "Done! Plugin installed."

Installation

# Clone plugin repository
git clone https://github.com/example/laravel-claude-plugin

# Run installation
cd laravel-claude-plugin
./install.sh

Advanced Features

1. Planning Mode

Planning Mode is for complex tasks that need step-by-step planning.

Enable with:

/plan enable

Or use the CLI:

claude -p "Refactor this authentication system"

Workflow:

┌─────────────────────────────────────────────────────────────────┐
│                    PLANNING MODE                                 │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  1. Analyze → Claude analyzes the task's requirements           │
│                                                                  │
│  2. Plan    → Claude creates a detailed execution plan          │
│                                                                  │
│  3. Review  → You review and approve/modify the plan            │
│                                                                  │
│  4. Execute → Claude executes step by step                      │
│                                                                  │
│  5. Report  → Summary of completed work                         │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Use Cases:

  • Major refactoring
  • New feature implementation
  • Complex debugging
  • System architecture changes

2. Extended Thinking

Extended Thinking gives Claude more "thinking time" for complex problems.

Enable:

/config set thinking_mode extended

Or add to CLAUDE.md:

## Claude Settings

- Use extended thinking for complex analysis
- Don't rush to conclusions

When to Use:

  • Complex debugging
  • Performance analysis
  • Architecture design

3. Background Tasks

Background Tasks let Claude continue working without blocking the terminal.

# Start a long task
/background "Analyze all API endpoints and document them"

# View progress
/background status

# List running tasks
/background list

Ideal for:

  • Documentation generation
  • Code analysis
  • Large refactoring

4. Permission Modes

Claude Code operates in different permission modes:

┌───────────────────────────────────────────────────────────────┐
│                   PERMISSION MODES                             │
├───────────────────────────────────────────────────────────────┤
│                                                                │
│  Supervised Mode (Default)                                     │
│  ├── Ask before major file changes                            │
│  ├── Confirm before running commands                          │
│  └── Safe for normal development                              │
│                                                                │
│  Auto-Edit Mode                                                │
│  ├── Automatic file edits within project                      │
│  ├── Still asks for command execution                         │
│  └── Good for well-defined tasks                              │
│                                                                │
│  YOLO Mode (Full Auto)                                         │
│  ├── No confirmations needed                                  │
│  ├── Claude executes freely                                   │
│  └── Use with caution! Only for trusted tasks                │
│                                                                │
└───────────────────────────────────────────────────────────────┘

Configure:

# Terminal
/permissions supervised  # Default
/permissions auto-edit   # Auto-edit files
/permissions yolo        # Full automatic

# Or in settings
claude config set --global permission_mode auto-edit

5. Session Management

View Session:

/session info

Export Session:

# Export for sharing later
/session export my-session.json

Resume Session:

# Resume from file
claude --resume my-session.json

6. Headless Mode

Run Claude without interactive terminal:

# Execute single task
claude -p "Update all tests to match new API" --output-format json

# Read from stdin
cat task.md | claude --stdin

Useful for:

  • CI/CD pipelines
  • Batch processing
  • Automation scripts

7. Git Integration

Claude Code has deep Git integration:

# Review current changes
/git diff

# Create commit with auto-generated message
/git commit

# Analyze PR
/git pr-review

Auto-commit on task completion:

Add to CLAUDE.md:

## Git Workflow

After completion:
1. Run tests
2. If all pass, create commit
3. Use conventional commit message format

Combining All Features

Example workflow combining all learned features:

┌────────────────────────────────────────────────────────────────┐
│              COMPLETE DEVELOPMENT WORKFLOW                      │
├────────────────────────────────────────────────────────────────┤
│                                                                 │
│  1. PLANNING                                                   │
│     └── Enable Planning Mode for complex task                  │
│                                                                 │
│  2. CONTEXT                                                    │
│     ├── Load CLAUDE.md (project rules)                         │
│     └── Load Memory (past decisions)                           │
│                                                                 │
│  3. DATA                                                       │
│     ├── MCP GitHub: fetch issues/PRs                          │
│     └── MCP Database: query schemas                           │
│                                                                 │
│  4. IMPLEMENT                                                  │
│     ├── Main agent coordinates                                 │
│     ├── Delegate to @test-engineer                            │
│     └── Delegate to @code-reviewer                            │
│                                                                 │
│  5. QUALITY                                                    │
│     ├── Hook: pre-commit checks                               │
│     ├── Run tests automatically                               │
│     └── Security scan                                         │
│                                                                 │
│  6. CHECKPOINT                                                 │
│     └── Create checkpoint before merge                        │
│                                                                 │
│  7. COMPLETE                                                   │
│     ├── Save to memory                                        │
│     └── Auto-commit changes                                   │
│                                                                 │
└────────────────────────────────────────────────────────────────┘

Summary: Complete Learning Path

We've covered Claude Code's complete feature set:

Part Topic What You Learned
1 Introduction Overview & installation
2 Slash Commands Quick actions
3 Memory Context persistence
4 Checkpoints Save/restore work
5 CLI Command-line power
6 Skills Reusable templates
7 Hooks Event automation
8 MCP External tool integration
9 Subagents Specialized assistants
10 Plugins Feature bundles
Week 1: Days 1-2
└── Basic usage, Slash Commands

Week 1: Days 3-4
└── Memory, Checkpoints, CLI

Week 1: Days 5-7
└── Skills, Hooks, MCP

Week 2:
└── Subagents, Plugins, Advanced workflows

Ongoing:
└── Customize for your team
└── Create and share plugins
└── Contribute to claude-howto

Resources

Conclusion

Claude Code is a powerful tool that combines AI capabilities with practical developer workflows. The key is:

  1. Start simple - Use basic commands first
  2. Add gradually - Introduce Memory, then Hooks, etc.
  3. Customize - Adapt to your project's needs
  4. Share - Create plugins for your team

Thank you for following this series! Happy coding with Claude! 🚀


This series is translated and expanded from claude-howto — MIT License.

Comments