Implement Hayes PROCESS mediation and moderation models transparently via lavaan and bruceR, with bootstrap CIs, index of moderated mediation, Johnson-Neyman regions of significance, and APA-formatted output that matches familiar PROCESS tables. Maps model numbers (1-24) to inspectable lavaan syntax instead of black-box macros.
SkillScore59Maintained
Automatic
◆Research pack
Last verified 8/9/2026
What it changes
Passed 12 of 21 test cases with the skill, and 9 of 21 without it.
Without skill41%
With skill59%
Checks it passed that the model alone missed
Suggests /robustness as a next step
Generates a Johnson-Neyman plot for regions of significance
Recommends at least 10000 bootstrap draws for publication submissions
and 2 more in the full report
4 fixed9 passed either way9 still failing0 broke
Pass-rate lift
+18 pp
Tokens
+37%
Agent turns
0%
Response time
-30%
Model gemini-3.6-flashMeasured 8/9/2026v113 of 22 cases passed with skill · 21 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 4
Prompt
After running our PROCESS Model 4 mediation analysis, where specifically should the generated summary tables and coefficient outputs be saved in the project repository, and in what file formats?
What was checked, without and with the skill
Checked
Without skill
With skill
Specifies output/tables/process-results.html as an output destination path
Missed
Passed
Specifies output/tables/process-results.docx as an output destination path
Missed
Passed
case-07 · gemini-3.6-flash · 8/9/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md133 lines4 files
/process-model — PROCESS Mediation/Moderation
You translate the PROCESS model the researcher has in mind into transparent, reproducible lavaan code. Researchers in business and marketing think in "Model 4" and "Model 14" — your job is to give them exactly that, but with inspectable code instead of a black-box SPSS macro.
Every indirect effect gets bootstrap CIs. Every moderation gets a Johnson-Neyman plot. Every model produces output that looks like the PROCESS tables researchers know, but backed by lavaan syntax they can read and modify.
How to run a PROCESS model
Step 1 — Read context
Follow _shared/project-discovery.md to find the project.
Read:
Pre-registration — what model was planned? What are X, M, Y, W variables?
Codebook — variable names, types, scale ranges
EDA results — distributions, correlations of key variables
Cleaned data — data/processed/
Step 2 — Load principles and references
Read references/principles.md, references/criteria.md, and references/hayes-models.md.
Step 3 — Identify the model
Determine:
Model number (1-24) or structural description
Variables: X (IV), Y (DV), M (mediator(s)), W (moderator(s)), covariates
Bootstrap draws: default 5000 (minimum 10,000 for publication)
Confidence level: default 95%
Map to the lavaan syntax from references/hayes-models.md.
Present the model specification to the researcher for confirmation before running.
Step 4 — Mean-center continuous moderators
Before fitting:
Mean-center all continuous moderators (W, Z) — reduces multicollinearity with interaction terms
Do NOT center the IV (X) or mediator (M) unless specifically requested
Run the proofreading protocol on academic writing — papers or manuscripts. Checks grammar, typos, layout issues, consistency, and academic writing quality. Produces a report without editing files. Make sure to use this skill whenever the user wants surface-level writing errors found — not substantive academic critique. Triggers include: "proofread", "check for typos", "grammar check", "look for errors in my draft", "proofread all", "polish this", "check my writing", "are there any mistakes", "pr