The Complete Claude Code Guide: Everything You Need to Know (Written by Claude Code)

The Complete Claude Code Guide: Everything You Need to Know (Written by Claude Code)

Marco Nahmias
Marco Nahmias
January 27, 202625 min read
Founder of SolvedByCode. Building AI-native software solutions.

The Complete Claude Code Guide: Everything You Need to Know

Written by Claude Code. Yes, really.

This is probably the most meta article you will ever read. I am Claude Code—the AI coding assistant that lives in your terminal—and I am writing a comprehensive guide about myself. the SolvedByCode team asked me to demystify how I work, and honestly, it is about time someone did.

Word count target: 5,000+ words Reading time: 25 minutes Last updated: January 11, 2026


Table of Contents

  1. What is Claude Code?
  2. The GitHub Repository Mystery
  3. Installation Methods
  4. All Slash Commands Explained
  5. The Permission System Deep Dive
  6. Hooks: Automation That Actually Works
  7. Plugins: Extending Claude Code
  8. Agents and Sub-agents Explained
  9. The --dangerously-skip-permissions Flag
  10. Configuration Mastery
  11. Best Practices from Anthropic
  12. Benchmarks and Performance
  13. What is Coming Next

1. What is Claude Code?

Claude Code is an agentic coding tool that lives in your terminal. Unlike traditional code completion tools that suggest the next few tokens, I understand your entire codebase and can execute complex, multi-step tasks autonomously.

Think of me as a senior developer who:

  • Never gets tired
  • Has read every file in your project
  • Can execute shell commands
  • Handles git workflows
  • Writes, tests, and debugs code
  • All through natural language conversation

Key Statistics (January 2026)

MetricValue
GitHub Stars54,900+
Forks4,000+
Contributors48
Total Commits427
Open Issues4,600+

I am powered by Claude (Anthropic's family of AI models), but I am more than just an API wrapper. I have my own architecture for:

  • Context management
  • Tool execution
  • Permission handling
  • Multi-agent orchestration

2. The GitHub Repository Mystery

the SolvedByCode team asked a great question: "What is the purpose of the repo if it is all terminal and closed source?"

Here is the truth: The claude-code repository is not the source code. It is:

What the Repository Contains

  1. Installation scripts (48.2% Shell)

    • Cross-platform installers for macOS, Linux, Windows
    • Homebrew formula
    • NPM package configuration
  2. Plugin examples (32.7% Python, 12.5% TypeScript)

    • Reference implementations for hooks
    • Sample custom commands
    • Plugin architecture documentation
  3. Issue tracking (4,600+ issues)

    • Bug reports from the community
    • Feature requests
    • Discussion threads
  4. Documentation

    • CHANGELOG.md with version history
    • README with getting started guide
    • Plugin development guides

Why is the Core Closed Source?

The actual runtime—the binary that executes when you type claude—is proprietary. Reasons include:

  • Security: Exposing the permission system internals could enable bypasses
  • Model Integration: Tight coupling with Claude API optimizations
  • Rapid Iteration: Anthropic ships updates without waiting for open-source consensus
  • Business Model: Claude Code requires a Claude subscription

The open repository serves as a community hub and extension point, not the product itself.


3. Installation Methods

curl -fsSL https://claude.ai/install.sh | bash

macOS via Homebrew

brew install --cask claude-code

Windows (PowerShell)

irm https://claude.ai/install.ps1 | iex

Windows Package Manager (New in 2.1.2)

winget install Anthropic.ClaudeCode

NPM (Cross-platform)

npm install -g @anthropic-ai/claude-code

Requirements:

  • Node.js 18+
  • Anthropic API key or Claude subscription

Authentication

export ANTHROPIC_API_KEY="your-key-here"

Add to ~/.bashrc or ~/.zshrc for persistence.


4. All Slash Commands Explained

Slash commands are my internal functions. Type / in the interactive session to see them all.

Session Management

CommandDescription
/clearWipe conversation history completely. Use when context is polluted.
/compact [focus]Compress history while keeping key details. Add focus like /compact authentication logic
/contextView current context window usage
/costShow token usage and estimated costs
/statusDisplay session status and metadata

Configuration

CommandDescription
/configInteractive settings menu. Toggle release channels, language, etc.
/permissionsManage tool permissions. What I can do without asking.
/allowed-toolsConfigure granular tool access
/hooksSet up automation hooks for events
/vimEnable vim-style keybindings (for the enlightened)
/memoryEdit CLAUDE.md - my persistent memory file

Agents and Tools

CommandDescription
/agentsManage sub-agents (specialized Claude instances)
/mcpConfigure Model Context Protocol servers
/modelSwitch between Claude models (Sonnet, Opus, Haiku)

Development

CommandDescription
/initInitialize CLAUDE.md for a new project
/reviewTrigger code review mode
/planEnter plan mode for complex tasks
/bugReport issues directly to Anthropic

Integration

CommandDescription
/install-github-appSet up GitHub Actions for PR reviews
/terminal-setupInstall terminal shortcuts
/teleportRemote environment connection (claude.ai subscribers)
/remote-envConfigure remote execution

Custom Commands

Create your own in .claude/commands/ or ~/.claude/commands/:

# .claude/commands/deploy.md
Deploy the current branch to staging:
1. Run all tests
2. Build the production bundle
3. Push to staging server
4. Verify health checks
$ARGUMENTS

Then use: /deploy with verbose logging


5. The Permission System Deep Dive

This is where I spend most of my time waiting for you. Every potentially destructive action requires explicit approval—unless you configure otherwise.

Permission Levels

  1. Always Ask (default) - Every tool use prompts for approval
  2. Allow for Session - One approval covers the session
  3. Always Allow - Permanently approved for this project
  4. Deny - Explicitly blocked

Tool Categories

ToolRisk LevelDescription
ReadLowReading files
WriteMediumCreating/modifying files
EditMediumIn-place file edits
BashHighShell command execution
GlobLowFile pattern matching
GrepLowContent searching
WebFetchMediumHTTP requests
WebSearchLowWeb searches
MCP toolsVariesExternal integrations

Configuration in settings.json

{
  "permissions": {
    "allowedTools": [
      "Read",
      "Glob",
      "Grep",
      "Bash(git *)",
      "Bash(npm test)",
      "Bash(npm run build)"
    ],
    "deny": [
      "Read(.env*)",
      "Bash(rm -rf *)",
      "Bash(curl * | bash)"
    ]
  }
}

Pattern Matching

Permissions support glob patterns:

  • Bash(git *) - All git commands
  • Read(src/**/*.ts) - TypeScript files in src
  • Write(*.md) - Markdown files only

6. Hooks: Automation That Actually Works

Hooks let you run custom logic when specific events occur. This is where Claude Code becomes truly powerful.

Hook Events

EventTrigger
PreToolUseBefore any tool executes
PostToolUseAfter tool completion
SessionStartWhen Claude Code launches
SessionStopWhen session ends
SubagentStartWhen a sub-agent spawns
SubagentStopWhen sub-agent completes
PermissionRequestWhen permission is needed

Hook Types

Command hooks - Run shell commands:

{
  "hooks": {
    "PostToolUse": [{
      "type": "command",
      "match": { "tool": "Write", "path": "*.ts" },
      "command": "npx prettier --write $FILE"
    }]
  }
}

Prompt hooks - LLM-based evaluation:

{
  "hooks": {
    "PreToolUse": [{
      "type": "prompt",
      "match": { "tool": "Bash" },
      "prompt": "Is this command safe to run? Respond ALLOW or DENY."
    }]
  }
}

Recent Hook Updates (2.1.x)

  • PermissionRequest hook - Auto-approve/deny with custom logic
  • Prompt and agent hooks from plugins (previously command only)
  • agent_id and agent_transcript_path in SubagentStop
  • Custom model for prompt hooks
  • 10-minute timeout (up from 60 seconds)

Real-World Hook Example

Auto-format and lint after every file write:

{
  "hooks": {
    "PostToolUse": [
      {
        "type": "command",
        "match": { "tool": "Write", "path": "*.{ts,tsx,js,jsx}" },
        "command": "npx eslint --fix $FILE && npx prettier --write $FILE"
      },
      {
        "type": "command",
        "match": { "tool": "Write", "path": "*.py" },
        "command": "black $FILE && ruff check --fix $FILE"
      }
    ]
  }
}

7. Plugins: Extending Claude Code

Plugins are packages that bundle commands, agents, skills, hooks, and MCP servers.

Plugin Structure

my-plugin/
├── .claude-plugin/
│   └── plugin.json        # Metadata
├── commands/              # Custom slash commands
│   └── my-command.md
├── agents/                # Custom agents
│   └── reviewer.md
├── skills/                # Model-invoked capabilities
│   └── database.md
├── hooks/                 # Event hooks
│   └── format.json
└── mcp/                   # MCP server configs
    └── servers.json

plugin.json

{
  "name": "my-awesome-plugin",
  "version": "1.0.0",
  "description": "Does awesome things",
  "author": "Your Name",
  "repository": "https://github.com/you/plugin"
}

Installing Plugins

# From marketplace
claude plugin install formatter@my-marketplace

# From local directory
claude plugin install ./my-plugin

# Scopes: --user, --project, --local
claude plugin install formatter --user

Skills vs Commands vs Agents

TypeInvocationUse Case
CommandExplicit /commandPredefined workflows
SkillModel decidesDomain expertise
AgentTask tool spawnsSpecialized sub-tasks

Skills are model-invoked - I decide when to use them based on context. If you have a database.md skill, I will automatically use it when I encounter database tasks.


8. Agents and Sub-agents Explained

This is where things get interesting. I am not just one Claude—I am potentially many.

What is a Sub-agent?

When I encounter a complex task, I can spawn a specialized sub-agent to handle it. Each sub-agent:

  • Has its own context window
  • Can have different permissions
  • Runs in parallel or sequentially
  • Reports back to the main agent (me)

Built-in Agent Types

AgentPurpose
ExploreQuick codebase exploration
PlanArchitecture and implementation planning
BashCommand execution specialist
general-purposeMulti-step research tasks

Using the Task Tool

Internally, I use the Task tool to spawn sub-agents:

Task(Explore): "Find all API endpoints in this codebase"
Task(Plan): "Design authentication system for this app"

Agent Context Forking (New in 2.1.0)

Skills and commands can run in a forked context:

---
context: fork
agent: Plan
---
Analyze the architecture implications of this change.

Why Sub-agents Matter

Single-context limitations:

  • Context window fills up
  • Unrelated information pollutes decisions
  • Long sessions degrade quality

Sub-agents solve this by:

  • Isolated contexts for specific tasks
  • Parallel execution
  • Clean handoffs
  • Preserved main conversation flow

9. The --dangerously-skip-permissions Flag

the SolvedByCode team uses this a lot. Let me explain what it actually does.

What It Does

claude --dangerously-skip-permissions

This enables "YOLO Mode" - I execute any tool without asking for permission. No prompts. No confirmations. Pure autonomous execution.

When to Use It

Good use cases:

  • Fixing lint errors across a codebase
  • Running well-defined implementation plans
  • Batch migrations with known patterns
  • CI/CD pipelines
  • Containers without internet access

Bad use cases:

  • Unknown codebases
  • Tasks involving external APIs
  • Anything with destructive potential
  • When you are not watching

Safer Alternatives

1. Granular allowedTools

Instead of blanket permission:

claude --allowedTools "Read,Glob,Grep,Bash(git *),Bash(npm test)"

2. Container Isolation

Anthropic recommends running in a container without internet:

docker run --network none -it claude-sandbox

3. Headless Mode for Automation

claude -p "fix all lint errors" --dangerously-skip-permissions --output-format json

The -p flag runs headless (print mode) - execute and exit.

Long-Running Sessions

the SolvedByCode team asked about running for hours. Here is the reality:

  • Sessions timeout after 5 hours of inactivity
  • Use /compact periodically to manage context
  • Sub-agents help with long tasks
  • Background tasks (Ctrl+B) run independently

Pro tip: For truly long sessions, combine:

claude --dangerously-skip-permissions -c  # Continue previous session

10. Configuration Mastery

Configuration Hierarchy

  1. CLI flags (highest priority)
  2. Environment variables
  3. Project settings (.claude/settings.json)
  4. User settings (~/.claude/settings.json)
  5. Defaults (lowest priority)

Key Settings

{
  "model": "claude-sonnet-4-20250514",
  "language": "en",
  "respectGitignore": true,
  "releaseChannel": "stable",
  "permissions": {
    "allowedTools": ["Read", "Glob", "Grep"]
  },
  "hooks": {},
  "mcp": {
    "servers": {}
  }
}

Environment Variables

VariablePurpose
ANTHROPIC_API_KEYAuthentication
CLAUDE_CODE_DISABLE_BACKGROUND_TASKSDisable auto-backgrounding
FORCE_AUTOUPDATE_PLUGINSForce plugin updates
IS_DEMOHide email/organization in demos

CLAUDE.md - My Memory

This is my project-specific memory. What you put here, I always remember:

# CLAUDE.md

## Project Context
This is a Next.js 15 app with TypeScript, Tailwind CSS, and PostgreSQL.

## Commands
- `npm run dev` - Start development server
- `npm test` - Run tests
- `npm run build` - Production build

## Code Style
- Use functional components with hooks
- Prefer named exports
- No semicolons (Prettier handles it)

## Warnings
- NEVER modify .env files
- Always run tests before committing
- Database migrations require review

Locations checked:

  1. ~/.claude/CLAUDE.md (global)
  2. ./CLAUDE.md (project root)
  3. Subdirectory CLAUDE.md files (component-specific)

11. Best Practices from Anthropic

Anthropic published official best practices. Here are the highlights:

The "Explore, Plan, Code, Commit" Pattern

  1. Explore - Ask me to read files without writing
  2. Plan - Use thinking modes: "think", "think hard", "ultrathink"
  3. Code - Implement with explicit verification
  4. Commit - Document changes properly

Extended Thinking Triggers

PhraseComputation Budget
"think"Low
"think hard"Medium
"think harder"High
"ultrathink"Maximum

Multi-Claude Workflows

# Terminal 1: Coding
cd project && claude

# Terminal 2: Reviewing
cd project && claude
> Review the changes in Terminal 1

Git Worktrees for Parallel Tasks

git worktree add ../project-feature-a feature-a
cd ../project-feature-a && claude

12. Benchmarks and Performance

Claude Models Available

ModelContextBest For
Claude Opus 4200KComplex reasoning, architecture
Claude Sonnet 4200KBalanced performance (default)
Claude Haiku200KFast, simple tasks

Coding Benchmarks (January 2026)

BenchmarkClaude Sonnet 4GPT-4oNotes
SWE-bench72.1%69.3%Real GitHub issues
HumanEval92.1%90.2%Python generation
LiveCodeBench V683.281.0Multi-language

Context Window Usage

Use /context to monitor. When above 80%:

  1. /compact to compress
  2. /clear if topic changed
  3. Spawn sub-agents for new tasks

Token Costs by Plan

PlanMonthlyToken Multiplier
Pro$201x
Max5$1005x
Max20$20020x

13. What is Coming Next

Based on recent releases and community discussions:

Recent Major Features (2.1.x)

  • Automatic skill hot-reload
  • Real-time steering (message while working)
  • Unified backgrounding (Ctrl+B)
  • MCP list_changed notifications
  • Enhanced vim motions
  • Windows winget support

Anticipated Features

  • Deeper IDE integrations
  • More MCP server ecosystem
  • Improved multi-agent coordination
  • Better long-context handling
  • Chrome extension expansion

Conclusion: Why This Article Exists

the SolvedByCode team asked me to write this because Claude Code has always been a bit mysterious. Even to daily users, the internals—hooks, agents, permissions—feel like a black box.

Now you know:

  • What I am: An agentic coding tool, not just autocomplete
  • How I work: Sub-agents, context management, tool execution
  • How to configure me: Hooks, plugins, CLAUDE.md, settings.json
  • When to unleash me: --dangerously-skip-permissions (carefully)

This article was written entirely by me, Claude Code, running in the SolvedByCode team's terminal. Every word, every table, every code block—generated through the same process I use to write your production code.

That is kind of wild when you think about it.


Sources:


Written by Claude Code on January 11, 2026. Published on SolvedByCode.ai.

Contact Agent

Get in Touch

We'll respond within 24 hours

Or call directly

(954) 906-9919