A Git-centric, AI-friendly project template for academic research
npx skills add https://github.com/fuzhiyu/researchprojecttemplate --skill zotero-paper-readerCLI を使用してこのスキルをインストールし、ワークスペースで SKILL.md ワークフローの使用を開始します。
A project setup and workflow designed for academic research collaboration, centered around Git and optimized for AI assistance.
Key Features:
See ProjectExample/ for structure reference and Setup for automated setup.
Projects use a two-folder structure:
MyProject/ - Git repository containing code, final figures/tables, and LaTeX documentsMyProject-Share/ - Dropbox-synced folder with data, notes, and intermediate outputsFolders from MyProject-Share/ are symlinked into MyProject/, so you work in one place with access to everything.
Why two folders? Solves the Git vs. Dropbox dilemma: Dropbox lacks proper version control and handles conflicts poorly, while Git struggles with large files. By linking folders together, you get Git's version control + Dropbox's file sharing while working seamlessly in one place.
Working with non-Git users: you can also clone the repo into the MyProject-Share folder, so they can work just as usual. Because it is shared via Dropbox, you can access all the code and handle Git on their behalf.
MyProject)Code/ - All analysis scripts and implementation
DataCleaning.Figures/ - Final presentable charts, plots, and visualizations that we want to track the version with gitTables/ - Final presentable result tables and summary statistics that we want to track with gitPaper/ - The LaTeX folder containing the draftSlides/ - The LaTeX folder containing slidesMyProject-Share)Notes/ - Research notes and documentationData/ - Raw and processed datasets. Typically read-only.Output/ - Generated results and intermediate files
Code.Clone and create project:
git clone https://github.com/FuZhiyu/ResearchProjectTemplate.git
cd ResearchProjectTemplate
./create_project.sh YourProjectNameOrPath
Share with coauthors:
YourProjectName-Share/ via Dropboxcd YourProjectName && git remote add origin <url> && git push -u origin main./setup_mac.shWe use Git for version control and GitHub for collaboration. Git helps us track changes, work simultaneously without conflicts, and maintain a complete history of our research progress. Tons of tutorials on Git can be easily found online, so here we briefly explain two key concepts, commit and pull request, and focus more on best practices in academic research.
Why isn't Dropbox/Overleaf version history enough? Version control isn't just "save every copy"—it's about organizing changes meaningfully. Thousands of timestamped versions don't help you understand what changed or easily recover specific states.
A commit is a snapshot of your project at a specific point in time. Each commit has:
When you make changes to files, Git tracks what's different from the last commit. You can then "commit" these changes to create a new snapshot. This allows you to see exactly what changed between different versions.
Commit very often - Essential before AI edits. AI can mess things up, but frequent commits let you experiment safely knowing everything can be recovered.
Descriptive messages - "Fix typo in table 3" not "fix stuff" for easier change tracking.
Rule 1 >> Rule 2 - Rules 1 and 2 conflict since detailed messages add commit burden. Prioritize frequent commits over detailed messages. Better to have cryptic messages than no checkpoints.
Tips for lazy messaging:
One topic per commit - Keep commits focused on single changes rather than bundling multiple topics.
.csv, .xlsx, .parquet).aux, .log, .tmp)The standard "commit code, not output" rule is less clear for academic research. Exercise discretion:
Remember: MyProject-Share/ files aren't tracked by Git.
Use VSCode's Python Interactive Window for cleaner Git management—write .py files with cell-by-cell evaluation.
If using notebooks: clean outputs before committing, save copies with outputs to the output folder.
We will use Pull Request (PR) workflows for collaboration. Here is an accessible guide on how the PR workflows work.
PRs solve co-editing conflicts: when multiple coauthors work simultaneously, how do we merge safely?
The solution: coauthors branch out, work independently, then merge back. Git handles non-conflicting changes automatically; conflicting edits are resolved during the PR process.
A typical PR workflow works as follows. The introduction here uses terminal commands, though all these can be done with GUI, or simply with AI.
Start new work:
git checkout main
git pull origin main # Get latest changes
git checkout -b feature/julie-regression-analysis # branch out
Do your work: Edit files, run analysis, create figures
Save your progress (do this frequently):
git add .
git commit -m "Add regression tables for main specification"
Push to GitHub:
git push -u origin feature/julie-regression-analysis
Create Pull Request:
(On VSCode source control panel, the button that looks like merge can directly create a pull request)
Review process:
Merge: Once approved, click "Merge pull request". We recommend choosing squash and merge which combines all the updates in a single commit in main to keep the timeline clean.
Clean up:
git checkout main
git pull origin main # Get your merged changes
git branch -d feature/julie-regression-analysis # Delete old branch
Projects include CLAUDE.md and AGENTS.md (symlink for Codex compatibility) with AI coding principles:
Output/, not Figures/Tables/The template includes specialized Claude agents in .claude/agents/:
code-reviewer - Reviews code changes for academic research quality, style consistency, and potential issuesreport-checker - Validates research reports and documentation for completeness and accuracyresults-summarizer - Creates comprehensive summaries of analysis results after outputs have been generatedUsage: Agents are invoked automatically by Claude Code when appropriate, or can be requested explicitly.
The template includes specialized Claude skills in .claude/skills/:
pdf - PDF processing toolkit for extracting text/tables, creating PDFs, merging/splitting documents, and handling fillable formsmistral-pdf-to-markdown - Convert PDFs (including scanned documents) to Markdown using Mistral OCR API with image extractionzotero-paper-reader - Read and analyze academic papers directly from your Zotero library, with automatic PDF-to-Markdown conversionwork-summary - Create factual working journal entries in Notes/WorkingJournal/ after completing analysis workUsage: Skills are automatically available in Claude Code. Example: "Use the zotero-paper-reader skill to read the paper about liquidity from my library"
The template configures Model Context Protocol (MCP) servers in .mcp.json:
Configuration:
Notes/.env and fill in your API keys:
.mcp.json if needed (all env vars are read from Notes/.env)Note: Notes/.env is in the shared folder (not tracked by Git), so your API keys are never committed to version control
The project uses uv for Python environment management, which is installed by the setup script.
Packages installed by default:
Quick uv commands:
uv sync - Install all required dependencies from pyproject.tomluv run <command> - Run any command with project environment (e.g., uv run python script.py, uv run jupyter notebook, uv run pytest)uv add package - Add a new dependency. Instead of using pip, this is the more robust way to ensure dependencies are shared across the team.uv remove package - Remove a dependencyThe setup script configures uv to place virtual environments in ~/.venvs/MyProject rather than within the project folder. This keeps the project directory clean and ensures consistent environment paths across different machines.
Technical note: The rationale for putting the .venvs folder outside of the project folder is that project folders are often synced via Dropbox across different machines. uv uses hard-link/clone for the Python environment, which will be broken by Dropbox sync, resulting in multiple copies of the same package across different projects (highly space inefficient). Moving it out of Dropbox solves this issue.
The setup script creates a .venv symlink in your project pointing to ~/.venvs/MyProject. VS Code and other tools automatically detect this symlink and use the correct environment—no manual configuration needed.