# My Claude Code Setup

Pedro H. C. Sant'Anna · Emory University
Actively developed and maintained. This summarizes how I use Claude Code for academic work — slides, papers, data analysis, and more. Adopted by 15+ research groups across economics, energy, political science, and engineering. I keep learning and updating these files.

A foundation for AI-assisted academic work using Claude Code. You describe what you want — lecture slides, a research paper, a data analysis, a replication package — and Claude plans the approach, runs specialized agents, fixes issues, verifies quality, and presents results — goal-first and gate-enforced. Like a contractor who handles the entire job, with you as the auditor of the disagreements the review loop surfaces. It is deliberately not an autonomous daemon: every loop is started by you or a skill, never on its own.

Read the full guide

## What's in the template

- Full academic lifecycle — not just slides: research papers, data analysis, Monte Carlo simulation studies, replication packages, proposals, and presentations
- Contractor mode via skills — you describe the task; Claude picks a skill (`/create-lecture`, `/review-paper`, `/qa-quarto`, …) that runs the orchestrator runtime internally: plan, implement, review with agents via fan-out → reduce → judge (with a post-judge hallucination gate), fix, re-verify, score against quality thresholds — looping until dry
- Beamer → Quarto pipeline — 11-phase translation with TikZ-to-SVG and ggplot-to-plotly conversion
- 18 specialized agents — proofreader, slide auditor, pedagogy reviewer, R reviewer, TikZ critic, domain reviewer, adversarial QA pair, translator, verifier, claim-verifier (Chain-of-Verification), the simulated-peer-review trio (editor, domain referee, methods referee), the Monte Carlo sim-reviewer, the CRAN-focused R package-reviewer, the AI-voice humanize-auditor, and the promote-memory council — all pinned to a fixed model + effort tier (no longer `inherit`)
- Adversarial critic-fixer loop — two agents that check each other's work and loop until dry (converge after 2 consecutive clean rounds; a 5-round cap is only a fallback) — the critic can't fix, the fixer can't approve
- Quality scoring with mandatory verification — every file scored 0–100; `/commit` halts below 80 (user can override with an explicit reason); skills that implement the orchestrator pattern verify every output before reporting done
- 52 slash commands + 32 context-aware rules + 7 hooks — `/compile-latex`, `/proofread`, `/deploy`, `/commit`, `/qa-quarto`, `/lit-review`, `/review-paper`, `/respond-to-referees`, `/new-diagram`, `/data-analysis`, `/simulation-study`, `/r-package-check`, `/audit-reproducibility`, `/checkpoint`, `/preregister`, `/replication-package`, `/disclosure-check`, `/grant-proposal`, `/syllabus`, `/triage-inbox`, and more — plus quality gates, TikZ prevention/measurement, notation consistency, R conventions, and the ambient prompt-shaping rule (no `/prompt` command)
- Simulated peer review — `/review-paper --peer <journal>` runs a full editorial pipeline: editor desk review, two blind referees with deliberately different dispositions (STRUCTURAL / CREDIBILITY / MEASUREMENT / POLICY / THEORY / SKEPTIC), editorial synthesis with FATAL / ADDRESSABLE / TASTE classification. Calibrated to 5 econ journals (AER / QJE / JPE / ECMA / ReStud) plus a template for adding your own field. Adapted from Hugo Sant’Anna’s clo-author with permission.
- Research workflow skills — `/lit-review` for literature synthesis, `/research-ideation` for hypothesis generation, `/interview-me` to formalize ideas, `/review-paper` for manuscript review, `/data-analysis` for end-to-end R analysis
- Smart hooks (7) — desktop notifications (macOS/Linux); pre-compaction context snapshots to session logs (DRAFT-block default ON); progressive context-usage warnings; `log-reminder.py` auto-writes the session log on every meaningful change-set; `git-guardrails.py` blocks dangerous git ops (`reset --hard`, `clean -f`, `push --force`, `add -A`); `claim-reconcile.py` flags stale numeric claims when scripts change; plus a real git pre-commit hook (`.githooks/pre-commit` via `./scripts/install-hooks.sh`) that runs the surface-sync + quality gates
- TikZ diagram pipeline — 8-snippet gallery (DAGs, DiD, event study, timeline, regression scatter, flowchart, supply-demand), `/new-diagram` scaffold with prevention pre-checks, production Beamer preamble with palette-synced Quarto theme, measurement-based collision audits via `tikz-reviewer`
- Plan-first workflow with continuous learning — non-trivial tasks start in plan mode; `[LEARN:tag]` corrections persist in MEMORY.md across sessions; plans survive context compression
- Research exploration workflow — structured `explorations/` sandbox with fast-track prototyping (60/100 threshold), simplified orchestrator for R/research, and merge-only quality reporting
- Automated session logging — a Stop hook (`log-reminder.py`) auto-writes the session log on every meaningful change-set rather than merely nagging; Beamer-Quarto sync enforced via auto-loaded rules
- 2026 features — effort levels for cost control, permission modes, expanded hook events, skill frontmatter (`effort`, `context: fork`), `/batch` for parallel refactoring, plugins, headless CLI mode, output-styles (academic-writing, referee), CI via `.github/workflows`, and scheduled Routines (`nightly-repro-check.sh`)
- Community ecosystem — extended by clo-author, claudeblattman, MixtapeTools, autoresearch, and ClaudeCodeTools — 15+ research groups have adopted this workflow

## Getting started

    # Fork this repo on GitHub, then:
    git clone https://github.com/YOUR_USERNAME/claude-code-my-workflow.git my-project
    cd my-project

Then start Claude Code and paste the starter prompt from the guide. Describe your project in 2–3 sentences and Claude will read all the configuration files, fill in the placeholders, and adapt the workflow to your use case.

The full guide walks through everything: setup, agents, quality gates, workflow patterns, and customization.

Read the full guide Copy the starter prompt

## Source

Everything is on GitHub: pedrohcgs/claude-code-my-workflow