The ultimate all-in-one guide to mastering Claude Code. From setup, prompt engineering, commands, hooks, workflows, automation, and integrations, to MCP servers, tools, and the BMAD method—packed with step-by-step tutorials, real-world examples, and expert strategies to make this the global go-to repo for Claude mastery.
⚠️ IMPORTANT NOTE
To get the best visualization for the documents in this repo, please install Obsidian.
Fundamentals:
Core Features:
worktrees to structure intelligence with precision.2026 Updates:
/fast)/fast, /auth, /debug, /teleport, /rename, /hooksAdvanced Topics:
LLM (Large Language Model):
Products built with LLMs: These are the applications and tools that use LLMs to provide specific services:
Claude Code:
ChatGPT:
Google Bard/Gemini:
Analogy:
Claude Code is a command-line tool that lets developers work with Claude directly from their terminal or command prompt. Think of it as having an AI coding assistant that lives right in your development environment.
Here's what makes it useful in simple terms:
What it does:
Why developers like it:
Example use cases:
Claude Opus 4.6 is the most capable model in the Claude family (as of February 2026), offering advanced reasoning and coding capabilities.
| Feature | Specification |
|---|---|
| Model ID | claude-opus-4-6 |
| Context Window | 200K tokens (1M beta via API) |
| Max Output | 128K tokens |
| Availability | Pro, Max, and API plans |
| Fast Mode | ✅ Yes (2.5x faster, 6x pricing) |
1. Extended Context Window
2. Adaptive Thinking
3. Agent Teams (Experimental)
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=14. Top Performance
✅ Best For:
💡 Consider Sonnet 4.5 or Haiku 4.5 for:
Subscription Plans:
API Pricing:
📖 Claude Initialization Run the
/initcommand to automatically generate aCLAUDE.mdfile. YourCLAUDE.mdfiles become part of Claude's prompts, so they should be refined like any frequently used prompt. A common mistake is adding extensive content without iterating on its effectiveness. Take time to experiment and determine what produces the best instruction following from the model.
Versatile workflow for complex problems.
"think", "think hard", "think harder", or "ultrathink" to increase computation time. Optionally save plan for future reference.Plan Mode and Accept Edits Mode. You can toggle between them using the Shift + Tab keys.


⚠️ Warning: Research & planning first improves performance for complex tasks.
Ideal for changes verifiable with unit/integration tests.
🔹 Clear targets (tests, mocks) improve iteration efficiency.
🔹 Iteration significantly improves output quality (2-3 rounds usually enough).
| Command | Purpose |
|---|---|
/add-dir | Add additional working directories |
/agents | Manage custom AI subagents for specialized tasks |
/auth login | Authenticate with your Anthropic account (new Feb 2026) |
/auth status | Check authentication status (new Feb 2026) |
/auth logout | Sign out from your account (new Feb 2026) |
/bug | Report bugs (sends conversation to Anthropic) |
/clear | Clear conversation history |
/compact [instructions] | Compact conversation with optional focus instructions |
/config | View/modify configuration |
/cost | Show token usage statistics |
/debug | Troubleshoot current session and configuration (new Feb 2026) |
/doctor | Checks the health of your Claude Code installation |
/fast | Toggle Fast Mode for 2.5x faster Opus 4.6 responses (6x pricing) (new Feb 2026) |
/help | Get usage help |
/hooks | Interactive menu for hook configuration (new Feb 2026) |
/init | Initialize project with CLAUDE.md guide |
/login | Switch Anthropic accounts (use /auth login instead) |
/logout | Sign out from your Anthropic account (use /auth logout instead) |
/mcp | Manage MCP server connections and OAuth authentication |
/memory | Edit CLAUDE.md memory files |
/model | Select or change the AI model (Opus 4.6, Sonnet 4.5, Haiku 4.5) |
/permissions | View or update permissions |
/pr_comments | View pull request comments |
/rename | Auto-generate descriptive session names (new Feb 2026) |
/review | Request code review |
/status | View account and system statuses |
/teleport | Send current session to claude.ai/code for web access (new Feb 2026) |
/terminal-setup | Install Shift+Enter key binding for newlines (built-in since 2026, zero setup needed) |
/vim | Enter vim mode for alternating insert and command modes |
📖 Note: Custom slash commands allow you to define frequently-used prompts as Markdown files that Claude Code can execute. Commands are organized by scope (project-specific or personal) and support namespacing through directory structures.
mkdir -p .claude/commands
echo "Analyze this code for performance issues and suggest optimizations:" > .claude/commands/optimize.md
Example
pull-request.md in .claude/commands# Create Pull Request Command
Create a new branch, commit changes, and submit a pull request.
## Behavior
- Creates a new branch based on current changes
- Formats modified files using Biome
- Analyzes changes and automatically splits into logical commits when appropriate
- Each commit focuses on a single logical change or feature
- Creates descriptive commit messages for each logical unit
- Pushes branch to remote
- Creates pull request with proper summary and test plan
## Guidelines for Automatic Commit Splitting
- Split commits by feature, component, or concern
- Keep related file changes together in the same commit
- Separate refactoring from feature additions
- Ensure each commit can be understood independently
- Multiple unrelated changes should be split into separate commits
💡 Next Level: This is a basic custom slash command. For more sophisticated workflows, check out Claude Skills to learn how to build reusable, team-wide skills with advanced patterns.
📖 Extensibility Layer: Claude Skills transform complex, multi-step workflows into reusable slash commands. Think of them as "macros for AI" — instead of repeating the same detailed instructions, encapsulate them once and invoke them with a simple
/skill-namecommand.
⚠️ IMPORTANT TERMINOLOGY: "Skills" and "custom slash commands" are the same thing. This documentation uses "skills" as the primary term, but you may see both used interchangeably. They both refer to markdown files in
.claude/commands/that you invoke with/skill-name.
🚨 SECURITY WARNING: Skills execute with full access to your codebase and can run arbitrary commands. Only use skills from trusted sources. Review all third-party skills before adding them to your project. Skills from untrusted repositories can access files, execute commands, and potentially compromise your system.

Want to try skills immediately? Here's the fastest path:
# 1. Create the skills directory
mkdir -p .claude/commands
# 2. Create a simple skill file
cat > .claude/commands/analyze.md << 'EOF'
# Code Analysis
Analyze the current code for:
- Potential bugs and edge cases
- Performance optimizations
- Code quality improvements
- Security vulnerabilities
Provide specific, actionable recommendations.
EOF
# 3. Start Claude Code (if not already running)
claude
# 4. Use your new skill
# Type: /analyze
That's it! You now have a working skill. Continue reading to learn how to create more sophisticated workflows.
Claude Skills (also called "custom slash commands") are markdown files stored in .claude/commands/ that contain structured instructions for Claude Code to execute. When you type /skill-name, Claude loads the corresponding markdown file and applies its instructions to your current context.
Key Characteristics:
📖 Quick Links: Built-in vs Custom Skills | Creating Skills | Troubleshooting | FAQ
Skills vs Regular Prompts:
📱 Mobile Users: View this comparison in landscape mode or on desktop for best readability.
| Aspect | Regular Prompts | Claude Skills |
|---|---|---|
| Definition | Ad-hoc instructions typed each time | Reusable markdown files in .claude/commands/ |
| Reusability | Manual copy-paste required | Instant invocation with /skill-name |
| Complexity | Limited by chat input | Multi-step workflows with detailed checklists |
| Sharing | Share via text/screenshots | Share via files in version control |
| Evolution | Lost after session ends | Iteratively improved and committed to repo |
| Discoverability | None | Auto-listed in Claude Code's skill registry |
💡 Accessing the Skill Registry: Skills are discovered automatically when you start Claude Code. To see available skills, start typing
/in Claude Code and you'll see an autocomplete list of all available skills (both built-in and custom). You can also use/helpto view all commands, which includes skills.
Built-in Skills (shipped with Claude Code):
| Skill | Purpose | Invocation |
|---|---|---|
keybindings-help | Customize keyboard shortcuts and modify ~/.claude/keybindings.json | /keybindings-help |
mermaid | Create entity relationship diagrams and flowcharts | /mermaid |
Custom Skills (in this repository's .claude/commands/):
Quick Reference:
| Skill | Category + Complexity |
|---|---|
/pr | Workflow (High) |
/review | Quality (High) |
/test | Quality (Medium) |
/tdd | Workflow (High) |
/five | Persona (Low) |
/ux | Persona (Medium) |
/todo | Task (Low) |
Detailed Purpose:
| Skill | What It Does |
|---|---|
/pr | Automated pull request creation with branch management and commit splitting |
/review | Multi-perspective code review (PM, Dev, QA, Security, DevOps, UX) |
/test | Unit testing best practices checklist for LLM-driven test generation |
/tdd | Complete test-driven development workflow with Red-Green-Refactor cycle |
/five | Five Whys root cause analysis for debugging and problem-solving |
/ux | User experience designer persona for empathetic, user-centric design |
/todo | Task management in todos.md with due dates and completion tracking |
💡 Pro Tip: Start with simple skills (like
/fiveor/todo) to understand the pattern, then progress to complex workflows (like/tddor/review).
🔹 Workflow & Process
/pr - Pull Request Creation
/tdd - Test-Driven Development
notes/features/ for long-term memory🔹 Quality & Review
/review - Multi-Perspective Code Review
Six-role review framework:
/test - Unit Testing Best Practices
🔹 Persona & Methodology
/five - Five Whys Root Cause Analysis
/ux - User Experience Designer Persona
Claude becomes an empathetic UX specialist:
🔹 Task Management
/todo - Project Task Manager
todos.md in project root with Active/Completed sectionsadd, complete, remove, undo, list, past due, next/mermaid - Diagram Generation
Basic Invocation:
# In Claude Code CLI
/skill-name
# With arguments (for skills that accept them)
/todo add "Fix navigation bug"
/review https://github.com/user/repo/pull/123
Workflow Prerequisites:
Before using these workflow combinations, ensure you have:
git init)git remote -v shows your repo)/review and /pr skills).claude/commands/ or ~/.claude/commands/Workflow Execution Notes:
/skill-name command manually/help to verify skill availability before running workflowsExample Workflow Combinations:
1. Complete Feature Development
# Start with TDD workflow
/tdd
# Claude guides through Red-Green-Refactor cycle
# Ensure tests pass
/test
# Validates test coverage and quality
# Create PR with automatic commit splitting
/pr
# Creates branch, commits, and opens PR
# Conduct comprehensive review (optional - creates PR comment)
/review
Common Issues:
/tdd fails: Ensure tests are properly written; review test syntax/test reports failures: Fix failing tests before proceeding to /pr/pr merge conflicts: Resolve conflicts manually, then retry/review auth failure: Run gh auth login to configure GitHub CLI/pr assumes Biome formatter; install or modify skill2. Bug Investigation & Resolution
# Identify root cause
/five
# Five Whys analysis to find systemic issues
# Implement fix using TDD
/tdd
# Write failing test, implement fix, refactor
# Verify with unit tests
/test
# Ensure all tests pass
# Submit PR
/pr
# Create and push PR
Common Issues:
/five identifies unfixable issue: Root cause may require architecture changes/tdd tests pass but bug persists: Review test coverage; bug may be in untested code3. UX-Focused Development
# Start with user-centric design
/ux
# Claude adopts UX designer persona
# Implement with tests
/test
# Build with test coverage
# Review for accessibility and usability
/review
# Multi-perspective review including UX
Common Issues:
/ux suggestions conflict with brand: Provide brand guidelines as context/review finds accessibility violations: Address WCAG issues before mergeWorkflow FAQs:
Q: How long do skill workflows typically take?
/tdd: 5-15 minutes depending on implementation sizeQ: Can I cancel a running skill midway?
Ctrl+C to interrupt Claude Code executiongit statusQ: What if a skill modifies files I didn't expect?
git diff before committinggit checkout -- <file> to revert unwanted changesQ: Can I run skills in parallel?
💡 Workflow Tips:
- Chain skills sequentially - Skills execute one at a time; wait for completion before invoking the next
- Combine with hooks for automatic skill invocation on events (see Hooks section)
- Use
/todoat session start to maintain context across interruptions- Run
/reviewon your own PRs before requesting human review (note: posts as a PR comment from your account)- Skills don't auto-chain - Each
/skillmust be invoked manually; they don't automatically call other skills
Q: What's the difference between "skills" and "custom slash commands"?
A: They're the same thing. This documentation uses "skills" as the primary term, but both refer to markdown files in .claude/commands/ that you invoke with /skill-name. You may see both terms used interchangeably.
Q: Are skills safe to use from third-party repositories?
A: Treat skills like executable code - review them before running. Skills can:
Always review .claude/commands/ files from cloned repositories before invoking skills.
Q: How do I know if a skill is working correctly?
A:
/ and your skill name should appearclaude --debug to see detailed execution logsQ: Can I modify built-in skills?
A: No. Built-in skills (/keybindings-help, /mermaid) are shipped with Claude Code and cannot be modified. You can create your own custom skills with similar names (e.g., /my-mermaid) for custom behavior.
Q: How do I share skills with my team?
A:
.claude/commands/ (project directory)git add .claude/commands/Q: Do skills work offline?
A: Yes. Skills are local markdown files read by Claude Code. No network connection is required to invoke skills, though the AI model execution requires internet access.
Q: What happens if I have two skills with the same name?
A: Project skills (.claude/commands/) take precedence over global skills (~/.claude/commands/). The project-level skill will execute.
Q: Can skills accept arguments?
A: Yes. Type arguments after the skill name:
/todo add "Fix navigation bug"
/review https://github.com/user/repo/pull/123
Claude automatically sees your arguments as context - no special syntax needed.
🚨 SECURITY NOTE: When creating global skills (
~/.claude/commands/), remember they will execute in ALL your projects. Only add skills you trust completely. For team projects, use project-specific skills (.claude/commands/) and commit them to version control for team review.
💡 New to Skills? Review What Are Claude Skills and Available Skills Reference before creating your first skill.
File Format:
.md (markdown files only)my-skill.md → /my-skill)File System:
.claude/commands/ can contain symlinks to skill files).claude/commands/ (project) or ~/.claude/commands/ (global)Execution Context:
Step-by-step guide to building your first skill:
1. Create the skill file
# Project-specific skill (recommended for team projects)
# The .claude/commands/ directory will be created automatically if it doesn't exist
mkdir -p .claude/commands
touch .claude/commands/my-skill.md
# Global skill (available in all projects - use with caution)
mkdir -p ~/.claude/commands
touch ~/.claude/commands/my-skill.md
💡 Tip: Always use project-specific skills (
.claude/commands/) for team workflows to ensure team members can review changes through version control.
2. Define the skill structure
Skills use markdown with structured sections:
# Skill Name
Brief description of what this skill does.
## Behavior
- Bullet list of what Claude should do
- Specific actions to take
- Expected outcomes
## Guidelines (optional)
- Best practices to follow
- Constraints or requirements
- Formatting rules
## Examples (optional)
### Example 1: Use case description
[Show example input/output or workflow]
3. Example: Simple Skill (Complete File)
Complete contents of .claude/commands/five.md:
# Five Whys Analysis
Apply the Five Whys root cause analysis technique to investigate issues.
## Steps
1. Start with the problem statement
2. Ask "Why did this happen?" and document the answer
3. For each answer, ask "Why?" again
4. Continue for at least 5 iterations or until root cause is found
5. Validate the root cause by working backwards
6. Propose solutions that address the root cause
## Notes
- Don't stop at symptoms; keep digging for systemic issues
- Multiple root causes may exist - explore different branches
💡 Tip: This is a complete, working skill file. Copy this exactly to
.claude/commands/five.mdto use it immediately.
4. Example: Complex Skill (Complete File)
Complete contents of .claude/commands/pr.md:
# Create Pull Request Command
Create a new branch, commit changes, and submit a pull request.
## Behavior
- Creates a new branch based on current changes
- Formats modified files using Biome
- Analyzes changes and automatically splits into logical commits when appropriate
- Each commit focuses on a single logical change or feature
- Creates descriptive commit messages for each logical unit
- Pushes branch to remote
- Creates pull request with proper summary and test plan
## Guidelines for Automatic Commit Splitting
- Split commits by feature, component, or concern
- Keep related file changes together in the same commit
- Separate refactoring from feature additions
- Ensure each commit can be understood independently
- Multiple unrelated changes should be split into separate commits
💡 Tip: This is a complete, working skill file. Copy this exactly to
.claude/commands/pr.mdto use it immediately.
5. Skill Scope: Project vs Global
| Location | Scope | Use Case |
|---|---|---|
.claude/commands/ | Project-specific | Team workflows, project conventions, domain-specific tasks |
~/.claude/commands/ | Global (all projects) | Personal preferences, universal patterns, cross-project utilities |
6. Test your skill
# Start Claude Code in your project
claude
# Invoke your skill
/my-skill
# Observe Claude's behavior and iterate on the skill file
💡 Creation Tips:
- Start simple — A 10-line skill is better than none
- Be specific — Vague instructions yield vague results
- Use examples — Show Claude what good output looks like
- Iterate — Skills improve with use; refine based on results
- Version control — Commit skills to
.claude/commands/for team sharing
💡 Still stuck? Check the Skills FAQ for common questions or review Skills Best Practices.
Common Issues:
1. /skill-name not recognized
.claude/commands/skill-name.md2. Skill not executing
chmod +r .claude/commands/skill-name.md3. Wrong skill executes
.claude/commands/) take precedence over global (~/.claude/commands/)4. Skill content ignored
5. Unexpected behavior
6. Changes not reflected
Debugging Tips:
ls -la .claude/commands/ to verify files existclaude --debug to see detailed execution logsError Messages:
Version Requirements:
Edge Cases and Special Scenarios:
| Scenario | Behavior | Notes |
|---|---|---|
| File without .md extension | Not recognized as skill | Only .md files are loaded as skills |
| Symlinked skill files | ✅ Supported | .claude/commands/ can contain symlinks |
| Skill in non-git directory | ✅ Works normally | Skills don't require git |
| Running skills offline | ✅ Fully supported | Skills are local files, no network needed |
| CRLF line endings (Windows) | ✅ Supported | Both Unix (LF) and Windows (CRLF) work |
| UTF-16 encoded file | ❌ May fail | Use UTF-8 encoding for compatibility |
| Skill file > 100KB | ⚠️ Performance impact | Keep skills focused; split large workflows |
| Circular skill references | ⚠️ User must break loop | Skills don't auto-execute; user types each command |
✅ Do:
create-api-endpoint.md, not command.mdPassing Arguments to Skills:
# Single argument
/todo add "Fix navigation bug"
# Multiple words (use quotes)
/review https://github.com/user/repo/pull/123
# URL or file path
/analyze src/components/Button.tsx
Accessing Arguments in Skills: Arguments are automatically available to Claude as context. In your skill file, reference them naturally:
# Code Review Skill
Analyze the code at the provided file path or URL.
## Steps
1. Read the provided argument (file path or URL)
2. Perform code review...
Note: There is no special $ARGUMENTS variable syntax - Claude automatically sees the text you type after /skill-name as part of the request context.
.claude/commands/ and document in README/test after implementation")❌ Don't:
/helpAdvanced Patterns:
Skill Composition — Reference other skills within a skill:
## Workflow
1. Run `/five` to identify root cause
2. Create feature branch
3. Implement fix using `/tdd`
4. Submit with `/pr`
⚠️ Circular Reference Prevention: Skills can reference other skills in their workflows, but be cautious:
/skill-name must be invoked manually; skills don't auto-execute other skills/test", Claude sees this as an instruction, not automatic executionConditional Logic — Guide Claude's decision-making:
## Behavior
- If tests exist: Run tests first
- If no tests: Create tests following `/test` guidelines
- If tests fail: Fix code, do not modify tests
Subagent Coordination — Delegate complex tasks:
## Implementation
1. Spawn 4 subagents (Task tool) for parallel work:
- Agent 1: Generate test cases
- Agent 2: Implement core logic
- Agent 3: Create documentation
- Agent 4: Review security implications
2. Integrate results into cohesive implementation
Performance Considerations:
| Complexity | Token Usage | Response Time | Best For |
|---|---|---|---|
| Simple (5-20 lines) | Lower token usage | Faster response | Single-step tasks, checklists |
| Medium (20-100 lines) | Moderate token usage | Moderate response | Multi-step workflows, personas |
| Complex (100+ lines) | Higher token usage | Slower response | Comprehensive reviews, TDD cycles |
Note: Actual performance varies based on skill content, model selection, server load, and network conditions. Token counts and response times are approximate guidelines only.
🎯 Optimization Tips:
- Use subagents for parallelizable work within complex skills
- Split mega-skills into smaller, composable units
- Cache common patterns as skills instead of re-prompting
- Use Fast Mode (see Fast Mode section) when running skill-heavy workflows for 2.5x faster responses
Fast Mode delivers 2.5x faster responses using Claude Opus 4.6, ideal for rapid iteration and time-sensitive development work.
/fast commandFast Mode uses 6x standard pricing:
| Mode | Input (per MTok) | Output (per MTok) |
|---|---|---|
| Standard Opus 4.6 | $5 | $25 |
| Fast Mode Opus 4.6 | $30 | $150 |
✅ Best For:
❌ Skip For:
# Enable Fast Mode for rapid iteration
/fast
# Your prompts now process 2.5x faster
> Fix the authentication bug in login.ts
# Disable when you're done with urgent work
/fast
/cost to track Fast Mode usage📖 Git Worktree: Worktrees allow multiple copies of the same Git repository on your local environment, each on a different branch.
mainfeature-xCreate worktrees
git worktree add -b feature-a ../feature-a
Launch Claude in each worktree
cd ../feature-a && claude
General Agents
📖 Agent System: Claude Code's agent system — a powerful feature that lets you create specialized AI assistants for different coding tasks. Think of agents as specialized team members, each with their own expertise, tools, and focus area. Instead of having one general-purpose Claude handle everything, you can create focused agents for specific roles.
Example: Each agent can span multiple sub-agents to accelerate the process:
- Analyze the implementation of the payment feature
- Span 5 subagents to accelerate work
- Ultrathink

Subagents executing multiple tasks in parallel, coordinated through a to-do list:

Specialized Agents
Traditional approach:
Agent approach:
Let's do it, step by step
General Agent orchestrate collaboration between Specialized Agents
Get the **backend-engineer** to suggest changes for improving the UI of our app. Then, get the **backend-engineer** to implement those changes. Then, get the **code-reviewer** to review the changes made by the **backend-engineer**. Finally, get the **backend-engineer** to fix up any issues pointed out by the reviewer.
💡 Tip:
- Use consistent naming conventions for worktrees
- Maintain one terminal tab per worktree
- Use
Tmuxto create a session for each terminal, allowing you to detach and keep processes running in the background- Use separate IDE windows for different worktrees
- Clean up when finished:
git worktree remove ../feature-a
Agent Teams is an experimental feature that enables multi-agent collaboration within a single Claude Code session. Instead of one agent handling everything, you can coordinate multiple specialist agents working together on complex tasks.
Agent Teams introduce a hierarchical structure where:
Think of it as having a development team where:
Agent Teams is currently experimental and requires an environment variable:
# Enable Agent Teams
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
# Launch Claude Code
claude
# Agent Teams will now be available
Permanent Setup (Recommended):
Add to your shell configuration (~/.bashrc, ~/.zshrc, or equivalent):
# For bash/zsh
echo 'export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1' >> ~/.zshrc
source ~/.zshrc
# Verify it's set
echo $CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS # Should output: 1
Team Lead (You/Main Agent):
Teammates (Specialist Agents):
Shared Task List:
1. Parallel Development
Task 1: Frontend engineer - Build login UI
Task 2: Backend engineer - Implement auth API
Task 3: QA engineer - Write integration tests
All three agents work simultaneously on their tasks.
2. Sequential Pipeline
Task 1: Backend engineer - Create database schema
↓ (blocks Task 2)
Task 2: Backend engineer - Implement CRUD endpoints
↓ (blocks Task 3)
Task 3: Frontend engineer - Build admin dashboard
3. Code Review Workflow
Task 1: Feature developer - Implement new feature
↓ (completed)
Task 2: Security reviewer - Check for vulnerabilities
Task 3: Performance reviewer - Analyze optimization opportunities
↓ (both complete)
Task 4: Feature developer - Address review feedback
4. Research & Implementation
Task 1: Research agent - Analyze existing codebase patterns
↓ (generates recommendations)
Task 2: Implementation team - Apply findings across modules
- Teammate A: Update authentication module
- Teammate B: Update payment module
- Teammate C: Update notification module
Simple Team Coordination:
I need to refactor our authentication system. Use agent teams:
1. Create a "research" teammate to analyze current auth implementation
2. Create a "backend" teammate to refactor the auth logic
3. Create a "frontend" teammate to update UI components
4. Create a "qa" teammate to write comprehensive tests
Coordinate them to work in sequence, with each passing findings to the next.
Advanced Team Workflow:
Create an agent team for a full feature implementation:
Team Lead: You (coordinate overall strategy)
Teammates:
- planner: Analyze requirements and create technical spec
- backend-dev: Implement API endpoints
- frontend-dev: Build UI components
- db-specialist: Design and migrate database schema
- qa-engineer: Write unit and integration tests
- security-reviewer: Perform security audit
Task Dependencies:
1. planner → creates spec (blocks all)
2. db-specialist → schema design (blocks backend-dev)
3. backend-dev + frontend-dev → parallel implementation
4. qa-engineer → tests (waits for implementation)
5. security-reviewer → audit (waits for all code)
✅ Do:
❌ Don't:
Ideal For:
Not Ideal For:
Check Team Status:
# View all active teammates
/agents
# Check shared task list
# (task list is visible in conversation context)
Common Issues:
| Issue | Solution |
|---|---|
| Teammates conflicting | Add explicit task dependencies with blockedBy |
| Team too slow | Reduce team size, increase parallelization |
| Tasks getting stuck | Check for circular dependencies |
| Context confusion | Use clear task descriptions and teammate names |
Expected enhancements for Agent Teams:
Learn More:
Claude Code hooks are customizable checkpoints that let you intercept and control Claude's autonomous coding operations before they execute on your system. They act as programmable guardrails where you can define safety policies, validate changes, require approvals, or log activities. When Claude attempts to modify files, run commands, or make system changes, your hooks can inspect the proposed action and either allow it, block it, or modify it based on your custom logic, giving you fine-grained control over what the AI agent can actually do to your codebase.

Claude Code hooks are configured in settings files such as ~/.claude/settings.json (user settings), .claude/settings.json (project settings), .claude/settings.local.json (local project settings), and enterprise managed policy settings.
Follow these steps to configure hooks in your project:
Copy Hooks Folder
Copy the .claude/hooks directory into the .claude folder at the root of your project.
Review Available Hooks
Inside the hooks folder, you’ll find Python scripts for each hook (e.g., notification, post_tool_use, etc.).
Keep Only Required Hooks
Retain the hooks you need and delete the rest.
Install Package Manager
Install the uv Python package manager.
This is required to execute Python scripts.
Copy Settings File
Copy .claude/settings.json into your .claude folder.
Update Settings Path
Open settings.json, find the entry for: "/Users/wesam/.local/bin/uv" Replace it with the actual path returned by:
bash which uv
project-root/
│
├── .claude/
│ ├── hooks/
│ │ ├── notification.py
│ │ ├── post_tool_use.py
│ │ └── ... (other hooks you keep)
│ │
│ └── settings.json
│
└── (other project files)
For a complete working example of hooks in action, see the Event-X repository.
💡 Quick Configuration (New 2026):
Use the interactive /hooks command for menu-based hook configuration without manually editing JSON files:
# Launch interactive hook configuration menu
/hooks
# Browse available hooks, enable/disable them, and configure settings
# Much easier than manual JSON editing!
Hooks run in response to various events within Claude Code's lifecycle: examples
PreToolUse: Runs after Claude creates tool parameters but before processing the tool call.PostToolUse: Runs immediately after a tool completes successfully.Notification: Runs when Claude Code sends notifications, such as when permission is needed to use a tool or when prompt input has been idle.UserPromptSubmit: Runs when the user submits a prompt, before Claude processes it.Stop: Runs when the main Claude Code agent has finished responding (does not run if stopped by user interrupt).SubagentStop: Runs when a Claude Code subagent (Task tool call) has finished responding.SessionEnd: Runs when a Claude Code session ends.PreCompact: Runs before Claude Code is about to run a compact operation.SessionStart: Runs when Claude Code starts a new session or resumes an existing session.TeammateIdle: Runs when an agent teammate becomes idle (new 2026, for Agent Teams).TaskCompleted: Runs when a task is marked as completed (new 2026).Hooks receive JSON data via stdin containing session information and event-specific data. Common fields include session_id, transcript_path (path to conversation JSON), and cwd (current working directory). Event-specific fields vary:
| Hook Event | Payload / Fields |
|---|---|
PreToolUse | tool_name, tool_input |
PostToolUse | tool_name, tool_input, tool_response |
Notification | message |
UserPromptSubmit | prompt |
Stop / SubagentStop | stop_hook_active |
PreCompact | trigger, custom_instructions |
SessionStart | source |
SessionEnd | reason |
TeammateIdle | teammate_id, last_activity |
TaskCompleted | task_id, task_name, completion_time |
Hooks communicate status and control Claude Code behavior in two ways:
| Exit Code / Feature | Behavior / Description |
|---|---|
| Exit code 0 (Success) | stdout is shown to the user in transcript mode (CTRL-R). For UserPromptSubmit and SessionStart, stdout is added to Claude's context. |
| Exit code 2 (Blocking error) | stderr is fed back to Claude or shown to the user to block actions depending on the hook event. Examples: blocks tool calls in PreToolUse and prompt processing in UserPromptSubmit. |
| Other exit codes (Non-blocking error) | stderr is shown to the user, but execution continues. |
| Advanced: JSON Output | Hooks can return structured JSON in stdout for sophisticated control. |
PreToolUse | permissionDecision: "allow", "deny", or "ask". Can also return updatedInput to modify tool parameters (new 2026). |
PostToolUse | decision: "block" or undefined; additionalContext can be returned. |
UserPromptSubmit | decision: "block" or undefined; additionalContext can be returned. |
Stop / SubagentStop | decision: "block" or undefined. |
SessionStart | additionalContext can be added. |
Hooks execute arbitrary shell commands on your system automatically and can modify, delete, or access any files your user account can access. Users are solely responsible for configured commands, and Anthropic provides no warranty.
Security Best Practices include:
.env, .git/). Configuration safety features include capturing a snapshot of hooks at startup and warning if hooks are modified externally, requiring review to apply changes.CLAUDE_PROJECT_DIR environment variable is available./hooks, verifying syntax, testing commands manually, and reviewing logs using claude --debug. Advanced debugging includes inspecting hook execution details, validating JSON schemas, and monitoring system resources.📚 Comprehensive MCP Documentation For detailed setup, configuration, and usage of MCP servers:
- MCP Servers Documentation - Complete guide with prerequisites, installation, and individual server documentation (Serena, Sequential Thinking, Memory, Playwright)
- Troubleshooting Guide - Common issues and solutions

n AI applications and m different tools, the old way forces you to build n * m unique integrations.Installing Playwright MCP for Claude Code (CLI) Claude Code uses a different installation method than Claude Desktop, with MCP servers being added per-directory and persisting in a ~/.claude.json configuration file.
Quick Installation
The simplest method for Claude Code CLI:
# Navigate to your project directory
cd /path/to/your/project
# Add Playwright MCP to Claude Code
claude mcp add playwright npx '@playwright/mcp@latest'
ExecuteAutomation Version (More Features)
claude mcp add playwright npx '@executeautomation/playwright-mcp-server'
Usage After Installation
# Start Claude Code in your project directory
claude
# Now you can use Playwright through natural language
"Use playwright mcp to open a browser to example.com"
"Take a screenshot of the current page"
"Click on the login button and fill the form"
Verification Commands
# Check available MCP tools
/mcp
# Navigate to playwright section to see all tools
# Available tools include: browser_navigate, browser_click,
# browser_screenshot, browser_type, etc.
Directory-Specific Persistence The claude mcp add command will persist but will only affect the directory in which you run it, with configuration stored in ~/.claude.json under a "projects" key.
# Each directory can have different MCP configurations
cd ~/project-a
claude mcp add playwright npx '@playwright/mcp@latest'
cd ~/project-b
claude mcp add playwright npx '@executeautomation/playwright-mcp-server'
MCP is built on three core pillars designed to create a clean separation of duties and make it crystal clear who's in control of any given interaction:
Tools
Resources
Prompts
/summarize_this_pull_request) kicks off complex multi-step actions.
The Model Context Protocol has evolved significantly since its introduction. Here's what's new:
🎯 MCP Registry - Now Live!
The official MCP Registry launched in September 2025, providing a centralized directory of MCP servers.
Key Features:
Browse Available Servers:
# Visit the registry online
https://registry.modelcontextprotocol.io/
# Or search directly via claude mcp
claude mcp search <keyword>
🏢 Agentic AI Foundation
As of 2026, MCP has been donated to the Agentic AI Foundation (part of the Linux Foundation), ensuring:
🆕 Latest Protocol Features
1. MCP Apps (Interactive UI Components)
2. OAuth Client Credentials
--client-id and --client-secret flags3. Async Operations
4. Server Discovery
.well-known URLs for automatic server discovery5. Stateless Architecture
Example: Installing from Registry
# Browse registry for interesting servers
# Visit https://registry.modelcontextprotocol.io/
# Install a server from the registry
claude mcp add <server-name> npx '@<package-name>@latest'
# Example: Install a database MCP server
claude mcp add sqlite npx '@modelcontextprotocol/server-sqlite@latest'
OAuth Authentication Example
# Add server with OAuth credentials
claude mcp add my-api \
--client-id "your-client-id" \
--client-secret "your-secret" \
npx '@api-mcp-server@latest'
🔮 What's Next for MCP
The MCP ecosystem continues to grow with:
Resources:


What is Software Development Life Cycle
A: As of February 2026, the Claude 4.5/4.6 model family is available:
| Model | Model ID | Context Window | Max Output | Best For |
|---|---|---|---|---|
| Opus 4.6 | claude-opus-4-6 | 200K tokens (1M beta via API) | 128K tokens | Complex reasoning, coding, analysis |
| Sonnet 4.5 | claude-sonnet-4-5-20250929 | 200K tokens | 8K tokens | Balanced performance & speed |
| Haiku 4.5 | claude-haiku-4-5-20251001 | 200K tokens | 8K tokens | Fast, lightweight tasks |
Key Features:
/fast)A: They're the same thing. See the Skills FAQ section in the Claude Skills documentation for complete details on skills, including security best practices, team sharing, and troubleshooting.
A: Pro plan users get approximately ~45 messages per 5-hour period (or roughly 10-40 coding prompts depending on complexity).
A: Tokens include everything in your interaction:
Text Tokenization:
tokens ≈ number of words + punctuation marksWhat Counts Toward Your Limit:
tokens = (width px × height px) / 750Rough Conversion:
A: As of February 2026, Claude offers the following subscription tiers:
| Plan | Price | Models Available | Usage Limit | Claude Code Access | Priority |
|---|---|---|---|---|---|
| Free | $0 | Limited | Base | Limited | Standard |
| Pro | 17/mo annually) | All (Opus 4.6, Sonnet 4.5, Haiku 4.5) | ~45 messages/5hr | Full | Standard |
| Max 5x | $100/mo | All | 5x Pro (~225 messages/5hr) | Full | High |
| Max 20x | $200/mo | All | 20x Pro (~900 messages/5hr) | Full | Maximum |
Key Points:
API Pricing (Pay-as-you-go):
| Model | Input (per MTok) | Output (per MTok) | Fast Mode Input | Fast Mode Output |
|---|---|---|---|---|
| Opus 4.6 | $5 | $25 | $30 (6x) | $150 (6x) |
| Sonnet 4.5 | $3 | $15 | N/A | N/A |
| Haiku 4.5 | $1 | $5 | N/A | N/A |
Fast Mode Pricing:
/fast commandA: Theoretical capacity: ~2,900-3,400 lines of pure code (13-15 tokens per line average)
Practical reality: Effective for projects with 1,000-2,000 lines because tokens are shared across:
A: Two types of "sharing" occur:
1. Usage Limits (Shared Pool):
2. Conversation Context (Independent):
A: Git worktrees create an interesting hybrid situation:
Separate Working Directories:
Shared Git Metadata:
.git directoryExample:
# Terminal 1: feature/auth
git commit -m "Add auth middleware"
# Terminal 2: feature/payment
cat middleware.js # Won't show auth changes
git log --oneline --all # WILL show the auth commit
A: Use separate repository clones instead of worktrees:
# Instead of worktrees:
~/project-auth/ # Complete separate clone
~/project-payment/ # Complete separate clone
# Benefits:
# - Separate .git directories
# - Independent Git histories
# - No shared state whatsoever
# - Claude sees completely isolated projects
A: Fast Mode provides 2.5x faster responses using Claude Opus 4.6 at the cost of 6x pricing.
How to Use:
/fast commandPricing:
When to Use Fast Mode:
Best Practice: Toggle Fast Mode on only when you need speed, then toggle off to save costs.
A: Claude Max plans multiply your usage capacity compared to Pro:
Max 5x ($100/month):
Max 20x ($200/month):
Who Should Upgrade:
A: The 1M token context window is currently in beta and available via API only.
Current Status (February 2026):
How to Access:
claude-opus-4-6Use Cases for 1M Context:
A: Session Management:
/compact command to reduce context in long sessionsToken Efficiency:
/model command strategically (choose between Opus 4.6, Sonnet 4.5, Haiku 4.5 based on task complexity)Project Structure:
This section tracks major changes, new features, and deprecated functionality as of February 2026.
Claude Models & Performance:
/fast commandAgent Features:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1)Commands & Tools:
/fast - Toggle Fast Mode for rapid responses/auth login, /auth status, /auth logout - Authentication management/debug - Troubleshoot current session/teleport - Send session to claude.ai/code for web access/rename - Auto-generate descriptive session names/hooks - Interactive menu for hook configurationMCP Ecosystem:
.well-known URLs for automatic discoveryHooks Enhancement:
TeammateIdle and TaskCompleted/hooks command for easier setupOther Features:
Subscription & Pricing:
MCP Ecosystem:
Model IDs:
claude-opus-4-6 (not "Opus 4")claude-sonnet-4-5-20250929 (not "Sonnet 4")claude-haiku-4-5-20251001 (not "Haiku 4")Commands:
/auth login instead of /login/terminal-setup still available for iTerm2/VSCode custom bindingsSubscription Tiers:
Workarounds:
/cost command instead
Legacy Commands:
/login and /logout - Use /auth login and /auth logout instead
Based on current roadmap and experimental features:
Last Updated: February 16, 2026
Note: Features, pricing, and availability subject to change. Check official Anthropic documentation for the most current information.
Claude Code Documentation:
Claude Models & API:
Agent Development:
Official MCP:
MCP Server Examples:
Documentation Version: 2.0 (Updated February 2026)
Contributing: Found outdated information? Please open an issue or submit a pull request.