From jamovi-module
Use when working in a jamovi module — R packages that define analyses through jamovi/*.a.yaml, *.r.yaml and *.u.yaml files, generated R/*.h.R classes and R/*.b.R R6 analysis bodies, jmvcore, or the jmc compiler. Covers module file anatomy, the .init()/.run() lifecycle, compiling, and cross-file conventions. The repo's own CLAUDE.md still governs project-specific details.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jamovi-module:jamovi-moduleThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill describes conventions common to every jamovi module. The current
This skill describes conventions common to every jamovi module. The current
repository's CLAUDE.md covers anything specific to this module (what it
does, its test commands, its analysis inheritance, its commit rules) and takes
precedence where the two differ.
A jamovi module is an R package that is also a jamovi module. Each analysis is therefore reachable two ways, and both must work:
jmv::ttestIS(data, ...)), andKeep this dual interface in mind: an analysis cannot rely on the UI being present, and error handling must read sensibly both as a jamovi notice and as a plain R error.
An analysis named <name> is defined across several files that belong together:
jamovi/<name>.a.yaml — options (the analysis arguments).jamovi/<name>.r.yaml — results definition: tables, columns, images,
groups, and their visibility rules.jamovi/<name>.u.yaml (+ jamovi/js/<name>.events.js) — the UI layout and
its interactive events.R/<name>.h.R — generated R6 Options and Base classes. Never edit
these by hand; they are overwritten on every compile.R/<name>.b.R — the analysis body: an R6 class inheriting <name>Base.
This is where you write code.When you change options or results, you edit the .yaml, not the .h.R.
The .h.R files are regenerated from the yaml definitions by the
jamovi-compiler (jmc). After editing any .a.yaml / .r.yaml / .u.yaml,
recompile so the generated classes match (commonly
jmc . --install-to <module>; check the module's package.json /
CLAUDE.md for the exact invocation). Treat R/*.h.R as build output: review
it, but don't hand-edit it.
The body class implements two phases driven by jmvcore:
.init() — runs before data is available. Build the result skeleton
here: create table rows/columns based on the chosen options and factor
levels. Anything whose shape is known without the data belongs in .init()..run() — data is available. Validate it, compute, and populate the
skeleton, e.g. table$setRow(rowKey=..., values=list(...)).A common mistake is computing in .init() or building structure in .run();
keep the split clean so partial/empty states render correctly.
These hold across analyses in a typical jamovi module:
toB64() before they go into R
formulas / model fitting, so special characters survive. Decode with
fromB64() for anything user-facing (table labels, messages).jmvcore::reject(.("message"), code=exceptions$dataError, ...). Rejections
surface as ordinary R errors for R users, so they are testable with
expect_error(...).jmvcore::Notice (often via a helper such as
setAnalysisNotice()), not warning()..() for translation:
.("Some text"). The .() lookup needs a self in scope — which is why
package-level helper functions often take a self argument even when they
otherwise wouldn't need one. Translation catalogs usually live in a
jamovi/i18n git submodule and are regenerated separately, so flag any new
translatable strings you introduce.jamovi R code conventionally uses:
= in named arguments: setRow(rowNo=i, values=v).if ( ! is.null(x)).There is usually no autoformatter — match the surrounding code. Defer to the
repo's CLAUDE.md if it states otherwise.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub raviselker/jamovi-ai --plugin jamovi-module