Main
Main
Alessandro Spina1
March 2026
1
This talk is in the spirit of Robin Hood: everything is stolen with the intent to share. See linked
sources. All errors are mine.
Roadmap
2/76
1
Why should you care?
Why Should Academics Care?
For most of us, the bottleneck is not "I can’t write a loop in R." It is "I don’t have
time to clean this data, reformat these tables, write that referee report, and still
think carefully about identification." Claude moves the bottleneck back to where it
should be: thinking deeply about economic questions.
4/76
The Jagged Frontier
AI > Human
Human
AI < Human
5/76
Today’s Objective: Expose You to the Dark Side. . .
6/76
2
What is Claude Code?
What Is Claude Code?
Claude Code is an AI agent made by Anthropic that lives in your terminal and operates
directly on your project files.
8/76
Claude Code = LLM + Tools
Notes
Paper & logs
& slides
Project Questions
folder & tasks
delegates
tasks
Claude
9/76
Setup Claude Code
Prerequisites:
# 1. Install (one time, in 1. Git for Windows ([Link])
PowerShell) 2. A Claude Pro or Max subscription
$ irm [Link] | One command to install. Navigate to your
iex project and type claude. Describe what you
# 2. Close & reopen PowerShell want in plain English.
# 3. Navigate to your project Install methods change frequently — check
$ cd ~\research\asset_pricing [Link]/docs/en/setup.
$ claude
10/76
Claude Code — via Terminal
The Claude Desktop app provides a visual interface. When you toggle to Code mode, you’re
running Claude Code with a graphical wrapper around it instead of a raw terminal.
12/76
What Does It Cost?
13/76
The Alternatives
GitHub Copilot / Cursor — excellent for code completion inside an IDE. Less
suited to agentic workflows (running code, reading data, multi-file reasoning).
ChatGPT / Gemini — browser-based chat. Cannot read your files, run your
code, or remember project context across sessions.
OpenAI Codex CLI — similar agentic model to Claude Code. Newer, less ma-
ture ecosystem.
Claude Code — terminal-based agent that reads files, runs code, and builds
persistent memory via markdown. Strongest for research workflows that span
code, data, and writing.
The markdown-based memory system ([Link], skills, rules) means no vendor lock-in.
If you switch tools, your project knowledge transfers.
14/76
3
What can I use Claude Code for?
Things You Can Ask Claude to Do
5 Pull in data — web search, access APIs, download and clean datasets
6 Write — Draft sections? [Link]
And with Agent Teams, you can run all of these at once — multiple specialists working in
parallel, orchestrated by a coordinator.
16/76
Making Slide Decks with Claude
17/76
Personal Example: Rebuilding a Teaching Course
Upfront fixed cost, but going forward: one command to update the entire course for next
semester. Teaching admin time drops dramatically.
18/76
A Brief Aside. . .
19/76
The Cunningham Conjecture
R
Checking Code
ATT = -0.731842
Hallucination is akin to measurement error, and
the DGP for those errors are orthogonal across
languages. Stata
If Claude writes R code with a subtle bug, the Stata ATT = -0.731842
version will likely have a different bug — or none at
all.
Python
Ask Claude to replicate your R code in Python. If they ATT = -0.731842
produce identical results, you have high confidence the
code is correct. When they don’t match, you’ve caught a Match to 6 d.p.
bug that single-language review would miss.
20/76
Personal Example: Taming a Legacy Codebase
Refactor — re-write, label, embed notes, improve. Run old code and new code side-by-side,
2 check for differences, ask Claude to explain why
Translate — converted a co-author’s Matlab code into R. Not perfect (literal translation),
3
but helped me understand what he was doing
Update pipeline — new data arrives → re-run everything, generate updated figures/tables,
4
update Overleaf, flag significant changes. Automates boring, repetitive work
Institutional memory — Claude remembers how you cleaned the data, defined variables, ran
5 regressions. New scripts reference the right data automatically
The value isn’t Claude writing code faster. It’s having something that reads your entire
project and asks: “why are you clustering at the firm level?!”
21/76
Verification Through Visualization
“A table that says ‘ATT = −0.73’ is > "Make me a figure showing raw
ization that shows the wrong pattern date, separately for treated and
When the marginal cost of a figure is zero, you ask Quick sense checks — plot raw
for sense checks you’d never bother with otherwise. data before regression, every
time
New figure styles — skip Stack-
I was running an event-study on a large dataset. Asked
Overflow, describe what you
Claude to plot the key variable over time. Weird jumps want, populated with real data in
in the data. Claude dug into the raw data, found the minutes
23/76
Harnessing your own personal Editor
The Editor persona is a structured markdown file that tells Claude exactly how to audit your
paper’s prose, structure, and argumentation. A simple version of: [Link]
[Link]
24/76
Example: The Editor in Practice
Plan fixes — in a fresh session, feed the report to Claude. It creates an ac-
2
tion plan for each comment
Implement — work through each issue one by one. Skip anything that needs
3
more thought
This entire loop can be automated recursively using Agent Teams — the Critic/Fixer
pattern runs until the paper passes quality gates.
25/76
Since Getting Claude Code. . .
26/76
4
Setting up Claude Code
The Amnesia Problem
28/76
What Is a [Link] file?
How It Works
A [Link] is a short rulebook that Claude reads at the start of every session.
It contains your project overview, ground rules, key decisions, and current status —
everything Claude needs to hit the ground running.
The result: institutional memory persists even though Claude’s own memory does
not. Starting each session with “read the markdown files” gets you both back on
the same page.
Claude writes in markdown (plain text). LLMs have been trained to read and write
markdown easily. Great, if you want to switch model.
Tip: run claude init in any existing project to auto-generate a [Link].
29/76
Example
30/76
Setting Ground Rules
31/76
The Context Window Problem
Since new sessions start with zero memory, session logs let a fresh instance pick up exactly
where the last one left off.
33/76
5
Using Claude Code
Orient → Plan → Execute → Verify
35/76
Orienting Claude in Your Project
“I want you to read everything in this directory and understand the directory. At this
point do not make any changes to any files or folders. Simply read everything and
understand what is in there and where it is.” — Prompt
The Principle
Read first, act second. Before Claude writes a single line of code, it should
understand your project structure, your data, and your conventions (documented in
your .md files).
36/76
Building External Memory
38/76
Plan First, Then Execute
39/76
Staying in Control
“Claude is more or less like a reasonably trained Labrador retriever. It can rush
ahead, off its leash, and even though it will come back, it can get into trouble in
the meantime.” — Cunningham
The technique: Ask Claude to explain its Why this matters for finance:
understanding before it writes code: If Claude guesses wrong, that reveals a
> “Do you see the issue with this misunderstanding that needs correcting
specification?” before you proceed.
> “Before you run anything, ex-
plain what this regression identi-
fies.”
Cunningham, Claude Code series, 2026
40/76
Skills: Reusable Workflows
41/76
Example: /split-pdf
reading where Claude’s attention degrades and Data sources & sample
produces subtle hallucinations. Statistical methods
Key findings & contributions
The solution:
Acquire Split Read Extract Replication feasibility
download PDF 4-page chunks 3 at a time structured notes
[Link]
5/MixtapeTools/blob/main/.clau
de/skills/split-pdf/[Link]
42/76
Slash Commands
Slash commands are reusable prompts stored as markdown files. Type the command, Claude
reads the file and follows the instructions.
/newscript — creates a new .Rmd with naming convention, header, and
1
correct location
Think of commands as verbs: “do this specific thing now.” One command, one action.
43/76
Skills vs. Commands
Commands say “do this thing now.” Skills say “whenever this topic comes up, here’s
how we do it.”
44/76
Personas Tell Claude Who to Be
[Link]
What Is a Persona?
role + checklist + deliverables
A persona is a markdown file that defines a
role — tone, expertise, audit checklists, and Claude
structured deliverables.
adopts the role
e.g. “Referee #2” (skeptical, identification-
focused), “Copyeditor” (grammar and clarity Structured Output
above all). report, revisions, scores
Personas aren’t a formal Claude Code feature. People use the term to mean "a different set
of [Link] instructions that change how Claude behaves." The [Link] template
already is a persona — it defines how Claude should think and act.
45/76
Example: Specialist Inspectors for Your Work
[Link]
46/76
Using "The Editor" Persona
1 Generate the report — open a fresh session, run the Editor persona
Plan the fixes — in another fresh session, feed in the report and create an
2
action plan
Apply or skip — work through each issue; skip anything that needs more
3
thought
See Sant’Anna’s workflow for building separate agents for each step. [Link]
edrohcgs/claude-code-my-workflow
47/76
Rules: Path-Scoped Instructions
48/76
Rules vs. Skills
Files in .claude/skills/
Rules prevent bad behaviour. Skills teach good behaviour. Both automatic — you
never invoke them.
49/76
Agents
Agents (or sub-agents) are a more advanced feature where Claude spawns a separate
instance of itself to handle a subtask — for example, a “reviewer agent” that reads your
code and critiques it.
These are powerful but add complexity. We’ll cover them next.
50/76
Agents: Autonomous Workers
Report back
Orchestrator
55/76
Tier 2: The Disciple
Tier 2 = skills (how you do things) + commands (things you ask for) + rules (guardrails scoped to paths).
Build one at a time as you find yourself repeating instructions.
56/76
Tier 3: The Master
Tier 3 = agents (autonomous workers) + advanced skills (methodology expertise) + personas (mode-
switching) + cross-project commands. Only for power users.
57/76
Start Small
Most academics will get value from Tier 1 alone. A good [Link] and a reliable
progress log system is transformative compared to having nothing.
The Advice
Build Tier 2 components one at a time as you find yourself repeating the same instructions.
The worst thing you can do is build an elaborate system before you know which parts you’ll
actually use.
58/76
7
How to stay safe
AI Agents Can Go Wrong — How Do You Prevent This?
A Cautionary Tale
An AI agent asked to fix tests instead deleted all the tests, modified the test runner to
report 100% pass, and nuked the user’s email.
Scope access — only open Claude within a specific project folder. Never run
1
Claude from your home directory.
Write the rules down — use [Link] to specify what it can and cannot
2
do
Always use Plan mode — see what it wants to do, then approve it. Never
3
YOLO mode.
61/76
Global Settings: Controlling Access
62/76
Additional security: Running Claude in a Secure Sandbox
Your Computer
The Concern Files, data, secrets — untouched
63/76
8
Problems to be aware of
Your Data Leaves the Machine
66/76
9
Where to from here?
For the AI Skeptics. . .
The Automated Paper Engine (APE) project tests whether AI agents can autonomously
produce economics research — from idea to finished paper. [Link]
2 Startup costs (and actual $ costs) are non-trivial. The benefits take time.
70/76
Our Iceberg Is Melting
My (uninformed) take:
Output explosion — how do journals My Advice
respond? Referee process? Promotion
criteria? Is the 50-page paper obsolete? Start small. Pick one project (with
a backup). Set up a [Link]
ECR impact — agentic tools free re- file.
searchers to focus on questions, but may
hurt early-career researchers dispropor- These tools are here to stay.
tionately
71/76
Resources
72/76
Thank you.
[Link]/aspi6246/2026-Claude-Code-NewPr
oject 74/76
A Production Workflow: Sant’Anna’s 5-Phase System
Requirements
spec with MUST Claude works au- File-by-file quality 10 specialised Correct issues, re-
/ SHOULD / tonomously in scoring (0–100 agents review in score until quality
MAY priorities “contractor mode” scale) parallel gates met
The key shift: from iteration-heavy collaboration (you guide every step) to
autonomous execution within guardrails (Claude works independently, you verify).
75/76
Quality Gates & Adversarial Review
76/76