Skip to content

Instantly share code, notes, and snippets.

@Sherlockboy
Created February 2, 2026 07:56
Show Gist options
  • Select an option

  • Save Sherlockboy/a5afc41e09e78135750807b0074f3ed8 to your computer and use it in GitHub Desktop.

Select an option

Save Sherlockboy/a5afc41e09e78135750807b0074f3ed8 to your computer and use it in GitHub Desktop.
Claude Code Essential Features Guide

Claude Code Essential Features Guide

1. Plan Mode

Purpose: Read-only exploration before making changes. Claude analyzes codebase, creates plan, asks questions — no edits until you approve.

Usage:

claude --plan              # Start in plan mode
# or type "plan" at prompt to enter plan mode

Workflow:

  1. Claude explores code (read-only)
  2. Creates .claude/plan.md with approach
  3. Lists unresolved questions
  4. You review/edit plan
  5. Approve to execute

Best for: Complex features, unfamiliar codebases, risky changes.


2. Context Management

/context

Shows context window usage as visual grid. Monitor this — quality degrades as it fills.

/compact [instructions]

Summarizes conversation to free context. Optional instructions preserve specific topics.

/compact focus on authentication logic

/clear

Wipes conversation completely. Better than /compact when switching tasks.

Pro tip: /clear between tasks. Don't let context fill with irrelevant history.


3. Memory & Configuration

/memory

Opens CLAUDE.md for editing. Stores project conventions, decisions, preferences.

/init

Scans project, generates starter CLAUDE.md. Run in new repos.

Quick memory (deprecated)

# prefix for quick memory was removed. Use /memory or ask Claude to edit CLAUDE.md.


4. Session Management

/resume [name]

Resume previous session. Sessions auto-save.

claude --resume            # Pick from list
claude --continue          # Resume last session
claude -c                  # Shorthand for --continue

/rename

Give current session memorable name for later.


5. Extended Thinking

Trigger deeper reasoning with keywords:

  • think — basic
  • think hard — more
  • think harder — even more
  • ultrathink — maximum budget

Example: "Think hard about the best approach for this refactor."


6. Keyboard Shortcuts

Key Action
Esc Interrupt Claude (preserves context)
Esc Esc Rewind to edit previous prompt
Tab Toggle thinking visibility
Shift+Tab Toggle modes
Ctrl+C Cancel
Ctrl+R Search history
Navigate previous messages

7. Quick Syntax

Syntax Purpose
@path/to/file Reference file in prompt
!command Run bash directly (bypasses Claude)
/command Slash commands

8. Custom Slash Commands

Create in .claude/commands/ (project) or ~/.claude/commands/ (global).

Example .claude/commands/review.md:

---
description: Code review for current changes
---
Review recent changes for:
1. Security vulnerabilities
2. Performance issues
3. Code style violations

Use: /review


9. Subagents

Spawn separate Claude instances with own context. Main agent stays clean.

Claude auto-spawns for web search, exploration. You can also request: "Use a subagent to research X"


10. Useful CLI Flags

claude --plan                    # Start in plan mode
claude --continue / -c           # Resume last session
claude --resume                  # Pick session to resume
claude --dangerously-skip-permissions  # Skip all permission prompts
claude -p "prompt"               # Headless mode (no interactive UI)

Recommended Workflow for Multi-Step Features

  1. Start task: Read .claude/tasks.md, pick next task
  2. Plan mode: For complex tasks, use --plan first
  3. Execute: Approve plan, let Claude work
  4. Monitor: Watch /context, use /compact at 70%+
  5. Checkpoint: Update .claude/progress.md
  6. Clear: /clear before next task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment