pedrohcgs/claude-code-my-workflow
A ready-to-fork Claude Code template for academic research — papers, data analysis (R, Stata, Python), slides and teaching — with multi-agent review, enforced quality gates and replication protocols. Codex and Antigravity can use it too.
claude-code-my-workflow — What This Project Is
A ready-to-fork template for using Anthropic's Claude Code (a coding assistant that runs in your terminal) to do academic work — lecture slides, research papers, data analysis, replication packages. The author extracted it from a real PhD course and shared it so others can copy it and adapt it to their own research.
The Core Idea
Instead of writing a perfect prompt, you state a goal (e.g., "create slides for this lecture") and Claude Code plans the approach, runs specialized helper agents, fixes problems, verifies quality, and presents results — like a contractor who handles the whole job. You stay in charge as the auditor; it is not an autonomous background daemon.
What You Get
- 18 specialized review agents — each checks one dimension: grammar/typos (proofreader), slide layout (slide-auditor), teaching quality (pedagogy-reviewer), R code quality (r-reviewer), field-specific correctness (domain-reviewer), plus a manuscript peer-review pipeline (domain-referee, methods-referee, editor).
- Adversarial QA — a "critic" agent produces harsh findings; a "fixer" implements exactly those findings. They loop until two consecutive rounds surface nothing new (5-round cap as fallback).
- Quality scoring (0–100) — 80 = commit threshold, 90 = pull-request threshold, 95 = aspirational excellence. Below threshold halts the workflow.
- Real gates, not reminders — one command (
./scripts/backtest.sh) runs 11 checks: skill integrity, link resolution, repo hygiene, a ledger verifying each check was tested against a planted defect, a hook battery that re-fires every guard hook, cross-platform portability, and more. A pre-commit hook runs these gates plus the quality check on every commit. - Context survival — a PreCompact hook saves a snapshot before Claude's auto-compression;
MEMORY.mdaccumulates learnings across sessions;/compress-sessiondistills long conversations into structured notes. - Verification discipline —
/verify-claims(fresh-context verifier that can't self-confirm),/audit-reproducibility(cross-checks every numeric claim against the script output that produced it),/humanize(detects AI-voice tells),/review-paper --peer(runs multiple referees and reports a decision distribution, not a single verdict).
Quick Start (5–10 minutes)
- Fork & clone — but note: forking a public repo keeps it public. For unpublished work (papers, data), use "Use this template" and set the new repo to Private.
- Run
./scripts/validate-setup.sh— reports exactly what's missing with install links. - Start Claude Code, paste the starter prompt from the guide, describing your project in 2–3 sentences.
- Verify with the included
HelloWorlddemos (/compile-latex HelloWorld,/deploy HelloWorld), then delete them and start real work.
Requirements
- Minimum: Claude Code, git, Python 3 (Python runs the hooks and gate suite; pre-installed on macOS/Linux).
- For the HelloWorld demos only: XeLaTeX (slides) and Quarto (documents).
- Recommended: R and the GitHub CLI.
- If you only need Python/R/markdown, you can skip LaTeX/Quarto entirely — the agents, rules, and orchestration patterns work for any text/code artifact.
Safety & Guardrails
- Deny rules refuse destructive git commands (
git reset --hard,git clean,git push --force,git add -A, whole-tree checkouts) and reads/edits of.env,*.pem,*.key,credentials*files. - A
dirty-tree-guardhook refuses merges/pulls/rebases while tracked files have uncommitted changes. - The README is honest about limits: these are guards on what Claude usually produces, not a security boundary; nothing recovers uncommitted edits or untracked files.
License & Community
MIT-licensed, actively maintained (see CHANGELOG). A growing community has built extensions (clo-author, claudeblattman, MixtapeTools, autoresearch, ClaudeCodeTools). Full documentation lives at psantanna.com/claude-code-my-workflow.
Bottom line: a turnkey system for AI-assisted academic writing and analysis, with enforced quality gates, adversarial review, and reproducibility checks — designed to be forked and customized for your own research.
Related
- Project
- Project
- Project
- Project
- Project