Ivan Mišić product · tech · ai

How Claude Code sees your files

JAN 10, 2026 · updated SEP 10, 2026 · 7 min · 1,248 words

on this page · 10

The folder where you start Claude Code is its main working directory. Claude can read files there as needed. You can add another directory with --add-dir or /add-dir, and access outside the working scope still follows the active permission rules.

Start in the Project Folder

Whatever folder your terminal is in when you type claude becomes the main working directory.

Let's use the practice folder we created earlier. Open your terminal and go to it:

In Windows PowerShell:

powershell
cd "$HOME\Documents\practice"

On macOS or Linux:

bash
cd ~/Documents/practice

Then start Claude Code:

bash
claude

Starting in practice keeps the session focused on that folder and its subfolders. Claude reads files when the task needs them. If another directory is required, add it explicitly and review the access you are granting.

For a first project, copying the required file into the project folder keeps access and versioning simple. For files that should stay elsewhere, add the directory explicitly or attach the file through the interface you are using.

Five Things Claude Can Do With Your Files

Once Claude is in your project folder, it can:

Read files
"What's in index.html?" or "Show me the contents of notes.txt." Claude opens the named file and reads what the task requires.
Create files
"Create a file called about.html with an about page in this project folder." Claude writes the file from scratch at the named location.
Edit files
"In style.css, change the background color to dark blue." Claude finds the file, finds the specific part, and changes it.
Organize and rename
"Rename all the .jpeg files to use .jpg instead" or "Move all images into a folder called assets." Claude rearranges things.
Search across files
"Find every file that mentions the word 'invoice'" or "Which CSS file controls the font size?" Claude searches through everything and tells you what it found.

Capability map showing Claude Code reading, creating, editing, organizing, searching, and inspecting images inside a project or explicitly approved paths

The five file actions above all stay centered on your project. Image inspection, explained below, uses the same boundary. Under the hood, Claude Code selects built-in tools such as Read, Write, Edit, Glob, and Grep; paths outside the project require explicit access. See the official tools reference.

You describe the file action in plain English, then review what Claude reads or changes.

The @ Shortcut

Sometimes you want to point Claude at a specific file. Instead of saying "look at the file called styles/main.css," you can use the @ symbol:

text
Look at @styles/main.css and tell me what colors are defined

The @ shortcut explicitly includes the referenced file in the conversation, so Claude does not have to find and read it first. That is useful when several files have similar names.

Beyond Single Files: Working With Groups

You can also use @ to reference a folder:

text
Look at everything in @notes/ and tell me what topics come up most often

An @notes/ reference adds the directory listing, not the contents of every file. Claude can then search and read the relevant files, so for a large folder ask it to report which files it inspected.

I use folder references for comparison, repeated formatting, and finding patterns across several files.

Pulling insights from scattered files is the obvious one. You have a folder of meeting notes, customer feedback, or research documents. Instead of reading them one by one, ask Claude to find the common threads. "What are people complaining about most?" "What requests keep coming up?" "Where do these documents contradict each other?"

You can also apply a consistent format. Say you have raw content and a template you like. Point Claude at both: "Rewrite @raw-notes.md using the structure from @my-template.md." The template becomes a reusable pattern.

Comparison works the same way. "Read @proposal-v1.md and @proposal-v2.md and tell me what changed." Or point at a folder of competitor websites you've saved and ask for a comparison.

Claude can search and compare several files in one task. For a large folder, I ask it to name the files it inspected so I can check the basis of the answer.

Showing Claude Images

Claude Code can also inspect a pasted screenshot or an image file.

Paste a screenshot with the shortcut supported by your terminal. Current defaults include Ctrl+V, Cmd+V in iTerm2, and Alt+V on Windows and WSL. You can also reference an image file by path.

For design work, provide the screenshot and describe which parts matter, such as layout, colours, or spacing. I would treat the result as a first version and review it against the reference.

You can also reference image files in your project:

text
Look at @mockup.png and build an HTML page that matches this design

Beyond design, images work for:

  • Screenshots of error messages (faster than typing them out)
  • Charts and graphs you want analyzed
  • Handwritten notes you want transcribed
  • UI mockups you want turned into code
  • Photos of whiteboards from brainstorming sessions

Use an image when the visual difference is easier to show than describe.

Finding Current Information

When WebSearch is available in the current environment, Claude Code can search the web when you need current information:

text
Check the current official documentation for this framework's form
validation. Cite the source and propose the change before editing.

Use this when the behavior may have changed. A cited proposal lets you check the source before applying it to your files.

Where Claude Puts Things

When location matters, name the destination in the prompt:

  • "Create pages/about.html" names a pages subfolder
  • "Create about.html in the project root" names the root explicitly
  • "Create a css folder and put styles.css inside it" creates the folder and file

Be specific about where things should go, especially as your project grows. "Create a file" is fine for practice. "Create pages/contact.html" is better for real work.

What Claude Remembers

File reads and tool results use the session's context window. Long sessions can be compacted, so do not assume every earlier detail remains equally available.

Claude Code saves CLI sessions locally. Start a new session when you want a clean task, or use claude --continue, claude --resume, or /resume when you want the previous conversation and tool history back.

Project files and instructions remain the durable record between sessions.

Real-World Example

My website is now close to a thousand files spread across more than a hundred folders. CSS files, PHP files, JavaScript, images, documentation.

When I need something, I'm specific: "Look at public/css/components/nav.css and fix the mobile menu animation." That path gives Claude a narrow place to inspect before it proposes the change.

But I can also go broad: "Search all CSS files for anything using the color green." Claude scans the CSS files and gives me a list. That is faster than checking each file manually.

I point Claude at one file for a narrow change and ask it to search the project when the location is not known.

Next up: how I make an instruction specific enough to review the result.

Sources

  • Tools reference, Anthropic. Defines the built-in file, search, web, and shell tools, their permission behaviour, and the limits on tool availability.
  • Common workflows, Anthropic. Explains that @file includes file contents while @directory includes only a directory listing, and documents image-path workflows.
  • CLI reference, Anthropic. Defines --add-dir, --continue, and --resume and their working-directory behaviour.
  • Interactive mode, Anthropic. Documents the current clipboard image shortcuts and interactive controls.
  • Manage sessions, Anthropic. Supports local session storage, continuation, resume, and the state restored when a session resumes.

Get Personalized Help

Copy this prompt to ChatGPT, Claude, or your favorite AI assistant. Fill in your details and get guidance tailored to your specific situation.

I read https://ivanmisic.net/blog/ai-tools/how-claude-code-sees-files about how Claude Code sees files from its working directory. Help me define the smallest safe file scope for my task.

My situation:
- Computer and project: [OPERATING SYSTEM, PROJECT TYPE, AND PROJECT FOLDER]
- Current location: [OUTPUT OF `pwd` OR THE WINDOWS EQUIVALENT, OR SAY UNKNOWN]
- Task and source files: [WHAT I WANT CLAUDE TO READ, CREATE, EDIT, SEARCH, OR COMPARE]
- External paths and sensitivity: [FILES OUTSIDE THE PROJECT, PRIVATE DATA, SECRETS, OR NONE]

Tell me where to start Claude Code and which paths it actually needs. Prefer the project folder over a broad parent directory. If another directory is necessary, explain whether I should copy a safe source into the project, reference a file directly, or explicitly add the directory, including the access trade-off.

Give me:
1. the exact navigation and verification commands for my platform;
2. the minimal working-directory and additional-path plan;
3. a ready-to-paste first prompt that names the action, source, destination, and success check;
4. when an `@file`, `@directory`, image path, or project search is appropriate;
5. a review checklist for every created, edited, moved, or renamed file.

Do not suggest copying secrets or sensitive source material into the project. Do not assume an `@directory` reference includes every file's contents. If the task could overwrite, move, or delete files, make the first step a report or preview and wait for approval.