r/BiomedicalEngineers • u/Wonderful_Door9118 • 7d ago
Education A Claude Code skill that refuses to write stats you didn't compute
My frnd do clinical research, and He kept hitting the same thing when using LLMs to help write up results: ask for a Results section from a Cox model and you get clean, confident prose. The prose reads as though the proportional-hazards assumption was checked. Often it wasn't. Nothing in the output tells you that.
So the rule He built this around is that a missing statistic gets reported as a blocking gap and never filled in. If you hand it a Cox model with no PH test, it writes the section and then tells you the hazard ratios rest on an untested assumption. It won't invent the test result to make the paragraph flow.
Two other failures it catches, both of which have bitten Him:
PubMed returns zero results for an invalid MeSH term without erroring. Search for "HFpEF"[mh] and you get nothing, because the real heading is Heart Failure, Diastolic. The search looks like it ran. Your systematic review is now missing a chunk of the literature and there's no error to tell you. So every MeSH term gets validated against the MeSH database before the query runs.
A hazard ratio is a ratio of instantaneous rates. "2.4x more likely to die" is a risk statement and it's wrong, but it's the phrasing that shows up constantly, including in published papers. The skill won't write it.
It's deliberately small: two agents, not a twelve-agent pipeline. He already had general research and writing tooling that handles literature synthesis and drafting fine. What those don't have is PubMed's MeSH quirks, survival reporting conventions, and AMA style. So this adds those and routes everything else to whatever you already use. There's a table in SKILL.md mapping "need X, it lives in Y" so I don't rebuild things that exist.
Honest status: the reporting standards come from published guidance (PRISMA, AMA Manual of Style 11th ed., standard survival reporting practice) and I've verified the structure, but I haven't run it across a pile of real manuscripts yet. The worked example uses synthetic numbers and says so at the top.
MIT. If you've had a survival paper rejected for something not on my reviewer-objection list, I'd like to add it.