Claude Code uses built-in tools to read, search (Grep, Glob) and edit files, showing you a diff before changes land. Type @ followed by a file or folder path to pull that exact content into the conversation and save Claude from searching.
Claude's built-in toolbox
Behind the scenes, Claude Code has a set of tools it can call. The ones you'll see most:
- Read: opens a file and reads its contents.
- Grep: searches inside files for text (e.g. every place a function is used).
- Glob: finds files by name pattern (e.g. all
**/*.test.jsfiles). - Edit: makes a precise change to part of a file.
- Write: creates a new file or replaces one entirely.
- Bash: runs terminal commands such as tests or builds.
Reviewing diffs
Before an edit is applied, Claude shows a diff: a before/after view where removed lines are usually red and added lines green. Read them! This is your quality checkpoint.
- Approve if it looks right.
- Reject and explain what to change if it doesn't.
- In VS Code or JetBrains, diffs appear in the editor's native diff viewer, which is easier to scan.
Pointing at files with @
Instead of making Claude hunt around, reference files directly with @:
Explain the logic in @src/utils/pricing.js
Compare @old/report.py with @new/report.py
What's in @docs/ ?
As you type @, Claude Code autocompletes paths. Referencing a file includes its contents; referencing a folder gives Claude a listing.
Explore before you edit
Good practice on any existing codebase:
- Ask Claude to find the relevant code ("where is VAT calculated?").
- Ask it to explain how that code works.
- Then request the change.
Claude explores incrementally: it searches for entry points, then follows the trail through imports. It does not need to read every file up front, and nor should it.
Check yourself
Three quick questions to check it stuck.
Ask the tutor
Stuck on something in this lesson? Ask the AI tutor. It answers from this lesson and points you to others that help. Answers are written by AI and can be wrong. Do not include personal details, passwords or company secrets.
Frequently asked
How do I reference a file in Claude Code?
Type @ followed by the file path, for example @src/app.js. Claude Code autocompletes the path and includes that file in the conversation.
What is the difference between Grep and Glob in Claude Code?
Grep searches the contents of files for text patterns. Glob finds files whose names or paths match a pattern, such as all .test.js files.
Does Claude Code show changes before applying them?
Yes. It shows a diff of proposed edits, and by default asks permission before modifying files so you can approve or reject.