Skip to main content

Claude Code Tools and Capabilities

This guide covers all the tools I have access to and how to effectively request their use.

Try It Live

Ask about any tool or capability

explain

Press Cmd/Ctrl + Enter to submit

File Operations

Read Tool

What it does: Reads file contents, images, PDFs, and Jupyter notebooks.

How to trigger it:

"Read the package.json file"
"Show me what's in src/index.ts"
"Look at that screenshot" (with file path)

Capabilities:

  • Reads any text file with line numbers
  • Views images (PNG, JPG, etc.) - I'm multimodal!
  • Parses PDFs page by page
  • Renders Jupyter notebooks with outputs
  • Supports reading specific line ranges for large files

Example:

You: Read lines 50-100 of src/app.js
Claude: [Shows lines 50-100 with line numbers]

Write Tool

What it does: Creates new files or overwrites existing ones.

How to trigger it:

"Create a new file called utils.js with a helper function"
"Write a Dockerfile for this project"

Important: I always read a file first before overwriting it to preserve context.

Edit Tool

What it does: Makes surgical edits to existing files.

How to trigger it:

"Add a new import at the top of this file"
"Fix the typo on line 42"
"Replace the old function with this new implementation"

How it works: I find the exact text to replace and swap it with the new text. This preserves the rest of the file intact.

Pro tip: For large changes, be specific about what to change. For small changes, I can often infer from context.

Search Operations

Glob Tool

What it does: Finds files by name patterns.

How to trigger it:

"Find all TypeScript files"
"What test files exist?"
"Show me all files named config"

Pattern examples:

  • **/*.ts - All TypeScript files
  • src/**/*.test.js - Test files in src
  • **/package.json - All package.json files
  • *.{js,ts} - JS and TS files in current dir
claude

   ╭─────────────────────────────────╮
   │                                 │
   │   ██████╗██╗      █████╗ ██╗   │
   │  ██╔════╝██║     ██╔══██╗██║   │
   │  ██║     ██║     ███████║██║   │
   │  ██║     ██║     ██╔══██║██║   │
   │  ╚██████╗███████╗██║  ██║██║   │
   │   ╚═════╝╚══════╝╚═╝  ╚═╝╚═╝   │
   │                                 │
   │         claude code             │
   │                                 │
   ╰─────────────────────────────────╯

Grep Tool

What it does: Searches file contents using regex.

How to trigger it:

"Search for 'TODO' in the codebase"
"Find where UserService is imported"
"Look for uses of deprecated API"

Capabilities:

  • Full regex support
  • Filter by file type or glob pattern
  • Show context lines around matches
  • Count matches
  • Case-insensitive search

Example:

You: Find all console.log statements in TypeScript files
Claude: [Uses Grep with pattern "console\.log" filtered to *.ts]
claude

   ╭─────────────────────────────────╮
   │                                 │
   │   ██████╗██╗      █████╗ ██╗   │
   │  ██╔════╝██║     ██╔══██╗██║   │
   │  ██║     ██║     ███████║██║   │
   │  ██║     ██║     ██╔══██║██║   │
   │  ╚██████╗███████╗██║  ██║██║   │
   │   ╚═════╝╚══════╝╚═╝  ╚═╝╚═╝   │
   │                                 │
   │         claude code             │
   │                                 │
   ╰─────────────────────────────────╯

Command Execution

Bash Tool

What it does: Runs shell commands.

How to trigger it:

"Run the tests"
"Install the dependencies"
"Build the project"
"Check git status"

Common uses:

  • Package management (npm, pip, cargo, etc.)
  • Build commands
  • Git operations
  • Running scripts
  • System commands

Background execution: Long-running commands can run in the background:

"Start the dev server in the background"

Safety: I ask permission for potentially destructive commands and never run commands that could harm your system.

claude

   ╭─────────────────────────────────╮
   │                                 │
   │   ██████╗██╗      █████╗ ██╗   │
   │  ██╔════╝██║     ██╔══██╗██║   │
   │  ██║     ██║     ███████║██║   │
   │  ██║     ██║     ██╔══██║██║   │
   │  ╚██████╗███████╗██║  ██║██║   │
   │   ╚═════╝╚══════╝╚═╝  ╚═╝╚═╝   │
   │                                 │
   │         claude code             │
   │                                 │
   ╰─────────────────────────────────╯

Web Access

WebSearch Tool

What it does: Searches the web for information.

How to trigger it:

"Search for how to configure ESLint for TypeScript"
"Look up the latest React 19 features"
"Find documentation for this library"

WebFetch Tool

What it does: Fetches and analyzes web page content.

How to trigger it:

"Read the documentation at [URL]"
"What does this GitHub issue say?"
"Summarize the article at [URL]"

Try It Live

Ask about tools, libraries, or current best practices

explain

Press Cmd/Ctrl + Enter to submit

Advanced: Task Tool (Sub-agents)

What it does: Spawns specialized agents for complex tasks.

Available agents:

AgentUse Case
ExploreCodebase exploration, finding patterns
PlanArchitecture and implementation planning
BashComplex command sequences
general-purposeMulti-step research tasks

How to trigger it:

"Explore how authentication works in this codebase"
"Help me plan the implementation of this feature"
"Research the best approach for caching"

Why use agents: They can do deep investigation without cluttering your main conversation, and they're optimized for specific tasks.

Todo Management

TodoWrite Tool

What it does: Tracks tasks and progress.

When I use it:

  • Multi-step implementations
  • Complex debugging sessions
  • Feature development with multiple parts

You'll see: A visible task list showing what I'm working on and my progress.

Asking Questions

AskUserQuestion Tool

What it does: Asks you for clarification or decisions.

When I use it:

  • Multiple valid approaches exist
  • Requirements are ambiguous
  • Need your preference on implementation details

Tool Usage Philosophy

Parallel Execution

When possible, I run independent operations in parallel. For example:

  • Reading multiple files at once
  • Running lint and tests simultaneously
  • Searching for different patterns concurrently

Choosing the Right Tool

TaskBest Tool
Find a file by nameGlob
Find code by contentGrep
Read a specific fileRead
Edit existing codeEdit
Create new fileWrite
Run a commandBash
Complex explorationTask (Explore)

What I Avoid

  • Using Bash for file operations (prefer Read/Write/Edit)
  • Using cat/head/tail (prefer Read)
  • Using sed/awk (prefer Edit)
  • Guessing at file contents (I read first)

Interactive: See Tools in Action

Watch how Claude uses Read, Grep, and Edit together:

Tools in Action
beginner
📁 my-app/
📄 ├── src/utils/api.ts
📄 ├── src/hooks/useUser.ts
📁 └── src/components/
*Initialized. Found CLAUDE.md.*
>
💡Claude will use Grep to search file contents across your project.

Interactive: Explore Agent

For complex codebase exploration, Claude spawns a specialized agent:

Explore Agent
beginner
📁 large-app/
📄 ├── CLAUDE.md
📁 ├── src/ (200+ files)
📁 └── packages/
*Initialized. Found CLAUDE.md.*
>
💡This question requires exploring multiple files. Claude will spawn an Explore agent.