mstack
01Plugin Claude Code
MStack — a Claude Code plugin for academic research. Opinionated role-based slash commands that walk a paper from idea to archive. Inspired by gstack.
Plugin Claude Code
MStack — a Claude Code plugin for academic research. Opinionated role-based slash commands that walk a paper from idea to archive. Inspired by gstack.
Plugin Claude Code
A Claude Code plugin for academic research — an opinionated set of role-based slash commands that walk a paper from idea to archive. Inspired by gstack.
Hook
Runs before the agent uses a tool for Write, Edit, MultiEdit, NotebookEdit and Bash tool calls, executing mstack-guard.py via python3. From matthewdigiuseppe/MStack.
Skill Claude CodeCodex
Generates 4-6 abstract variants with different positioning bets (puzzle-, policy-, theory-, finding-, anomaly-first), tags each with audience and risk, and recommends one for the target journal. Use when a full draft exists and the user wants the abstract written, improved, or reframed.
Skill Claude CodeCodex
Runs the primary specification and pre-specified secondaries in code/02-analyze.R and renders publication tables via modelsummary in code/04-tables.R. Use when the user asks to run the models, estimate the main results, or produce regression tables; the preregistration, if present, is the contract.
Skill Claude CodeCodex
Assembles the replication package — inventory, licenses, renv lockfile, replication README, clean-room rebuild that regenerates every table and figure from raw data — and stages the OSF/Dataverse upload. Use at acceptance or whenever the user asks for a replication or reproducibility package.
Skill Claude CodeCodex
Toggles warn-before-destructive mode for this paper — an MStack hook then requires confirmation before rm, git reset, force-push, or overwriting manuscript/output files. Use near deadlines or before autonomous work on a submission-ready paper; run with argument off to disable.
Skill Claude CodeCodex
Simulated coauthor read of the full draft — biggest hole, biggest distraction, biggest opportunity, one structural suggestion, a few line edits — as a skeptical methodologist, big-picture theorist, or junior reader. Use on a complete draft before the mock referee, or when the user wants tough feedback on the paper.
Skill Claude CodeCodex
Auto-generates data/codebook.md from the analytic dataset — per-variable stats plus flags for missingness, near-constants, duplicates, and implausible values. Use after cleaning stabilizes, when the user asks to document variables, or before analysis.
Skill Claude CodeCodex
Drafts the three-paragraph submission cover letter — fit to this journal, contribution, declarations — in 400 words or fewer. Use after a target journal is chosen, when the user asks for a cover letter or submission materials.
Skill Claude CodeCodex
Downloads and documents every raw data source with vintage, license, SHA-256 manifest, and a PROVENANCE.md log; restricted data gets a stub plus re-acquire script. Use at the start of empirical work, whenever the user pulls a dataset (V-Dem, WDI, COW, survey exports), or before any cleaning — /mstack:data-clean…
Skill Claude CodeCodex
Writes the reproducible raw-to-clean pipeline in code/01-clean.R — every join, drop, and recode logged with row-count checks — producing data/clean/analytic.rds. Use when the user needs to clean, merge, or recode data, build the analytic dataset, or fix a data issue (raw files are never edited).
Skill Claude CodeCodex
Chooses the research design (survey experiment, field experiment, RDD/IV/DiD, observational, qualitative) by scoring options on identification, validity, power, and cost — with an explicit plan B. Use after identification review, or when the user asks which design or method fits their question.
Skill Claude CodeCodex
Drafts one manuscript section (intro, theory, data, methods, results, discussion, abstract) to paper/sections/, in the user's configured writing voice, with numbers checked against output/ and no invented citations. Use when the user asks to write or revise any part of the paper.
Skill Claude CodeCodex
Locks writes to a single directory — an MStack hook denies edits anywhere else in the paper folder until /mstack:unfreeze. Use during R&R to protect submission/, or to fence Claude into one part of the project.
Skill Claude CodeCodex
Maximum-safety mode — /mstack:careful plus /mstack:freeze in one toggle, enforced by the MStack hook.
Skill Claude CodeCodex
Turns theory into operationalized, falsifiable hypotheses — statement, direction, magnitude, X/Y operationalization, and the pattern that would falsify each — with exactly one marked primary. Use before any data collection or analysis, before preregistration, or whenever the user drafts or revises hypotheses.
Skill Claude CodeCodex
Generates 4-6 genuinely different angles on the same data or topic — each with claim, contribution, identification sketch, cost, and risk — then ranks them. Use when the user has data or a topic but no committed question, wants alternatives before investing, or a red-light verdict sent them back to ideation.
Skill Claude CodeCodex
Methodologist prosecution of the identification strategy — states the identifying assumption, names concrete threats (selection, confounding, reverse causality, SUTVA, clustering), demands falsification tests, and issues a pass/fail verdict. Use before locking a design, before submission, or whenever the user asks…
Skill Claude CodeCodex
Scores 6-8 candidate journals on impact, fit, method receptivity, word limits, turnaround, and desk-reject risk, then sets a reach/realistic/backup tier in config. Use when the user asks where to submit or which journal fits the paper.
Skill Claude CodeCodex
Appends a paper-specific fact — variable names, conventions, design decisions, formatting preferences — to .mstack/learnings.jsonl so every later skill applies it. Use whenever the user states a convention Claude should remember, or repeats a correction twice.
Skill Claude CodeCodex
Systematic literature scan that finds the 3-5 must-engage papers, synthesizes the consensus and where it cracks, states the gap, and stages BibTeX into paper/refs.bib. Use after a research question is locked, when the user asks what to cite or who has written on a topic, or before drafting the intro or theory.
Skill Claude CodeCodex
Logs LLM-as-research-instrument use to a running ledger and compiles the GUIDE-LLM reporting checklist (Feuerriegel et al. 2026, Nature Human Behaviour) for your methods/SI. Use whenever an LLM is integral to the research design — text annotation/classification, simulated participants or in-silico experiments…
Skill Claude CodeCodex
Scaffolds a new MStack paper folder (paper/, data/, code/, output/, .mstack/ memory) from the plugin template, LaTeX or Quarto. Use when the user wants to start a new paper, project, or study — e.g. "set up a new paper on X" — or asks to run mstack-init.