Skip to content
FlintFlintby Torch
← LevelsBuilder · B1

Files as context

Build-along · ~10 min at your own keyboard

Why it beats chat: Claude Code reads your actual files. Put three documents in a folder and ask questions that span them. Reading a file doesn't guarantee it read every line or read it right, so ask it to name the file and quote the line for each claim, and check two of them yourself. Confidently wrong answers come in two kinds, and they need opposite fixes. One kind is a wrong fact about the world: the model never knew it, or it changed after the model's training stopped (its knowledge cutoff). The fix is to give it the source, which is what this lesson does. The other kind is drifting from what's already in front of it: your file says Tuesday and it says Thursday. More files won't fix that; a shorter, fresher session will. Before you fix a wrong answer, check whether the right information was already loaded.

The long version: Working with files in Claude Code ↗

Mac: Mac: cd ~/Documents/your-folder in Terminal, then run claude.

Windows: Windows: in PowerShell run cd $HOME\Documents\your-folder, then claude. Paths use backslashes.

Do this

0/4

Checkpoints

  • ▸You should now see your 2-3 documents listed in the folder before you start claude.
  • ▸You should now see a paragraph that mentions details from more than one file.
  • ▸You should now see a new file or draft built from those documents.
The three ways this goes wrong
  • Claude says it cannot read a PDF or Word file. — Ask it to convert or extract the text first, or save the file as .txt or .md in the folder and try again.
  • The answer is generic and does not use your numbers or names. — You started claude in the wrong folder. Check the header path, exit, cd to the folder with the docs, and restart.
  • Claude only talks about one document. — Name the files in the question: 'compare keller-quote.docx with keller-contract.pdf.'

Where these ideas come from: Hallucination, Knowledge cutoff (AI Hero dictionary). Paraphrased here.

Share what happened

Paste: your cross-document question, the answer (or its key lines), which files it drew from, and which two quotes you checked against the files and whether they matched.

Strip API keys, passwords, and tokens before you paste. Swap them for [KEY].

🔒 Don't paste confidential, personal-health, or payment info.