by pedrohcgs
A ready-to-fork Claude Code template for academics using LaTeX/Beamer + R. Multi-agent review, quality gates, adversarial QA, and replication protocols.
# Add to your Claude Code skills
git clone https://github.com/pedrohcgs/claude-code-my-workflowGuides for using ai agents skills like claude-code-my-workflow.
Last scanned: 6/11/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-06-11T08:46:29.001Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}No comments yet. Be the first to share your thoughts!
30 days in the Featured rail · terms & refunds
Actively maintained. A summary of how I use Claude Code for academic work — slides, papers, data analysis, and more — packaged so you can fork it for your own research. See CHANGELOG.md for the latest changes.
Live site: psantanna.com/claude-code-my-workflow
A ready-to-fork foundation for AI-assisted academic work. 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. Like a contractor who handles the entire job. Extracted from a production PhD course and extended by a growing community.
Before you start: Claude Code + git are the minimum. To run the included
HelloWorlddemos end-to-end you also need XeLaTeX (Beamer sample) and Quarto (Quarto sample). R and the GitHub CLI are recommended. Python 3 is used by a few internal scripts (check-palette-sync.py,check-tikz-prevention.py) and is pre-installed on macOS/Linux. Full list in Prerequisites below. Fastest path: clone first, then run./scripts/validate-setup.sh— it reports exactly what's missing with install links.Only need Python/R/markdown? You don't need XeLaTeX or Quarto. The agents, rules, skills, and orchestration patterns work for any text/code artifact. Skip the
HelloWorlddemos and head straight to/data-analysis,/review-paper,/lit-review, or/review-r.Session 2 onwards: MEMORY.md (committed) collects generic
[LEARN]entries that help all forkers;.claude/state/personal-memory.md(gitignored) is for machine-specific notes. See.claude/rules/meta-governance.mdfor the distinction.
# Fork this repo on GitHub (click "Fork" on the repo page), then:
git clone https://github.com/YOUR_USERNAME/claude-code-my-workflow.git my-project
cd my-project
./scripts/validate-setup.sh # reports missing tools with install links
Replace YOUR_USERNAME with your GitHub username.
claude
Using VS Code? Open the Claude Code panel instead. Everything works the same — see the full guide for details.
Avoid prompt fatigue. Out of the box, Claude Code asks permission for every tool invocation. After the first few approvals, toggle Auto-accept edits mode (a keybinding; see the permission modes section of the guide) or run
claude --permission-mode acceptEdits. For fully-autonomous runs on a trusted repo, Bypass mode skips prompts entirely. The template's.claude/settings.jsonpre-approves ~100 common Bash and Edit/Write patterns, so even at default permissions most work is unattended.
Then paste the starter prompt from the guide, filling in your project details:
I am starting to work on [PROJECT NAME] in this repo. [Describe your project in 2–3 sentences.] I've set up the Claude Code academic workflow... Please read the configuration files and adapt them for my project. Enter plan mode and start.
The full guide has the complete starter prompt with all the details.
What this does: Claude reads all the configuration files, fills in your project name, institution, and preferences, then enters contractor mode — planning, implementing, and (within the skill you invoke) running the review + verify loop. You approve the plan, invoke a skill, and the skill handles the rest within its scope.
Heavily adapting CLAUDE.md for a non-academic project? Anthropic's built-in
/initcommand will re-derive aCLAUDE.mdfrom your codebase as a starting point. The pre-shipped CLAUDE.md in this template already covers the academic setup — you only need/initif your fork diverges substantially (e.g., a Python/ML project that doesn't use LaTeX or Quarto).
Before building real lectures, confirm your environment works:
./scripts/validate-setup.sh # Checks XeLaTeX, Quarto, Python, git, etc.
Then inside Claude:
/compile-latex HelloWorld # Compiles Slides/HelloWorld.tex to PDF
/deploy HelloWorld # Renders Quarto/HelloWorld.qmd to HTML
If both succeed, delete Slides/HelloWorld.tex and Quarto/HelloWorld.qmd and start on your real work.
You don't craft a perfect prompt — you state a goal and let the work loop toward it under gates. Specialist agents do the labor; enforcing gates decide when it's good enough; you adjudicate the disagreements they surface. Three things make that trustworthy:
./scripts/install-hooks.sh once) runs the surface-sync + quality (≥80) checks on every commit — bypassing the skill no longer bypasses the review. A git-guardrails hook blocks destructive git (reset --hard, clean -f, push --force, add -A); the review runtime re-checks any reviewer-introduced "fatal" finding before it counts.orchestrator-protocol.md.EXPLAINED and carried into your response-to-referees, while genuine errors stay fail-closed.This is not an autonomous daemon — the loop is always you- or skill-initiated, and you stay the auditor. Scheduled Routines handle recurring chores (nightly reproducibility, weekly lit-delta, inbox triage) and notify only when they find something.
You describe a task. For complex or ambiguous requests, Claude first creates a requirements specification with MUST/SHOULD/MAY priorities and clarity status (CLEAR/ASSUMED/BLOCKED). You approve the spec, then Claude plans the approach and invokes the right skill (e.g. /create-lecture, /qa-quarto, /review-paper --adversarial). That skill implements the orchestrator runtime internally — implement, verify, review, fix, re-verify, score — and returns a summary when the work meets quality standards. Say "just do it" and it runs the full loop; commits still require an explicit /commit (which the pre-commit hook then gates).
Instead of one general-purpose reviewer, 18 focused agents each check one dimension. A representative sample:
/review-paper --peer)Each is better at its narrow task than a generalist would be. The /slide-excellence skill runs the slide-review agents in parallel; /review-paper --peer runs the paper-review pipeline. The same pattern extends to any academic artifact — manuscripts, data pipelines, proposals.
Two agents work in opposition: the critic reads both Beamer and Quarto and produces harsh findings. The fixer implements exactly what the critic found. They loop until dry — converging when a round surfaces no new issue (a 5-round cap is the fallback, not the primary stop). This catches errors that single-pass review misses.
Every artifact gets a score (0–100). Scores below threshold halt the workflow and surface the findings — the user decides whether to fix or explicitly override:
Framing honesty: Thresholds are advisory at the harness level — the
/commitskill runs quality checks and halts on failure. And as of v2.0, running./scripts/install-hooks.shonce installs a real pre-commit hook (.githooks/pre-commit) that runs the surface-sync + quality (≥80) gates on every commit, so bypassing the skill no longer bypasses the review. Opt out per-commit withSKIP_QUALITY_GATE=1orgit commit --no-verify.
Plans, specifications, and session logs survive auto-compression and session boundaries. The PreCompact hook saves a context snapshot before Claude's auto-compression triggers, ensuring critical decisions are never lost. MEMORY.md accumulates learning across sessions, so patterns discovered in one session inform future work.
For forced compression (long pipelines, mid-plan handoffs), /compress-session (v1.9.0) distils the conversation into a structured note — decisions, next actions, and discarded-as-noise — instead of letting auto-compaction truncate. /promote-memory (v1.9.0) periodically harvests generic learnings from gitignored personal-memory.md to committed MEMORY.md via a five-critic council.
Multiple complementary verification layers run b