When I use Claude Code, I am not just using a model that generates text. I am using a tool-driven coding environment that can inspect files, search code, edit content, run shell commands, and delegate work to subagents.

That tool layer is the real reason Claude Code feels different to me from a normal chat UI.

Instead of asking:

Can the model explain my code?

I can ask:

Can the model inspect the repo, find the bug, patch the file, and run the command needed to verify the fix?

That shift is what makes Claude Code genuinely useful for engineering work.

In this post, I am breaking down the main Claude Code tools and when I would actually use each one:

  • Agent
  • Bash
  • Edit
  • Glob
  • Grep
  • Read
  • Skill
  • ToolSearch
  • Write

The Big Picture

These tools are not all doing the same job.

Some are for reading context:

  • Read
  • Glob
  • Grep

Some are for changing files:

  • Edit
  • Write

Some are for taking actions:

  • Bash
  • Agent
  • Skill

And one exists to unlock more tools on demand:

  • ToolSearch

That separation matters because a good coding agent should not treat every task like a shell command.

For example:

  • If you need to find files by pattern, Glob is better than raw shell search
  • If you need to search inside code, Grep is better than calling grep from a terminal
  • If you need to patch one part of a file, Edit is safer than rewriting the whole thing

In my experience, Claude Code works best when it uses the most specific tool for the job, not just Bash for everything.

Quick Summary Table

ToolMain purposeBest used for
AgentDelegate work to a subagentMulti-step research, planning, exploration, specialized tasks
BashRun shell commandsBuilds, tests, git commands, CLI workflows
EditMake targeted changesReplacing or updating exact text in an existing file
GlobFind files by patternMatching paths like src/**/*.ts or content/posts/*.md
GrepSearch file contentsFinding strings, regex matches, and code patterns
ReadRead a file directlyInspecting source files, Markdown, images, PDFs, notebooks
SkillInvoke higher-level workflowsSlash-command-like capabilities and reusable workflows
ToolSearchLoad deferred tool schemasMaking additional tools callable when only their names are known
WriteCreate or replace a fileNew files or full rewrites

1. Agent

The Agent tool is what makes Claude Code feel more like a small operating system than a chatbot.

It can launch a subagent to handle a specific class of task. The tool description you shared includes several examples:

  • general-purpose
  • Explore
  • Plan
  • statusline-setup
  • claude-code-guide

This matters because not every task should be solved in the main thread.

If the model needs to:

  • explore a large codebase
  • create an implementation plan
  • research Claude Code documentation
  • handle a longer multi-step task autonomously

then an agent can take that workload and return a distilled result.

When Agent is a good fit

  • Open-ended repo exploration
  • Architecture planning
  • Research tasks that may require multiple passes
  • Specialized workflows with a dedicated subagent type

When Agent is not a good fit

The tool description is explicit here: do not use it for tiny, direct actions like:

  • reading one known file
  • looking for a specific class in a known location
  • searching 2 or 3 files where Read or Grep is faster

That is a good design choice. Delegation is powerful, but it has overhead.

2. Bash

Bash is the tool that lets Claude Code interact with the shell.

This is the bridge to the normal developer workflow:

  • running tests
  • building the project
  • checking git status
  • installing dependencies
  • using CLI tools like gh, npm, pytest, or hugo

But the most interesting part of the tool description is what it warns against.

It explicitly says Claude Code should avoid using shell commands for tasks that already have better dedicated tools. For example:

  • use Glob, not find
  • use Grep, not grep
  • use Read, not cat
  • use Edit, not sed
  • use Write, not shell redirection

That is not just a style preference. It makes the agent more structured, easier to review, and less likely to do sloppy file operations.

Best use cases for Bash

  • Run test suites
  • Start dev servers
  • Use git intentionally
  • Execute project-specific CLIs
  • Validate that changes actually work

Where people misuse it

A weak agent uses Bash as a hammer for everything.

A stronger agent treats Bash as the tool for execution, not for every file lookup or text replacement.

3. Edit

Edit is for precise modifications inside an existing file.

This is the tool you want when the file already exists and the change is local:

  • replace a function call
  • update a paragraph
  • rename a setting
  • patch a small code block

Instead of rewriting the entire file, Edit performs an exact string replacement.

That makes it safer for surgical changes, especially in large files.

The most important constraint is this:

  • Claude Code must read the file first

That is a sensible guardrail. Editing blind is how agents corrupt files.

4. Glob

Glob is the file discovery tool.

Use it when the question is:

  • Which files match this pattern?
  • Where are the Markdown posts?
  • Do we have any *.tsx files under src/components/?

Typical examples look like:

  • content/posts/*.md
  • src/**/*.ts
  • layouts/**/*.html

This is much cleaner than throwing a broad shell search at the repository.

If Read answers “what is inside this file?”, then Glob answers “which files should I inspect?”

5. Grep

Grep is the content search tool, and in Claude Code it is built on top of ripgrep.

This is one of the most important tools in any coding agent because code work usually starts with:

  • Where is this function used?
  • Which files mention this config key?
  • Where are API endpoints defined?
  • What code paths touch this component?

That is exactly what Grep is for.

One detail worth calling out from the tool definition is that Claude Code is supposed to use Grep for search tasks and not call grep or rg through Bash. The reason is simple: the dedicated tool is optimized for the agent environment, gives cleaner structured output, and is easier to control than a raw shell command.

It supports:

  • regex
  • file globs
  • file types
  • line-numbered output
  • context lines
  • count mode
  • multiline search

So it is not just “find a word.” It is a structured way to ask questions about the codebase.

How this is different from normal grep

At first glance, Grep looks like it is just the shell command grep with a capital G, but that is not really what is going on.

Here is how I think about the difference:

  • shell grep is a generic Unix command-line utility
  • Claude Code Grep is an agent tool with a defined schema and structured parameters
  • shell grep prints raw terminal output
  • Claude Code Grep lets the agent ask for modes like matching content, file lists, counts, line numbers, context, file-type filters, glob filters, and even multiline search
  • shell grep is just one command in a terminal session
  • Claude Code Grep is designed to work safely inside the tool system, with predictable output the model can reason over

So even though the name is familiar, the important difference is that Claude Code Grep is not just a plain shell invocation. It is a purpose-built search interface for the agent.

Simple mental model

  • Glob finds files by name
  • Grep finds text inside files
  • Read inspects the actual file contents

That trio is the backbone of code exploration.

6. Read

Read is the direct file inspection tool.

It can read:

  • source files
  • Markdown files
  • images
  • PDFs
  • Jupyter notebooks

That range matters because real software work is not limited to code. Sometimes the agent needs to inspect:

  • documentation
  • screenshots
  • diagrams
  • exported reports
  • notebook outputs

The tool description also encourages reading only the relevant slice of a large file when possible. That is another good pattern: gather the needed context without drowning in noise.

If I had to name the most fundamental Claude Code tool, I would probably pick Read.

Without good reading, every later action gets worse.

7. Skill

Skill is more like a reusable workflow layer than a raw file or shell tool.

The description says users may refer to a slash command such as:

  • /commit
  • /review-pr

and those map to skills.

So a skill is effectively a packaged capability that the agent can invoke inside the main conversation.

This is useful because some workflows are common enough to deserve their own interface:

  • reviewing a pull request
  • handling PDFs
  • running a commit workflow
  • invoking domain-specific helper routines

Instead of rebuilding the logic from scratch every time, Claude Code can call the skill directly.

That makes the system more modular.

8. ToolSearch

ToolSearch is a meta-tool.

It does not directly read files or modify code. Instead, it retrieves the schema definitions for deferred tools so they become callable.

That is a subtle but important idea.

Sometimes the environment only exposes a tool name at first, not the full callable definition. In that situation, the agent needs a way to say:

Load the real schema for this tool so I can use it properly.

That is what ToolSearch does.

This tool matters less in day-to-day coding than Read or Grep, but architecturally it is very interesting. It means the tool system itself can be partially lazy-loaded.

9. Write

Write is for creating a new file or replacing a file completely.

That makes it different from Edit.

Use Write when:

  • the file does not exist yet
  • the whole file needs to be regenerated
  • a complete rewrite is simpler than patching

Do not use it for small edits in an existing file unless a full rewrite is genuinely the cleanest option.

That distinction matters because full rewrites can accidentally wipe unrelated content, formatting, or hand-edited details.

Good agents prefer:

  • Edit for local changes
  • Write for new or fully replaced files

How These Tools Work Together

The real power of Claude Code is not any single tool. It is the sequence.

A typical workflow looks like this:

  1. Use Glob to find likely files
  2. Use Grep to locate the relevant code or text
  3. Use Read to inspect the exact context
  4. Use Edit or Write to make the change
  5. Use Bash to run tests, builds, or validation
  6. Use Agent if the task is large enough to delegate

That is a much better loop than:

  1. Guess
  2. Run shell commands blindly
  3. Rewrite too much
  4. Hope it works

I think the tool design is quietly teaching a workflow discipline.

The Most Important Design Pattern in Claude Code

If you step back, there is a clear philosophy in this tool list:

  • prefer structured tools over raw shell commands
  • prefer reading before editing
  • prefer targeted edits over full rewrites
  • prefer delegation only when the task is large enough

That is exactly the right direction for coding agents.

The more an agent can operate through typed, purpose-built tools, the easier it becomes to make it:

  • safer
  • more auditable
  • more predictable
  • less wasteful with context

This is the same reason modern software systems often replace vague text interfaces with stricter APIs.

Final Thoughts

Claude Code is not just “Claude, but in a terminal.”

What makes it useful is the combination of:

  • model reasoning
  • filesystem access
  • search tools
  • editing tools
  • shell execution
  • agent delegation

That is what turns it from a text generator into a coding workflow assistant.

If you understand these nine tools, you understand a big part of how Claude Code actually works in practice.

My biggest takeaway is simple:

The quality of the agent depends not just on the model, but on whether it chooses the right tool at the right time.