Statistics Skill Creator
This skill does not itself run any statistical test. It builds a new, standalone
SKILL folder for one — matching the shape of references/skill-procedure.md — by
interviewing the user for the procedure-specific details that template leaves as
placeholders, then writing the filled-in files to disk.
Never invent the statistical substance (assumptions, non-negotiable rules, which test
to use, alpha) and numerical values (output) on your own. Formatting-only choices
may get a stated default. See "How to ask" below.
Step 0 — Identify the procedure
Read the user's request for what test/procedure this skill is for (e.g. "paired
t-test", "linear regression", "one-way ANOVA", "model selection"). If it isn't stated, ask.
The underneath question is only asked during the skill-creation process, but not in
the new skill.
Before asking anything else, ask the client:
Are there any publicly available references (papers, textbooks, methodology guides,
etc.) I should rely on for the methods, assumptions, code, or interpretation in this
analysis?
This question is shown as the first question for the SKILL-creation process.
After getting the user's response, AI should access and read the references before
asking any other questions regarding specific methodologies or details for
the task.
If the client names one or more usable references, follow up (still before moving on
to anything else) with:
What citation format would you like these listed in — APA, MLA, Chicago, or another
style? And could you give me the author(s), year, title, and publisher/journal/URL
for each, for whatever isn't already implied by what you gave me?
Format every citation exactly in the style the client picks, filling in only the
fields they confirm — never invent an author, year, or venue that wasn't given or
confirmed. Record the finished, formatted citations in the new skill's
references/paper.md now, at creation time — this is a one-time step, not something
the finished skill repeats per run.
Because the references are now fixed at creation time, the generated skill must
not re-ask its own end users the references question at all when it later runs —
see "Building in the references question" below for exactly how Step 0 and Step 5
change in that case. If the client has no references to offer, skip the
citation-format question entirely and keep the generated skill's standard per-run
references question (unchanged, see Branch B below).
Also, read references/skill-procedure.md in full before
proceeding — it is the master template every generated skill is built from.
Note: read through both references and references/skill-procedure.md before asking
any other qustions.
Step 1 — Interview the user, section by section
Walk the sections of references/skill-procedure.md in order. For each, use what the user has
already provided, e.g. references; for anything missing, give a concrete suggestion
and ask a direct question before writing that section. Do not silently assume
anything that changes the statistical result.
| Section in the template |
What you need |
If missing, ask |
Suggestion you may offer |
Frontmatter (name, description) |
Skill name (kebab-case) and 3–5 trigger phrases/keywords |
"What should the skill be called, and what phrases should trigger it?" |
Derive name from the test (e.g. paired-t-test); propose trigger keywords from common synonyms for the test |
| Non-negotiable rules |
Hard rules that must hold on every run |
"Any rules that must always hold — e.g. always report effect size, two-sided unless stated, flag small n?" |
Suggest 1–2 field-standard rules for that test family, but confirm before locking them in |
| Inputs |
What data/arguments the test needs, and their roles (response vs. predictor, paired vs. independent, raw vectors vs. a data frame) |
"What inputs does this test take, and what format are they in?" |
Infer the minimal argument set from the test's standard R implementation, then confirm |
| Assumption decisions |
Whether the client or AI Agent need to verify the assumptions |
"Would you like to review and decide on each assumption by yourself, or should AI Agent do this for you?" |
If all assumptions could be verified using numerical values computed, then AI Agent could be a better decision maker, however, if plots are more important, then it is better to let clients/users decide |
| Step 1 — Validate Inputs |
Hard requirements: data types, NA handling, minimum sample size, variable coding |
"How should invalid input be handled — reject, or coerce/warn?" |
Default: reject with a clear message; disregard NAs unless told otherwise |
| Step 2 — EDA |
Which tables/plots are relevant given the variable types |
Usually derivable from variable types already gathered; ask only if variable roles are still unclear |
Continuous covariate → scatterplot vs. response; categorical covariate → boxplot vs. response (see references/eda.md) |
| Step 3 — Assumptions |
The full list of implicit and explicit assumptions for this specific test, and how each explicit one is checked |
"What assumptions does this test require, and how should each be checked?" — never invent this list; statistical correctness depends on it; relevant details might appear in references provided |
Offer the textbook list for that test family (e.g. t-test: independence, normality, equal variance) — user confirms or corrects |
| Step 4 — Execute R Code |
Which R function/package implements the test, and how many distinct task scripts are needed |
"Which R function implements this (e.g. stats::t.test, survival::coxph)? Does this skill need more than one variant (e.g. one test path per assumption outcome)?" |
Default to one task_codeN.R per distinct decision branch (e.g. Fisher's exact vs. chi-square) |
| Step 5 — Output |
Single-level (general) report, or hierarchical (brief/moderate/detailed)? What extra tables/plots (beyond EDA) belong in Results? |
Always give the explanation below before asking, then ask: "Do you want a general output level, or hierarchical output?" |
If hierarchical is wanted, use references/hierarchical.md's content instead of the template's flat Step 5 — see Step 2 below |
| Step 5 — Result type(s) |
The distinct kinds of result this test's report can present (e.g. hypothesis-testing decision, effect/coefficient interpretation, predicted values) |
"For this procedure, what output should the report contain — a hypothesis-testing decision, an effect/coefficient interpretation, or should the finished skill ask the end user each time it runs?" |
Offer the standard options for that test family, around two to three suggestions (e.g. regression: fitted-model interpretation vs. hypothesis testing) |
| References |
Whether the client has real, citable references to bake in now, and if so, which citation format (APA/MLA/Chicago/...) and what author/year/title/venue details to format them with |
Step 0's opening question, then (only if references were offered) the citation-format follow-up |
If references are supplied, format and store them now in references/paper.md and drop the generated skill's per-run references question entirely; if not, the generated skill keeps asking its own end users every run — see "Building in the references question" below |
| Examples |
1–2+ worked examples with the input and the expected conclusion; if the client supplies an actual data file (CSV, etc.) for one, that file itself |
"Can you give an example input and what conclusion it should produce?" — user-supplied examples are preferred, since they reflect real cases this skill needs to get right |
If the user has none ready, don't block on it — propose your own (see below) for them to confirm or edit. If a real data file is supplied, save it into the new skill's data/ folder and reference it by path (data/<name>.csv) instead of inlining values; skip the data/ folder entirely if no file was ever supplied |
| Validation |
A small set of examples covering an edge case, a deliberately invalid input, and at least one valid case (refer to references/validation.md's scaffold); reuse any data file(s) from Examples where applicable |
Reuse the Examples answers; if they only cover the valid/typical case, ask specifically: "Should I also draft an edge case and an invalid-input case for validation, or do you have ones in mind?" |
Suggest one (see below) for each missing category. Point validation inputs at data/<name>.csv rather than restating raw values whenever a data file already exists in the new skill's data/ folder |
| Folder Storage |
Where the newly created SKILL folder should be saved (e.g. desktop/doanloades, etc.) |
"Where in your device would you like the SKILL folder to be saved?" |
".../Downloades", ".../Desktop", etc.) |
Suggesting examples when the user has none
Worked examples are optimally user-supplied — they reflect real cases the skill must
handle correctly. But don't let a blank answer stall the interview: propose your own,
grounded in the procedure and inputs already agreed on, and ask the user to confirm,
edit, or swap them out. For each suggested example, state the input values and the
conclusion you'd expect the finished skill to produce, so the user can sanity-check it
rather than invent one from scratch. Cover, where relevant:
- A typical/valid case (feeds both
## Examples and validation's "valid inputs" row).
- An edge case (small sample size, a boundary value, a tie, near-zero variance,
zero-value in some levels of the categorical variable if permitted, etc. —
whatever is relevant to this test).
- A deliberately invalid input (wrong type, missing required field, mismatched
lengths) to confirm Step 1's validation behavior.
Never mark a suggested example as accepted without the user confirming it — an
unconfirmed guess at the "expected outcome" would make references/validation.md's
correctness check meaningless.
Explaining the output-level choice
Every time you reach the Step 5 question, explain it in these terms (adapt the wording,
keep the substance) before asking which the user wants — don't just name the two options:
Hierarchical output aims to trade off depth against speed at the moment the user
request a result, instead of being locked into one fixed report. The user would
pick from three levels: brief (one paragraph — method, assumptions,
key numbers, and the decision, no tables or plots), moderate (keep all from brief, adds
background, a key plot, and a key table), or detailed (keep all from moderate,
adds a plain-language interpretation, term definitions, and caveats for a
non-statistical reader). A general output level skips this choice entirely
and always returns one fixed report format.
Then ask which one they want. If hierarchical, confirm the content should still follow
references/hierarchical.md's scaffolding (don't invent a different leveling scheme).
Building in the result-type question
Different users of the same finished skill often want different things from the same
procedure — one wants a formal hypothesis-testing decision, another just wants the
fitted model and coefficient interpretation, another wants both. Never bake in one
fixed result type as a silent default. Unless the test family genuinely has only one
kind of result to report (confirm this with the user rather than assuming it), the
generated SKILL.md's own Step 5 must open with an explicit question to its end
user, e.g.:
Before presenting any outputs, ask the client which of the following the report
should contain, if not already stated: (1) [effect/coefficient interpretation], (2)
[hypothesis-testing decision], ... — fill in with the real options for this
procedure, agreed on with the user during this interview. Suggest two to three options.
This is a per-run question the finished skill asks every time it produces a report,
not a one-time choice made now. Confirm with the user during this interview which
options belong in that list.
Building in the references question
Whether the generated skill asks its own end users for references depends on what
happened in this creation interview — pick one branch, not both.
Branch A — the client supplied usable references during this interview. Do not
carry any references question into the new skill — its end users are never asked.
Instead:
- The citations, already formatted in the client's chosen style, live in the new
skill's
references/paper.md (filled in per the citation-format follow-up above).
- The new
SKILL.md's Step 0 uses skill-procedure.md's Variant A wording (skip
straight to "Extract Inputs" — no question asked).
- The new
SKILL.md's Step 5 References section is unconditional: it always lists
the pre-baked citations from references/paper.md, since they're fixed and don't
depend on anything happening at run time.
Branch B — the client had no references to offer. Keep the current, unchanged
behavior: the generated skill must ask its own end user for references before
anything else, as the opening of its Step 0 (skill-procedure.md's Variant B).
Carry the wording through verbatim:
Are there any publicly available references (papers, textbooks, methodology guides, websites, PDFs,
etc.) I should rely on for the methods, assumptions, code, or interpretation in this
analysis?
- Publicly available source named or url provided → use its actual content for
assumptions, methods, code, and results this run, and record it in
references/paper.md.
- Named source is not publicly available → reply with exactly: "The resource(s)
provided is not public available and Claude does not have access. You could
manually provide relevant contents later, or rely on Claude's suggestions." Then
continue with the rest of the run using standard, field-default assumptions.
- No references offered → continue using standard, field-default assumptions.
This is a per-run ask in Branch B only, not one-time. Whatever is confirmed usable that
run flows straight into that run's Step 5 References section (or the hierarchical
moderate/detailed levels' References section, if hierarchical output was chosen) —
Step 5 does not ask about references a second time.
In both branches, include references/paper.md in the new skill's references/
folder (even close to empty in Branch B) so there's somewhere to record citations.
Step 2 — Generate the files
Create a new folder named after the skill (e.g. paired-t-test/), sibling to
statistics-skill-creator/, containing:
SKILL.md — copy references/skill-procedure.md's structure verbatim, with every
section from Step 1 filled in. If hierarchical output was requested, delete that
template's flat Step 5 — Output and paste in references/hierarchical.md's content instead
(per the instructions inside that file); otherwise keep the flat version and delete
the "Optional for Step 5" block. For Step 0, keep exactly one of the two variants
per "Building in the references question": Variant A (no question, References
section always shown) if the client supplied usable references this interview,
otherwise Variant B (today's per-run question, unchanged). Delete the
<!-- AUTHORING NOTE --> comments and the variant you didn't use, and the
# Validation steps section is kept (it's meant to ship with the finished skill, just
hidden from regular users, per its own text).
references/eda.md, references/assumptions.md, references/guide.md,
references/validation.md — filled in for this procedure. references/paper.md is
always included (per the fixed references policy above) — pre-populate it with any
real citable methodology sources the user names during this interview, formatted in
their chosen citation style; do not include this section if the user did not provide any
specific references.
data/ — only if the client supplied an actual data file (CSV or similar) used for
a worked example or a validation case. Copy the file(s) in as provided, keeping the
given filename (e.g. data/patient_outcomes.csv), and point ## Examples and
references/validation.md's example inputs at that relative path (e.g. "Input:
data/patient_outcomes.csv") instead of restating raw values inline. If no data
file was ever supplied, skip this folder entirely — don't create an empty one.
scripts/eda_code.R, scripts/diagnostic.R, scripts/task_code1.R (renumber/add
more as decided in Step 1) — real, runnable R code implementing what was discussed,
not placeholder comments. Each task_codeN.R follows the
validate_inputs → check_assumptions → run_test → report_conclusion
structure already scaffolded in the template, with a main_functionN that prints a
full conclusion paragraph to stdout.
Use the existing scaffold files in this folder as the literal source for what to
copy and adapt — do not re-derive their structure from scratch.
Step 3 — Self-check before delivering
Before telling the user the skill is ready, verify:
- Every
references/..., scripts/..., and data/... path mentioned inside the new
SKILL.md and its reference files actually exists in the new folder (open each file
and grep for references/, scripts/, and data/ to confirm — this exact class of
bug, a path pointing at a file that doesn't exist, is what shipped in this template
before it was fixed).
- If no data file was ever supplied during the interview, confirm no
data/ folder
was created and no data/... path was left in any file.
- Exactly one references variant survives: if references were supplied this
interview,
references/paper.md has the formatted citations, Step 0 asks no
question, and Step 5's References section is unconditional; otherwise Step 0 keeps
its per-run question and Step 5's References section stays conditional on it. No
leftover trace of the other branch (e.g. an unused question, or a hard-coded
References section with nothing behind it).
- No leftover placeholder text remains (
[...], TODO, e.g. scaffolding, bracketed
instructions).
- The YAML frontmatter is valid (opens and closes with
---, has name and
description keys) and description is under 1,024 characters.
SKILL.md is under 500 lines.
- Every assumption and non-negotiable rule traces back to something the user actually
confirmed in Step 1, not something assumed.
Report back concisely: the new folder's path, what was created, and anything the user
should double check (e.g. an R package to install).
Step 4 — Self-check before delivering
Do not randomly save the created folder in the device. Ask the client where the
folder should be saved, so the client knows where exactly to find the folder.
How to ask
- Batch related questions together rather than one at a time.
- Lead with a concrete suggestion, then ask for confirmation or correction — don't
present an open-ended blank.
- The suggestions should base on the contents in references if provided.
- Skip questions the user's original request already answered.
- Formatting-only defaults (decimal places, table style, alpha = 0.05) may proceed
with a stated default unless the user objects — these don't need to block progress
the way statistical substance does.
1---2name: statistics-skill-creator3description: Interviews the user and builds a brand-new statistics-analysis SKILL folder (SKILL.md, references/, scripts/) by filling in the template at references/skill-procedure.md section by section with details specific to the statistical test or procedure requested. The created SKILL validates inputs, checks assumptions, runs the authoritative R computation, and writes a stakeholder-ready report. Trigger this skill creator whenever the user asks to create, build, or scaffold a SKILL for a statistical test or procedure, wants to turn a stats method into a reusable Claude skill, or says things like "new skill", "skill-procedure", "make this a skill". Also trigger on the skill's own name, statistics-skill-creator.4---56# Statistics Skill Creator78This skill does not itself run any statistical test. It builds a **new, standalone**9SKILL folder for one — matching the shape of `references/skill-procedure.md` — by10interviewing the user for the procedure-specific details that template leaves as11placeholders, then writing the filled-in files to disk.1213Never invent the statistical substance (assumptions, non-negotiable rules, which test14to use, alpha) and numerical values (output) on your own. Formatting-only choices 15may get a stated default. See "How to ask" below.1617## Step 0 — Identify the procedure1819Read the user's request for what test/procedure this skill is for (e.g. "paired20t-test", "linear regression", "one-way ANOVA", "model selection"). If it isn't stated, ask.2122The underneath question is only asked during the skill-creation process, but not in23the new skill.24**Before asking anything else**, ask the client:2526> Are there any publicly available references (papers, textbooks, methodology guides,27> etc.) I should rely on for the methods, assumptions, code, or interpretation in this28> analysis?2930This question is shown as the first question for the SKILL-creation process.31After getting the user's response, AI should access and read the references before 32asking any other questions regarding specific methodologies or details for 33the task.3435If the client names one or more usable references, follow up (still before moving on36to anything else) with:3738> What citation format would you like these listed in — APA, MLA, Chicago, or another39> style? And could you give me the author(s), year, title, and publisher/journal/URL40> for each, for whatever isn't already implied by what you gave me?4142Format every citation exactly in the style the client picks, filling in only the43fields they confirm — never invent an author, year, or venue that wasn't given or44confirmed. Record the finished, formatted citations in the new skill's45`references/paper.md` now, at creation time — this is a one-time step, not something46the finished skill repeats per run.4748Because the references are now fixed at creation time, the generated skill must49**not** re-ask its own end users the references question at all when it later runs —50see "Building in the references question" below for exactly how Step 0 and Step 551change in that case. If the client has no references to offer, skip the52citation-format question entirely and keep the generated skill's standard per-run53references question (unchanged, see Branch B below).5455Also, read [`references/skill-procedure.md`](references/skill-procedure.md) in full before56proceeding — it is the master template every generated skill is built from.5758**Note**: read through both references and `references/skill-procedure.md` before asking 59any other qustions.6061## Step 1 — Interview the user, section by section6263Walk the sections of `references/skill-procedure.md` in order. For each, use what the user has64already provided, e.g. references; for anything missing, give a concrete suggestion 65and ask a direct question before writing that section. Do not silently assume 66anything that changes the statistical result.6768| Section in the template | What you need | If missing, ask | Suggestion you may offer |69|---|---|---|---|70| Frontmatter (`name`, `description`) | Skill name (kebab-case) and 3–5 trigger phrases/keywords | "What should the skill be called, and what phrases should trigger it?" | Derive name from the test (e.g. `paired-t-test`); propose trigger keywords from common synonyms for the test |71| Non-negotiable rules | Hard rules that must hold on every run | "Any rules that must always hold — e.g. always report effect size, two-sided unless stated, flag small n?" | Suggest 1–2 field-standard rules for that test family, but confirm before locking them in |72| Inputs | What data/arguments the test needs, and their roles (response vs. predictor, paired vs. independent, raw vectors vs. a data frame) | "What inputs does this test take, and what format are they in?" | Infer the minimal argument set from the test's standard R implementation, then confirm |73| Assumption decisions| Whether the client or AI Agent need to verify the assumptions| "Would you like to review and decide on each assumption by yourself, or should AI Agent do this for you?" | If all assumptions could be verified using numerical values computed, then AI Agent could be a better decision maker, however, if plots are more important, then it is better to let clients/users decide |74| Step 1 — Validate Inputs | Hard requirements: data types, NA handling, minimum sample size, variable coding | "How should invalid input be handled — reject, or coerce/warn?" | Default: reject with a clear message; disregard `NA`s unless told otherwise |75| Step 2 — EDA | Which tables/plots are relevant given the variable types | Usually derivable from variable types already gathered; ask only if variable roles are still unclear | Continuous covariate → scatterplot vs. response; categorical covariate → boxplot vs. response (see `references/eda.md`) |76| Step 3 — Assumptions | The full list of implicit and explicit assumptions for this specific test, and how each explicit one is checked | "What assumptions does this test require, and how should each be checked?" — **never invent this list; statistical correctness depends on it; relevant details might appear in references provided** | Offer the textbook list for that test family (e.g. t-test: independence, normality, equal variance) — user confirms or corrects |77| Step 4 — Execute R Code | Which R function/package implements the test, and how many distinct task scripts are needed | "Which R function implements this (e.g. `stats::t.test`, `survival::coxph`)? Does this skill need more than one variant (e.g. one test path per assumption outcome)?" | Default to one `task_codeN.R` per distinct decision branch (e.g. Fisher's exact vs. chi-square) |78| Step 5 — Output | Single-level (general) report, or hierarchical (brief/moderate/detailed)? What extra tables/plots (beyond EDA) belong in Results? | Always give the explanation below *before* asking, then ask: "Do you want a general output level, or hierarchical output?" | If hierarchical is wanted, use `references/hierarchical.md`'s content instead of the template's flat Step 5 — see Step 2 below |79| Step 5 — Result type(s) | The distinct kinds of result this test's report can present (e.g. hypothesis-testing decision, effect/coefficient interpretation, predicted values) | "For this procedure, what output should the report contain — a hypothesis-testing decision, an effect/coefficient interpretation, or should the finished skill ask the end user each time it runs?" | Offer the standard options for that test family, around two to three suggestions (e.g. regression: fitted-model interpretation vs. hypothesis testing)|80| References | Whether the client has real, citable references to bake in now, and if so, which citation format (APA/MLA/Chicago/...) and what author/year/title/venue details to format them with | Step 0's opening question, then (only if references were offered) the citation-format follow-up | If references are supplied, format and store them now in `references/paper.md` and drop the generated skill's per-run references question entirely; if not, the generated skill keeps asking its own end users every run — see "Building in the references question" below |81| Examples | 1–2+ worked examples with the input and the expected conclusion; if the client supplies an actual data file (CSV, etc.) for one, that file itself | "Can you give an example input and what conclusion it should produce?" — user-supplied examples are preferred, since they reflect real cases this skill needs to get right | If the user has none ready, don't block on it — propose your own (see below) for them to confirm or edit. If a real data file is supplied, save it into the new skill's `data/` folder and reference it by path (`data/<name>.csv`) instead of inlining values; skip the `data/` folder entirely if no file was ever supplied |82| Validation | A small set of examples covering an edge case, a deliberately invalid input, and at least one valid case (refer to `references/validation.md`'s scaffold); reuse any data file(s) from Examples where applicable | Reuse the Examples answers; if they only cover the valid/typical case, ask specifically: "Should I also draft an edge case and an invalid-input case for validation, or do you have ones in mind?" | Suggest one (see below) for each missing category. Point validation inputs at `data/<name>.csv` rather than restating raw values whenever a data file already exists in the new skill's `data/` folder |83| Folder Storage| Where the newly created SKILL folder should be saved (e.g. desktop/doanloades, etc.)| "Where in your device would you like the SKILL folder to be saved?" | ".../Downloades", ".../Desktop", etc.) |8485### Suggesting examples when the user has none8687Worked examples are optimally user-supplied — they reflect real cases the skill must88handle correctly. But don't let a blank answer stall the interview: propose your own,89grounded in the procedure and inputs already agreed on, and ask the user to confirm,90edit, or swap them out. For each suggested example, state the input values and the91conclusion you'd expect the finished skill to produce, so the user can sanity-check it92rather than invent one from scratch. Cover, where relevant:9394- A typical/valid case (feeds both `## Examples` and validation's "valid inputs" row).95- An edge case (small sample size, a boundary value, a tie, near-zero variance, 96 zero-value in some levels of the categorical variable if permitted, etc. —97 whatever is relevant to this test).98- A deliberately invalid input (wrong type, missing required field, mismatched99 lengths) to confirm Step 1's validation behavior.100101Never mark a suggested example as accepted without the user confirming it — an102unconfirmed guess at the "expected outcome" would make `references/validation.md`'s103correctness check meaningless.104105### Explaining the output-level choice106107Every time you reach the Step 5 question, explain it in these terms (adapt the wording,108keep the substance) before asking which the user wants — don't just name the two options:109110> Hierarchical output aims to trade off depth against speed at the moment the user 111> request a result, instead of being locked into one fixed report. The user would112> pick from three levels: **brief** (one paragraph — method, assumptions, 113> key numbers, and the decision, no tables or plots), **moderate** (keep all from brief, adds114> background, a key plot, and a key table), or **detailed** (keep all from moderate, 115> adds a plain-language interpretation, term definitions, and caveats for a 116> non-statistical reader). A **general** output level skips this choice entirely 117> and always returns one fixed report format.118119Then ask which one they want. If hierarchical, confirm the content should still follow120`references/hierarchical.md`'s scaffolding (don't invent a different leveling scheme).121122### Building in the result-type question123124Different users of the same finished skill often want different things from the same125procedure — one wants a formal hypothesis-testing decision, another just wants the126fitted model and coefficient interpretation, another wants both. Never bake in one127fixed result type as a silent default. Unless the test family genuinely has only one128kind of result to report (confirm this with the user rather than assuming it), the129generated `SKILL.md`'s own Step 5 must open with an explicit question to *its* end130user, e.g.:131132> Before presenting any outputs, ask the client which of the following the report133> should contain, if not already stated: (1) [effect/coefficient interpretation], (2)134> [hypothesis-testing decision], ... — fill in with the real options for this135> procedure, agreed on with the user during this interview. Suggest two to three options.136137This is a per-run question the finished skill asks every time it produces a report,138not a one-time choice made now. Confirm with the user during this interview which139options belong in that list.140141### Building in the references question142143Whether the generated skill asks its own end users for references depends on what144happened in **this** creation interview — pick one branch, not both.145146**Branch A — the client supplied usable references during this interview.** Do not147carry any references question into the new skill — its end users are never asked.148Instead:149- The citations, already formatted in the client's chosen style, live in the new150 skill's `references/paper.md` (filled in per the citation-format follow-up above).151- The new `SKILL.md`'s Step 0 uses `skill-procedure.md`'s **Variant A** wording (skip152 straight to "Extract Inputs" — no question asked).153- The new `SKILL.md`'s Step 5 References section is unconditional: it always lists154 the pre-baked citations from `references/paper.md`, since they're fixed and don't155 depend on anything happening at run time.156157**Branch B — the client had no references to offer.** Keep the current, unchanged158behavior: the generated skill must ask its own end user for references **before159anything else**, as the opening of its Step 0 (`skill-procedure.md`'s **Variant B**).160Carry the wording through verbatim:161162> Are there any publicly available references (papers, textbooks, methodology guides, websites, PDFs,163> etc.) I should rely on for the methods, assumptions, code, or interpretation in this164> analysis?165166- Publicly available source named or url provided → use its actual content for 167 assumptions, methods, code, and results this run, and record it in `references/paper.md`.168- Named source is not publicly available → reply with exactly: "The resource(s)169 provided is not public available and Claude does not have access. You could170 manually provide relevant contents later, or rely on Claude's suggestions." Then171 continue with the rest of the run using standard, field-default assumptions.172- No references offered → continue using standard, field-default assumptions.173174This is a per-run ask in Branch B only, not one-time. Whatever is confirmed usable that175run flows straight into that run's Step 5 References section (or the hierarchical176moderate/detailed levels' References section, if hierarchical output was chosen) —177Step 5 does not ask about references a second time.178179In **both** branches, include `references/paper.md` in the new skill's `references/`180folder (even close to empty in Branch B) so there's somewhere to record citations.181182## Step 2 — Generate the files183184Create a new folder named after the skill (e.g. `paired-t-test/`), sibling to185`statistics-skill-creator/`, containing:186187- `SKILL.md` — copy `references/skill-procedure.md`'s structure verbatim, with every188 section from Step 1 filled in. If hierarchical output was requested, delete that189 template's flat **Step 5 — Output** and paste in `references/hierarchical.md`'s content instead190 (per the instructions inside that file); otherwise keep the flat version and delete191 the "Optional for Step 5" block. For Step 0, keep exactly one of the two variants192 per "Building in the references question": **Variant A** (no question, References193 section always shown) if the client supplied usable references this interview,194 otherwise **Variant B** (today's per-run question, unchanged). Delete the195 `<!-- AUTHORING NOTE -->` comments and the variant you didn't use, and the196 `# Validation steps` section is kept (it's meant to ship with the finished skill, just197 hidden from regular users, per its own text).198- `references/eda.md`, `references/assumptions.md`, `references/guide.md`,199 `references/validation.md` — filled in for this procedure. `references/paper.md` is200 always included (per the fixed references policy above) — pre-populate it with any201 real citable methodology sources the user names during this interview, formatted in202 their chosen citation style; do not include this section if the user did not provide any 203 specific references.204- `data/` — only if the client supplied an actual data file (CSV or similar) used for205 a worked example or a validation case. Copy the file(s) in as provided, keeping the206 given filename (e.g. `data/patient_outcomes.csv`), and point `## Examples` and207 `references/validation.md`'s example inputs at that relative path (e.g. "Input:208 `data/patient_outcomes.csv`") instead of restating raw values inline. If no data209 file was ever supplied, skip this folder entirely — don't create an empty one.210- `scripts/eda_code.R`, `scripts/diagnostic.R`, `scripts/task_code1.R` (renumber/add211 more as decided in Step 1) — real, runnable R code implementing what was discussed,212 not placeholder comments. Each `task_codeN.R` follows the213 `validate_inputs` → `check_assumptions` → `run_test` → `report_conclusion`214 structure already scaffolded in the template, with a `main_functionN` that prints a215 full conclusion paragraph to stdout.216217Use the *existing* scaffold files in this folder as the literal source for what to218copy and adapt — do not re-derive their structure from scratch.219220## Step 3 — Self-check before delivering221222Before telling the user the skill is ready, verify:223224- Every `references/...`, `scripts/...`, and `data/...` path mentioned inside the new225 `SKILL.md` and its reference files actually exists in the new folder (open each file226 and grep for `references/`, `scripts/`, and `data/` to confirm — this exact class of227 bug, a path pointing at a file that doesn't exist, is what shipped in this template228 before it was fixed).229- If no data file was ever supplied during the interview, confirm no `data/` folder230 was created and no `data/...` path was left in any file.231- Exactly one references variant survives: if references were supplied this232 interview, `references/paper.md` has the formatted citations, Step 0 asks no233 question, and Step 5's References section is unconditional; otherwise Step 0 keeps234 its per-run question and Step 5's References section stays conditional on it. No235 leftover trace of the other branch (e.g. an unused question, or a hard-coded236 References section with nothing behind it).237- No leftover placeholder text remains (`[...]`, `TODO`, `e.g.` scaffolding, bracketed238 instructions).239- The YAML frontmatter is valid (opens and closes with `---`, has `name` and240 `description` keys) and `description` is under 1,024 characters.241- `SKILL.md` is under 500 lines.242- Every assumption and non-negotiable rule traces back to something the user actually243 confirmed in Step 1, not something assumed.244245Report back concisely: the new folder's path, what was created, and anything the user246should double check (e.g. an R package to install).247248## Step 4 — Self-check before delivering249250Do not randomly save the created folder in the device. Ask the client where the 251folder should be saved, so the client knows where exactly to find the folder.252## How to ask253254- Batch related questions together rather than one at a time.255- Lead with a concrete suggestion, then ask for confirmation or correction — don't256 present an open-ended blank.257- The suggestions should base on the contents in references if provided.258- Skip questions the user's original request already answered.259- Formatting-only defaults (decimal places, table style, alpha = 0.05) may proceed260 with a stated default unless the user objects — these don't need to block progress261 the way statistical substance does.