πΊοΈ What is Claude Code?
Understand what this tool actually is β in plain English β before you touch a single command.
In this module
The honest question: why should I care?
You probably already know that AI tools like Claude, ChatGPT, or Gemini can help you write emails, summarise papers, or draft sections of text. That's useful. But here's the frustrating thing about those tools: every conversation starts from zero. You paste in your data, explain your project again, show your code, explain your conventions... every single time.
Claude Code is different. It lives inside your project. It can read all your files, run your code, make changes, and remember the context of your whole research project β all at once.
What is Claude Code, exactly?
Claude Code is a command-line tool (don't worry β we'll explain what that means in Module 1) made by Anthropic, the company that created Claude. It brings Claude's intelligence directly into your project folder on your computer.
How Claude Code works
Here's what makes it special β Claude Code can:
- Read any file in your project (data, code, notes, PDFs)
- Write and edit files (create scripts, fix bugs, update tables)
- Run commands on your computer (run a Stata script, execute Python code)
- Search through your entire codebase instantly
- Remember the full context of your project via your CLAUDE.md file
Web Claude vs. Claude Code
You might already use Claude at claude.ai. That's great. But there's a big difference:
π Claude on the web (claude.ai)
- Chat interface in your browser
- Good for: questions, drafting, explaining concepts
- No access to your files
- Starts fresh each conversation
- Can't run code or edit files directly
- Free tier available
⬑ Claude Code (terminal)
- Runs in your terminal, inside your project
- Good for: building, coding, analysis, automation
- Full access to all your project files
- Persistent context via CLAUDE.md
- Can run code, edit files, use tools
- Requires API key (see Module 1 for costs)
The big picture: how researchers use it
Researchers use Claude Code across the entire research pipeline. Here are the most common tasks:
- "Clean this messy household survey dataset β fix inconsistent labels, handle missing values"
- "Merge these three CSV files and flag where observations don't match"
- "Run a balance table across treatment and control groups"
- "My regression is giving weird standard errors β find the bug"
- "Create summary statistics tables formatted for LaTeX"
- "Check whether this data passes the parallel trends assumption"
- "Draft the data section of my paper based on this summary statistics table"
- "Rewrite this paragraph to be clearer and more concise"
- "Convert this results table into a LaTeX tabular environment"
- "Check my literature review for gaps given these 10 paper abstracts"
- "Write a referee response to these three reviewer comments"
- "Summarise the methodology from these three papers"
- "Explain what this do file does, step by step"
- "Convert this Stata code to R"
- "This loop is running too slowly β optimise it"
- "Write a scraper to download all PDFs from this website"
- "Build a Shiny app to visualise my results"
- "Document all functions in this script"
- "Set up a folder structure for a new research project"
- "Create a README for this project"
- "Rename all files to follow a consistent naming convention"
- "Write a makefile that runs the entire analysis pipeline"
- "Find all files where I hardcoded a file path that needs updating"
Real examples from economists
This course draws from real researchers who use Claude Code in their daily work:
Sant'Anna uses Claude Code to handle the full research pipeline. His key insight: "Claude Code is like having a tireless RA who never complains about tedious tasks." He uses it to write and debug code for difference-in-differences estimators, draft paper sections, and manage the project folder structure β all from his terminal.
Blattman uses Claude Code for research writing and iteration. His workflow involves using Claude Code to rapidly draft and revise paper sections, generate literature summaries, and get feedback on arguments β treating Claude as a collaborator that knows his project deeply.
Cunningham built custom Claude Code skills (reusable shortcuts) for econometrics tasks. His MixtapeTools collection includes skills for running DiD, RDD, and IV analyses, formatting results, and teaching causal inference β showing how you can create your own specialised research assistant.
What Claude Code cannot do
Things Claude Code cannot reliably do:
- Make causal claims β it can run the regression, but you decide if the identification strategy is valid
- Know your field β it knows a lot, but you know the relevant literature, context, and standards
- Guarantee correctness β always review what it produces, especially statistical code
- Replace replication β don't skip sanity checks just because Claude wrote the code
- Access paywalled papers β unless you paste in the content yourself
- Remember between sessions (without CLAUDE.md) β you need to set that up (Module 3)
Module 0 Exercise: Reflection
Before installing anything, take 5 minutes to think about your own research workflow.
- Write down 3 tasks in your research that are repetitive, annoying, or time-consuming.
- For each one, write a single sentence describing what you'd ideally want an AI assistant to do.
- Keep this list β you'll revisit it in Module 4 and turn it into real Claude Code prompts.
Example (from an agricultural economist):
Task: "Merging household survey rounds β always have to manually check IDs that don't match."
Ideal: "Claude reads both datasets and flags every ID that appears in Round 1 but not Round 2, with reasons."