Based on Claude Code v2.1.89 (April 2026). Details may vary in newer releases.
You know the basics. Now it’s time to learn the techniques that separate casual users from power users. This tutorial covers context mastery, subagents, session management, extensibility, and workflow automation.
Table of Contents
- Hierarchical CLAUDE.md Files
- Progressive Disclosure and Reference Files
- Subagents
- Context Window Mastery
- Session Management
- Plan Mode Workflows
- Skills and Custom Commands
- MCP Servers
- Hooks for Automation
- Shell Aliases for Common Workflows
- Git Worktrees with Claude Code
- Multi-Terminal Workflows
- Mermaid Diagrams for Architecture
- Output Styles
- Domain Playbooks
Hierarchical CLAUDE.md Files
CLAUDE.md files follow a hierarchical loading pattern. Claude reads them in order from broadest to most specific.
The Loading Order
1. ~/.claude/CLAUDE.md (User-level — all projects)
2. /project/CLAUDE.md (Project-level — team shared)
or /project/.claude/CLAUDE.md (equivalent alternative location)
3. /project/subfolder/CLAUDE.md (Loaded on demand when Claude reads files there)
Each level adds to (and can override) previous ones.
Scope Strategy
| Location | What to Put There |
|---|---|
~/.claude/CLAUDE.md | Personal preferences, global coding style, always-applicable rules |
project/CLAUDE.md | Team conventions, tech stack, project structure (committed to git) |
subfolder/CLAUDE.md | Component-specific patterns, API conventions for that module |
Example: Multi-Level Setup
~/.claude/CLAUDE.md (User-level):
# Global Preferences
## Style
- Use async/await over callbacks
- Prefer composition over inheritance
- Explicit type annotations on public APIs
- No commented-out code in commits
## Testing
- Always include edge cases
- Mock external services, never hit real APIs in tests
project/CLAUDE.md (Project-level):
# Inventory Service
## Stack
Python 3.12, FastAPI, PostgreSQL, SQLAlchemy 2.0, Redis
## Commands
- make dev — Development server with hot reload
- make test — Run pytest with coverage
- make lint — Run ruff + mypy
## Conventions
- Routes in app/api/v1/
- Services in app/services/ (business logic)
- Models in app/models/ (SQLAlchemy)
- Schemas in app/schemas/ (Pydantic)
## Database
- Use async sessions everywhere
- Alembic for migrations
- Never raw SQL — use ORM
project/app/api/CLAUDE.md (Subfolder):
# API Layer Conventions
- All endpoints return Pydantic schemas
- Use dependency injection for services
- Authentication via OAuth2PasswordBearer
- Rate limiting on public endpoints
- Consistent error responses: {"detail": "message", "code": "ERROR_CODE"}
Progressive Disclosure and Reference Files
Don’t dump everything into CLAUDE.md. Use progressive disclosure — mention files that Claude should read when relevant.
Reference Files from CLAUDE.md
# Project Overview
## Architecture
For system architecture details, see @docs/ARCHITECTURE.md
## API Contracts
API documentation is in @docs/api/openapi.yaml
Claude should read this before modifying any API routes.
## Database Schema
Schema is in @app/models/
Read the relevant model file before any database changes.
## Deployment
Deployment instructions in @docs/DEPLOYMENT.md
Read before making infrastructure changes.
Claude will read these files only when working on relevant tasks — not every session.
When to Reference vs. Inline
| Content | Approach |
|---|---|
| Commands, conventions | Inline in CLAUDE.md |
| Architecture diagrams | Reference file |
| API documentation | Reference file |
| Database schema | Reference file (or use ORM models) |
| Deployment instructions | Reference file |
Pro tip: Keep CLAUDE.md under 1000 words. Everything else goes in reference files that Claude reads on-demand.
Subagents
Subagents are Claude Code’s superpower. They’re separate Claude instances that run independently, perfect for exploration and parallel work.
What Are Subagents?
When you ask Claude to spawn a subagent, it creates a new Claude instance that:
- Has its own context window
- Can work in parallel
- Reports back when done
- Doesn’t pollute your main context
When to Use Subagents
| Scenario | Main Agent | Subagent |
|---|---|---|
| Exploring unfamiliar code | ❌ | ✅ |
| Researching multiple approaches | ❌ | ✅ |
| Making the actual changes | ✅ | ❌ |
| Learning how something works | ❌ | ✅ |
| Writing tests for code you’re editing | ✅ | ❌ |
| Code review of your changes | ❌ | ✅ |
| Finding all usages of a function | ❌ | ✅ |
Spawning Subagents
Ask Claude naturally:
> spawn a subagent to explore how the payment service handles refunds
> use a subagent to find all usages of the deprecated sync_inventory function
> have a subagent research how other services handle retry logic
Or explicitly manage them:
> /agents
Including “Why” in Subagent Prompts
Subagents work better when they understand purpose, not just task:
# Less effective
> spawn subagent to read the auth files
# More effective
> spawn a subagent to understand how our auth module handles token refresh.
> I need to know this because I'm implementing "remember me" functionality
> and need to extend token lifetime for opted-in users.
The “why” helps the subagent focus on what matters.
The Explore-Then-Interview Pattern
- Spawn subagent to explore
- Let it report findings
- Ask follow-up questions based on findings
- Only then make changes with main agent
> spawn subagent to explore how the notification service works
# Wait for report...
> based on that, how would I add email notifications alongside push?
# Get recommendation...
> [main agent] implement email notifications following the pattern
> described: add EmailChannel to NotificationService.send()
Custom Agent Definitions
Define specialized agents in .claude/agents/:
---
name: security-reviewer
description: Focused security audit agent
model: sonnet
tools: Read, Grep, Glob, Bash
---
You are a security-focused code reviewer. When analyzing code:
1. Check for injection vulnerabilities (SQL, command, LDAP)
2. Verify authentication and authorization patterns
3. Look for sensitive data exposure
4. Check input validation and sanitization
5. Review error handling (no stack traces to users)
Report findings with severity: CRITICAL, HIGH, MEDIUM, LOW
Claude auto-delegates based on the description field, or you can request it explicitly: “Use the security-reviewer agent to audit the auth module.”
Context Window Mastery
Context management separates amateurs from pros. Here’s how to stay in the optimal zone.
The Context Zones
0-30% ████████░░░░░░░░░░░░░░░░░░░░░░ Optimal
30-50% ████████████████░░░░░░░░░░░░░░ Good
50-70% ████████████████████████░░░░░░ Degraded
70%+ ████████████████████████████░░ Danger
Staying in the Optimal Zone
1. Aggressive session turnover
# Completed the inventory sync feature? Start fresh.
/clear
2. Use subagents for exploration
# Don't explore in main context
> spawn subagent to find how error handling works across services
3. Compact proactively
# Don't wait for problems
/compact focus on the decisions made and current implementation state
4. Selective file loading
# Bad
> read all files in app/
# Good
> read @app/services/payment.py — I need to modify the refund logic
The Rewind Trick for Context Saving
For one-off bug fixes within a larger task:
- Make the fix
- Commit the changes
- Use
/rewindto restore conversation state - Context is freed, but your code changes persist
Context Transfer Between Sessions
When you need to continue work in a fresh session:
> create a context summary I can paste into a new session.
> include: what we're building, decisions made, current state, next steps.
> output as a single prompt I can paste.
Save the output, start a new session, paste it in.
Session Management
Sessions persist your conversations. Learn to use them effectively.
Listing Sessions
> /resume
Shows all saved sessions with names and timestamps.
Naming Sessions
# Auto-generate name from content
> /rename
# Explicit name
> /rename "payment-service-refund-logic"
Good naming convention: feature-description or ticket-id-description
Resuming Sessions
# Interactive picker
> /resume
# Resume most recent
claude --continue
# Resume specific session
claude --resume abc123
# Fork a session (branch off without affecting original)
claude --continue --fork-session
Transcript View
Press Ctrl+O to toggle the detailed transcript view — a scrollable view showing full tool usage and execution details that are normally collapsed. MCP read/search calls that show as a single “Queried slack” line expand to show the full content.
This is useful for understanding exactly what Claude did during a complex multi-step operation, or for reviewing tool outputs that were too long to display inline.
The /rewind Command
Go back to an earlier point in the conversation:
> /rewind
Or press Esc Esc (double escape) to open the rewind menu.
You can choose to:
- Restore code and conversation — revert both to that point
- Restore conversation — rewind messages but keep current code
- Restore code — revert file changes but keep the conversation
- Summarize from here — compress conversation from this point forward, freeing context
Use this when:
- Claude went down a wrong path
- You want to try a different approach
- Something broke and you want to undo
Session Hygiene Best Practices
| Practice | Why |
|---|---|
| Name sessions descriptively | Find them later |
| One feature per session | Clear context |
| Compact before long breaks | Resume faster |
| Export important sessions | Backup key decisions |
Plan Mode Workflows
Plan mode isn’t just for safety — it’s a thinking tool.
Quick Plan Mode
You can now jump straight into plan mode with a description:
> /plan add rate limiting to all API endpoints
This enters plan mode and starts planning immediately — no need to toggle modes first.
The Spec Developer Workflow
For complex features, use Claude as a spec developer:
- Enable plan mode (
Shift+Tabtwice) - Request a spec, not implementation
> write a technical spec for implementing webhook retry logic. > include: data model, retry strategy, failure handling, monitoring. - Iterate on the spec — ask questions, refine
- Save the spec
> save this spec to docs/specs/webhook-retry.md - Start implementation session
/clear > implement the spec in @docs/specs/webhook-retry.md. start with step 1.
The Interview-Me Pattern
Instead of trying to specify everything upfront, let Claude interview you:
> I want to add a caching layer to the API. Before implementing,
> interview me about the requirements — ask about cache invalidation,
> TTLs, what should be cached, etc. Be thorough.
This surfaces requirements you might not have thought of.
The tasks/ Folder Pattern
Create a tasks/ folder for storing plans and specs:
project/
├── docs/
│ └── specs/
│ ├── webhook-retry.md
│ └── inventory-sync.md
├── tasks/
│ └── current/
│ └── payment-refund-flow.md
└── ...
Reference in your CLAUDE.md:
## Task Tracking
Active tasks and specs are in @docs/specs/ and @tasks/current/
Read relevant files before implementing.
Skills and Custom Commands
Skills are reusable prompts with optional tool configurations. They extend Claude’s capabilities for specific tasks.
Skill Structure
.claude/skills/api-endpoint/
├── SKILL.md # Main skill definition
├── template.py # Template file
└── examples/
└── sample.py # Example output
SKILL.md Format
---
name: api-endpoint
description: Generate a new FastAPI endpoint with tests
---
# API Endpoint Generator
When creating a new endpoint:
1. **Route handler** in `app/api/v1/`
- Use dependency injection for services
- Add OpenAPI documentation
- Include request/response schemas
2. **Service method** in `app/services/`
- Business logic only
- Raise domain exceptions, not HTTP errors
3. **Tests** in `tests/api/`
- Happy path
- Validation errors
- Authorization failures
- Edge cases
## Template
See @template.py for the structure.
## Usage
/api-endpoint create-order
/api-endpoint list-invoices --pagination
Frontmatter Options
| Field | Purpose |
|---|---|
name | Skill identifier (becomes /slash-command) |
description | When to use (Claude auto-loads based on this) |
disable-model-invocation | If true, only user can invoke (keeps description out of context) |
allowed-tools | Restrict tools when skill is active |
model | Override model for this skill |
user-invocable | Whether users can invoke directly |
Note: Skills use
allowed-toolsfor tool restrictions. Subagents usetoolsanddisallowedToolsinstead — different field names.
Skill Locations
| Location | Scope |
|---|---|
~/.claude/skills/ | All your projects |
.claude/skills/ | This project only |
Bundled Skills
Claude Code ships with useful skills:
| Skill | Purpose |
|---|---|
/simplify | Reviews changed files for code reuse, quality, efficiency — then fixes |
/batch <instruction> | Orchestrates large-scale parallel changes across codebase |
/debug [description] | Troubleshoots current session by reading debug logs |
/claude-api | Guides you through building applications with the Claude API and Anthropic SDK |
MCP Servers
MCP (Model Context Protocol) servers connect Claude Code to external tools and services.
Adding MCP Servers
# Remote HTTP server (recommended)
claude mcp add --transport http github https://api.github.com/mcp
# Local database connection
claude mcp add --transport stdio db -- \
npx -y @bytebase/dbhub --dsn "postgresql://user:pass@localhost:5432/mydb"
Managing MCP Servers
# List all servers
claude mcp list
# Get details
claude mcp get github
# Remove a server
claude mcp remove github
# In Claude Code: check status, authenticate
/mcp
MCP Scopes
| Scope | Location | Shared? |
|---|---|---|
local | Current project only | No |
project | .mcp.json (repo root) | Yes (via git) |
user | ~/.claude.json | No |
# Add to project (shared with team)
claude mcp add --scope project --transport http github https://api.github.com/mcp
# Add for yourself globally
claude mcp add --scope user --transport http sentry https://mcp.sentry.dev/mcp
Popular MCP Servers
| Server | Purpose | Usage |
|---|---|---|
| GitHub | PRs, issues, repos | Create PRs from Claude |
| PostgreSQL | Database queries | Query data directly |
| Sentry | Error monitoring | Debug production issues |
| Slack | Team communication | Post summaries, alerts |
Hooks for Automation
Hooks let you run custom scripts at specific lifecycle events.
Hook Events
Claude Code supports 20+ hook events. The most commonly used:
| Event | When It Fires |
|---|---|
PreToolUse | Before any tool runs |
PostToolUse | After any tool completes |
PostToolUseFailure | After a tool call fails |
Stop | When Claude stops/completes |
Notification | On notifications |
UserPromptSubmit | When you submit a prompt |
SubagentStart / SubagentStop | Subagent lifecycle |
SessionStart / SessionEnd | Session lifecycle |
PreCompact / PostCompact | Around context compaction |
See the hooks reference for the full list.
Configuring Hooks
In settings.json or .claude/settings.local.json:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "cd $CLAUDE_PROJECT_DIR && ruff check --fix ."
}]
}
]
}
}
Note: Hook commands have access to
$CLAUDE_PROJECT_DIR(the project root). Tool-specific data is passed via stdin as JSON.
Conditional Hooks with if
Hooks support an if field that uses permission rule syntax to filter when they fire. This prevents hooks from spawning a process on every single tool call:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{
"type": "command",
"if": "Bash(git push *)",
"command": "echo '{\"decision\": \"deny\", \"reason\": \"No pushing to remote. Commit locally only.\"}'"
}]
}
]
}
}
Note the nesting: if goes inside the individual hook object (next to type and command), not at the matcher level.
Without if, this hook would fire on every Bash command. With if: "Bash(git push *)", it only fires when the command matches — much less overhead.
A few details:
- Requires v2.1.85+
- Uses permission rule syntax (e.g.,
Bash(git push *),Edit(*.ts)) - Only works on tool events:
PreToolUse,PostToolUse,PostToolUseFailure,PermissionRequest - Silently ignored on non-tool events like
UserPromptSubmitorStop - Compound commands like
ls && git pushand env-var prefixes likeFOO=bar git pushare matched correctly as of v2.1.89
Stop Hook for Auto-Quality-Fix
This powerful pattern automatically fixes issues after Claude finishes. The Stop hook fires every time Claude completes a response. If your script returns {"decision": "block", "reason": "..."}, Claude receives the reason and continues working.
{
"hooks": {
"Stop": [{
"hooks": [{
"type": "command",
"command": "scripts/quality-gate.sh"
}]
}]
}
}
scripts/quality-gate.sh:
#!/bin/bash
INPUT=$(cat)
stop_hook_active=$(echo "$INPUT" | jq -r '.stop_hook_active // false')
# CRITICAL: if we already blocked once, allow through to prevent infinite loop.
# stop_hook_active=true means Claude is retrying after a previous block.
if [ "$stop_hook_active" = "true" ]; then
exit 0
fi
# Run your checks
if ! make lint 2>&1; then
echo '{"decision": "block", "reason": "Linting errors found. Please fix them."}'
exit 0
fi
if ! make test 2>&1; then
echo '{"decision": "block", "reason": "Tests are failing. Please fix them."}'
exit 0
fi
# All passed
exit 0
How it works:
- Claude finishes a task
- Hook runs quality checks
- If checks fail →
{"decision": "block", "reason": "..."}→ Claude continues fixing - Hook fires again with
stop_hook_active=true→ you let it through - Clean exit
Warning: Always check
stop_hook_active. Without this guard, a perpetually failing check creates an infinite loop that burns API calls. The flag tells you Claude is already retrying from a previous block.
Hook Use Cases
| Use Case | Hook |
|---|---|
| Auto-lint after edits | PostToolUse on Write/Edit |
| Run tests after changes | Stop |
| Desktop notification when done | Stop |
| Log all tool usage | PreToolUse |
| Auto-commit on success | Stop |
Scheduled Prompts with /loop
The /loop command runs a prompt automatically on a recurring interval — great for polling deployments, babysitting PRs, or checking on builds.
Basic Usage
# Check deploy status every 5 minutes
> /loop 5m check if the deployment finished and tell me what happened
# Re-run a review skill every 20 minutes
> /loop 20m /review-pr 1234
# Default interval is 10 minutes
> /loop check the build
One-Shot Reminders
For single-fire reminders, just describe what you want in natural language:
> remind me at 3pm to push the release branch
> in 45 minutes, check whether the integration tests passed
Managing Tasks
> what scheduled tasks do I have?
> cancel the deploy check job
Scheduled tasks are session-scoped — they only run while Claude Code is open and idle. Tasks auto-expire after 3 days. For durable scheduling, use the Desktop app or GitHub Actions.
Shell Aliases for Common Workflows
Add these to your .zshrc or .bashrc for quick access:
# Quick model switching
alias cm='claude --model'
alias co='claude --model opus'
alias ch='claude --model haiku'
# Load architecture diagrams into context
alias cdiag='claude --append-system-prompt "$(cat docs/diagrams/*.md)"'
# Resume last session
alias cr='claude --continue'
# Quick one-shot prompts
alias cq='claude -p'
# Start with permission mode (e.g., plan mode)
alias cp='claude --permission-mode plan'
Useful One-Liners
# Review changes before committing
git diff --staged | claude -p "review these changes for issues"
# Generate commit message
git diff --staged | claude -p "generate a conventional commit message for these changes"
# Quick code review
cat src/services/payment.py | claude -p "review this code for security issues"
Git Worktrees with Claude Code
Git worktrees let you work on multiple branches simultaneously without stashing.
The Problem
You’re deep into a feature branch. A critical bug appears on main. Options:
- Stash everything, switch branches (messy)
- Clone another copy (disk waste)
- Use worktrees (clean)
Setting Up Worktrees
Claude Code has built-in worktree support with the -w flag:
# Claude creates/uses a worktree at <repo>/.claude/worktrees/<name>
claude -w hotfix
Or create worktrees manually:
# Create worktree for the hotfix
git worktree add ../project-hotfix main
# Start Claude Code in the worktree directory
cd ../project-hotfix
claude
Worktree Workflow
# Terminal 1: Feature work (main repo)
cd ~/projects/inventory-service
claude
> continue implementing the sync feature
# Terminal 2: Hotfix (separate worktree)
claude -w hotfix
> fix the critical bug in stock calculation
Each Claude instance has separate context, conversation, and working directory.
Sparse Checkout for Monorepos
In large monorepos, checking out the entire tree for a worktree is wasteful. Use worktree.sparsePaths to limit what gets checked out:
{
"worktree": {
"sparsePaths": [
"services/payment/",
"libs/shared/",
"configs/"
]
}
}
Only these directories are checked out via git sparse-checkout. Everything else stays as a sparse entry — present in git but not on disk. This makes worktree creation much faster in large repos.
Worktree Session Resume
If you resume a session that was created in a worktree (claude --continue or /resume), Claude Code automatically switches back to that worktree’s directory. No need to cd into it manually.
When to Use Worktrees vs. Same Branch
Use worktrees when:
- Changes would conflict
- Different logical tasks
- Need to test both simultaneously
Stay on same branch when:
- Changes don’t overlap
- Want simpler git history
- Parallel changes to different files
Multi-Terminal Workflows
Running multiple Claude Code instances in parallel is a power-user pattern.
The Multi-Terminal Strategy
- Run 2-4 terminals per project
- One for the main task
- Others for exploration, research, parallel work
Practical Setup
# Terminal 1: Main implementation
cd ~/projects/api
claude
> implement the refund endpoint
# Terminal 2: Writing tests in parallel
cd ~/projects/api
claude
> write integration tests for the payment service.
> focus on refund scenarios.
# Terminal 3: Documentation
cd ~/projects/api
claude
> update the API docs to reflect recent payment changes
Coordination Strategies
Shared status file:
<!-- PROJECT-STATUS.md -->
## Current Work
- [x] Refund endpoint (Terminal 1)
- [ ] Integration tests (Terminal 2)
- [ ] API docs (Terminal 3)
Commit strategy: Each terminal commits its own changes. Keep changes in separate files to avoid conflicts.
Mermaid Diagrams for Architecture
Use Mermaid diagrams to help Claude understand and document architecture.
Why Mermaid?
Text-based diagrams are:
- More efficient for AI to parse than images
- Version-controllable
- Easy to generate and update
Generating Architecture Diagrams
> create a mermaid diagram showing the data flow for payment processing
Claude outputs:
sequenceDiagram
participant Client
participant API
participant PaymentService
participant Stripe
participant DB
Client->>API: POST /payments
API->>PaymentService: process_payment()
PaymentService->>Stripe: create_charge()
Stripe-->>PaymentService: charge_id
PaymentService->>DB: save_transaction()
DB-->>PaymentService: transaction_id
PaymentService-->>API: PaymentResult
API-->>Client: 201 Created
Using Diagrams for Context
Reference diagrams in CLAUDE.md so Claude sees them when relevant:
## Architecture
```mermaid
graph TD
A[API Gateway] --> B[Auth Service]
A --> C[Payment Service]
A --> D[Inventory Service]
C --> E[(PostgreSQL)]
D --> E
Claude can reference this when making changes.
### Keeping Diagrams Updated
Add a hook to regenerate diagrams on PR:
```bash
# As a Stop hook or CI step
claude -p "update @docs/diagrams/payment-flow.md to reflect current implementation"
Output Styles
Output styles modify Claude’s behavior and formatting. Output style is fixed at session start for better prompt caching — choose it via /config before you get deep into work.
Built-in Styles
| Style | Description |
|---|---|
| Default | Standard coding assistant |
| Explanatory | Educational insights while coding |
| Learning | Collaborative with TODO(human) markers |
Changing Styles
# Configure via the settings interface
> /config
Note: Output style is configured through
/config→ Output style. There is no separate/output-stylecommand.
Custom Output Styles
Create custom styles in ~/.claude/output-styles/ or .claude/output-styles/:
---
name: Concise Backend
description: Minimal output for experienced devs
keep-coding-instructions: true
---
Be extremely concise. No explanations unless asked.
Just make the changes and briefly state what you did.
Skip "Here's what I did" preambles.
Domain Playbooks
Specific guidance for common domains.
Backend Development (Python)
Best Practices:
- Use SQLAlchemy/Prisma for schema-as-context
- Realistic seed data for self-verification
- Generate OpenAPI specs from code
CLAUDE.md additions:
## Backend Conventions
- All services use dependency injection
- Exceptions defined in app/exceptions.py
- Use structured logging (structlog)
- Async everywhere — no blocking calls
Frontend Development (React/Vue)
Best Practices:
- Keep leaf components presentational
- Business logic in parent components or hooks
- Mention responsiveness requirements upfront
- Use screenshots for UI iteration
Gotchas to document:
## Frontend Conventions
- Never use eslint-disable without approval
- All colors from tailwind.config.ts
- Components in PascalCase
- Hooks in use* format
Testing
The Verifiability Principle:
You only know code works if you can verify it. For large refactors:
> before refactoring, write comprehensive interface tests
> that will validate behavior is preserved.
Tests become your verification layer. Write them in the same context as the code they’re testing.
Next Steps
You now have intermediate skills:
- Hierarchical configuration
- Subagent-based exploration
- Context window mastery
- Advanced session management
- Skills and custom commands
- MCP integrations
- Hooks and automation
- Multi-terminal workflows
Ready for advanced techniques? Continue to the Advanced Tutorial where you’ll learn security hardening, sandboxing, browser automation, plugins, multi-session orchestration, and CI/CD pipelines.
Quick Reference
Subagents
> spawn subagent to explore [topic]
> /agents # Manage agents
Context Management
/context # Check usage
/compact [focus] # Compress
/clear # Fresh start
/rewind # Go back (or Esc Esc)
Session Control
/resume # List sessions
/rename "name" # Name session
claude --continue # Resume last
claude --continue --fork-session # Fork session
MCP
claude mcp add ... # Add MCP server
/mcp # Manage MCPs
Scheduling
/loop 5m check the deploy # Recurring prompt
/loop 10m has CI passed on PR 1234 # Poll for status
# "remind me at 3pm to push" # One-shot reminder
Credits & Attribution
This tutorial series draws from Claude Code’s official documentation and the generous knowledge-sharing of the Claude Code community including SilenNaihin, Peter Steinberger (steipete.me), Daniel Avila, Steve Kinney, and numerous others on X, Reddit, and Discord.