Upload a folder to Claude
Claude's upload takes files, not folders, so the reliable way to send a whole project is one ZIP. Claude can open a ZIP with its code execution tool and read every file inside, folder paths included. Leave out node_modules, build output and .env first, so the upload is only code that matters.
Zip a folder for Claude without contextzip
If the project is in git, let git decide what's worth sending. From the project root:
cd my-appgit ls-files --cached --others --exclude-standard | zip ../my-app.zip -@cd my-appgit ls-files --cached --others --exclude-standard | Where-Object { Test-Path $_ } | Set-Content files.txttar -a -cf ..\my-app.zip -T files.txtRemove-Item files.txtgit ls-files lists every file git tracks plus new files you haven't committed, and skips anything in .gitignore. So node_modules/, .venv/ and build output stay out, and the folder structure is kept. Windows 10 and 11 ship tar, which can write a ZIP; the list goes through a file because PowerShell 5.1 garbles paths piped straight into it.
Check for secrets before you upload
This takes whatever git sees. A.env that isn't in .gitignore, or a key committed by mistake, goes into the ZIP. List the contents first with unzip -l ../my-app.zip or tar -tf ..\my-app.zip.Attach my-app.zip in Claude with the paperclip, or drag it into the chat.
Then tell the AI how to answer. Most of the pain comes later, when changed files come back as bare names and you have to work out where each one goes. Ask for full paths up front:
For every file you change or create, give the complete file, not a snippet.Put its full path from the project root on the first line,for example: // src/lib/auth.tsKeep the same folder structure. Don't move files to the root.The faster way: contextzip
Every AI session used to start with the steps above, and the next session started with them again. contextzip does them in one command. It works out what to leave out from your stack instead of from .gitignore alone, so it also skips lockfiles, minified bundles and binaries, and it keeps secret files out even when git tracks them.
1. Install it once. With Python 3.9 or newer, use pip (pipx and uv work too). Without Python, npm install -g @contextzip/cli, Homebrew or Scoop install the same tool.
pip install contextzip2. Package the project. Run cz from the project root. It detects your stack, leaves out dependencies, build output, caches, binaries and secret files, and puts the ZIP on your clipboard as a real file.
cz3. Paste it into Claude. Click the message box and press Ctrl+V (⌘V on a Mac). The ZIP attaches like any file you copied in your file manager. It also carries a short CONTEXTZIP.md that tells the AI how to reply: complete files, the same paths, secrets left as [REDACTED].
4. Write the answer back. Ask for the changed files as a ZIP, download it, and point cz apply-zip at it. Or drop it in .contextzip/inbox/ and run cz apply-zip with no arguments.
cz apply-zip ~/Downloads/reply.zipAI replies rarely come back in the shape you sent. A ZIP can arrive wrapped in an extra folder, relative to a subfolder (src/… for frontend/src/…), or flattened to bare file names. apply-zip matches each file to your project by the longest stretch of its path that agrees, and new files follow their siblings. A name that fits several files, like three different page.tsx, is settled by comparing contents. If it's still unclear, you choose. Nothing is written on a guess.
It also compares three versions of every file: what you sent, what's on disk now and what came back. Edits you made in the meantime are merged, not overwritten, and anything that clashes waits for you. How apply-zip works
~/projects/my-app
$ contextzip apply-zip
✓ Resolved · .contextzip/inbox/fix.zip
✓ Compared with snapshot #14 (k3f9a2) · named in the reply's CONTEXTZIP.md
Paths in the zip were remapped: my-app-fixed/… → …
✓ Classified 6 files · 1 modified, 1 merged, 1 new, 1 unchanged
! 1 conflict, 1 partial — needs your call
Only need Claude to see what you've changed? cz --git-changes packages just the staged, modified and untracked files. To send only the files for one task, cz -p "fix the login redirect" lets Gemini pick them from paths and sizes, never contents.
FAQ
- Can Claude read ZIP files?
- Yes, when code execution is available in the chat. Claude unpacks the ZIP in its sandbox and reads the files with their folder paths. If Claude says it can't open the archive, check that code execution is turned on in your settings.
- Can I drag a whole folder into Claude?
- Not as a folder. The upload takes individual files, and files attached one by one arrive without their folder paths, so Claude can't tell src/app/page.tsx from src/admin/page.tsx. A ZIP keeps the structure.
- What should I leave out of the ZIP?
- Dependencies like node_modules and .venv, build output, caches, lockfiles, binaries, and anything secret: .env files, private keys and cloud credentials. contextzip leaves all of these out by default, and redacts the values of a .env you include on purpose.
- Does contextzip upload my code anywhere?
- No. It writes the ZIP on your machine and puts it on your clipboard. You choose where to paste it. Packaging works offline and there is no telemetry.
- How do I get Claude's changes back into my project?
- Ask Claude for the changed files as a ZIP, download it, and run cz apply-zip on it. Each file goes to its real folder even if Claude flattened the paths, and anything you edited since is merged or left for you to decide.