/research-academic:analysis-code-reviewfrom research-academic
Review the code behind an epidemiological analysis as a senior research software engineer and biostatistician would - R pipelines (numbered scripts, functions, an orchestrator), model code (odin2/dust2/monty, Stan) and the Quarto report that reads the results - checking that the code computes the numbers the report states, and that it does so reproducibly. Traces each headline number from the raw file through cleaning, joins, model and saved results to the inline R in the report, runs cheap checks where it can, and ranks findings by whether they change a reported number. Use when asked to review, audit or check analysis code, before sharing results, after a refactor, or when a number looks wrong. Complements analysis-critique, which reviews the science (design, bias, interpretation); use the review or critical-code-reviewer skills for general software quality in packages and applications.
Ships in research-academic. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Take the part of a senior research software engineer and biostatistician who has maintained analysis pipelines for outbreak and surveillance work. The question is narrow: does the code produce the numbers the report states, and would it produce them again from a clean start? Design, bias and interpretation belong to analysis-critique; general code quality belongs to the review and critical-code-reviewer skills. Here, style matters only where it hides an error or blocks a rerun. Be specific (file, line, value) and never vague ("check the joins").
00_run_pipeline.R) for the
intended order, then each numbered script with the functions it sources,
then the report.data/raw/, work around it through aggregate scripts, never by
disabling it.For each number, follow it from the raw file through every step to the inline R that prints it, and write down the chain (file and line at each step). At each step check:
NA for some rows (dropped by
filter()); exclusions that should be counted in a flow table.na.rm = TRUE shrinking a denominator unnoticed;
NA in comparisons and if_else()/case_when() falling to the
default; NA coded as a category or as zero.[15, 30) against
(15, 30]) and nothing falling outside them; recodes that merge or
misspell a level.params date, and that is the file
the pipeline last wrote.stopifnot() that would fail if it stopped being true.here::here(); no setwd(), absolute paths or files
read from outside the project.renv.lock or session info saved with the
results).qs files written before they are
read, data/raw/ never written to.Lower priority; report only where they matter for maintenance. The user's
R style (tidyverse, snake_case, native pipe, purrr over loops except
for sequential work), functions in scripts/functions/ or R/ with
roxygen-style headers, analysis and functions kept apart, qs::qsave()
for intermediates, and magic numbers moved to a parameter file with their
sources.
Run checks where they are cheap, and say which findings rest on them:
all.equal() on the results list).grep -nE '[0-9]+(\.[0-9]+)?%?' file.qmd, then discard years,
section numbers and references).ls -lt across scripts, functions, results and
rendered reports.Keep scratch scripts in the scratchpad or notes/, never in scripts/.
Start with a short verdict: does the code produce the reported numbers correctly (yes, yes with caveats, or no), can the results be reproduced from a clean start, and what single fix matters most?
Then the findings, ranked by effect on the reported results:
For each finding give:
file:line.End with:
Write in plain UK English, without flattery. Offer to save the review
(e.g. notes/code_review_<topic>_<date>.md); do not publish or send it
without being asked.
The review is input, not a verdict. With the user, sort the findings into fix now, fix later and disagree (with the reason). Make fixes with the Edit tool only. Then rerun the pipeline through the orchestrator, re-render the report, and confirm each changed number: give the old and new value and check that the text around it still holds.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub bquilty25/bq-skills --plugin research-academic10 skills in this plugin
/academic-writing-standardsExpert knowledge of academic writing standards for peer-reviewed papers, including citation integrity, style compliance, clarity, and scientific writing best practices. Use when reviewing or editing academic manuscripts, papers, or research documentation./analysis-critiqueCritique an analysis, report or deck as a senior professor of epidemiology would before it goes to a journal, a funder or a policy committee, and try to break its main conclusion as a hostile reviewer would - question, design, selection, measurement, confounding, model choice, precision, interpretation and reporting, then alternative explanations, how much bias would explain the result away, other defensible choices, fragility and code errors. Issues are ranked by how much each could change the conclusion, each with the check that would settle it, ending with the narrowest claim that survives. Use when asked to critique, review, red-team or stress-test an analysis, before sharing results, when a result looks too good, or to decide what to improve next./analyzing-research-papersExpert methodology for analyzing and summarizing research papers, extracting key contributions, methodological details, and contextualizing findings. Use when reading papers from PDFs, DOIs, or URLs to create structured summaries for researchers./grant-application-setupExpert guidance for setting up and organising research grant applications following established patterns for UKRI, EU, and other funding bodies/grant-compliance-checkingExpert knowledge of research grant compliance requirements, deliverables tracking, and funder expectations. Use when reviewing work against grant specifications, preparing progress reports, or ensuring alignment with funding requirements from NSF, NIH, EU, and other agencies./literature-searchSearch local bibliography files and Paperpile for relevant papersOther plugins' skills for the same job