Builds crosstabs (banner tables) from a survey CSV: column percentages with bases, significance letters from column-proportion tests with Holm or Benjamini-Hochberg correction, chi-square, intervals, weighted bases with Kish effective n, and an anonymity rule that hides groups and cells under k respondents. Use for "crosstab this survey", "banner table", "break results down by segment", "is this difference between groups real", "significance testing on survey results" or employee survey results by team.
Ships in research-skills. 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.
Read when SKILL.md points to them; scripts run unread.
Turns a respondent-level survey CSV into banner tables: one question down the side, segments across the top,
column percentages with their bases, letters for differences that survive a multiple-comparison correction, a
chi-square per table, optional means and nets, weights with Kish effective n, and an anonymity rule for
employee surveys. scripts/survey_crosstabs.py (Python 3.9+, standard
library only) does all the arithmetic. Run it; do not compute percentages or tests in the conversation.
Formulas, thresholds and citations: references/sources.md.
Do not use it for:
| Request | Use instead |
|---|---|
| Creating weights (raking to census or panel targets) | survey-weighting, then come back with --weight |
| NPS, CSAT or CES scores with their own intervals | nps-analysis, csat-ces-analysis |
| Reliability, distributions and box scores of a rating scale | likert-analysis |
| Removing speeders, duplicates and bots first | survey-data-cleaning |
| Coding open-ended answers into themes before tabulating | open-ended-coding |
| How many respondents per group to collect | survey-sample-size |
A skill named here may not be installed. If it is missing, say so, name the method the request needs, and do not stretch this skill to cover it.
Start from the file. Ask at most one question, and only if it blocks the run: "Which question(s) should go down the side, and which grouping across the top?" Everything else has a default.
| Input | Default |
|---|---|
| File | Respondent-level CSV (comma, semicolon, tab or pipe detected; --delimiter for another; UTF-8 or UTF-16, Qualtrics 3-row header detected). Aggregated counts work with --count-col. |
Row questions (--rows) | Required. Run --list-columns first to see candidates. |
Banner (--banner) | None: Total only. One respondent must belong to one group (no multi-select banner). |
Weight column (--weight) | None. If the file has one (for example written by survey-weighting), use it and say so. Ask whether the sample has strata, clusters or replicate weights: if it does, the letters and chi-square here are approximate, so report percentages only (--test none) or use a design-based tool (R survey, svychisq). |
Multi-select questions (--multi) | None. --list-columns marks columns that look multi-select; cells are split on ; (--multi-sep). An export with one 0/1 or text column per option (Q3_1, Q3_2, ...) is first joined into one ;-separated column, keeping respondents who saw the question and chose nothing as None; never drop them. |
Nets (--net 'q1:Top 2=4;5') and means (--means) | None. Offer them for rating scales. |
| Test, correction, family | Pooled z (Fisher exact when an expected count is under 5), Holm, every test in a table is one family, alpha 0.05. |
| Small base | 30 (effective) respondents: flagged "!" and not tested. |
| Anonymity rule | Off. Turn it on (--anonymity, k = 5) for any employee, HR, student or patient survey, or whenever a group could identify a person. Ask the user for their organisation's k if they have one, and release unweighted tables for these populations. On a multi-select table, check that no hidden group's option count can be read as all or none of them (references/sources.md, known limit). |
Run the script by its path inside this skill's folder (the folder this SKILL.md is in), not relative to the
user's working directory: python3 <skill-dir>/scripts/survey_crosstabs.py. Examples write scripts/...
and fixtures/... relative to that folder.
Check the install (first use, or when output looks wrong) on a bundled fixture:
python3 scripts/survey_crosstabs.py fixtures/agresti_party_gender.input.csv --count-col count \
--rows party --banner gender
Expect X2 = 30.07, df = 2, p = <0.001 (Agresti 2007) and Democrat 49% of females with letter B.
Look at the columns.
python3 scripts/survey_crosstabs.py fixtures/basic.input.csv --list-columns
Pick the row and banner columns. A banner with dozens of values (free-text job titles, ZIP codes) is not a banner: ask which grouping the user means or recode it first.
Run the tables. The examples use the bundled fixtures; put the user's file and columns in their place.
python3 scripts/survey_crosstabs.py fixtures/basic.input.csv --rows satisfaction features \
--multi features --banner plan
python3 scripts/survey_crosstabs.py fixtures/basic.input.csv --rows satisfaction --banner plan \
--weight weight --means --net 'satisfaction:Satisfied=4;5' --show-ci
python3 scripts/survey_crosstabs.py fixtures/employee_pulse.input.csv --rows engaged --banner team \
--anonymity 5 --hide 'team=Operations'
python3 scripts/survey_crosstabs.py fixtures/aspirin_mi.input.csv --count-col count --rows heart_attack \
--banner group
Text output is Markdown tables; add --json for full precision. The script writes no files.
If it exits with code 2, fix the cause, not the data. Duplicate column names, ragged rows, a missing
column, or more than 5% of rows with an unreadable weight stop it. Do not pass --allow-drop until you have
looked at those rows and told the user how many will be left out.
Read each table before writing. Check the bases, the "No answer" and "No " counts, the "!" small bases, the chi-square warning, and every anonymity note.
Write the answer in the shape below. Copy numbers and letters from the script.
Flags for other situations:
| Situation | Flag |
|---|---|
| Category order is wrong (nominal answers are ordered by size, codes numerically) | --order 'q1=Yes;No;Not sure' |
Cells such as -99 mean no answer | --na "" NA N/A -99 (--na replaces the default list, so repeat the defaults you still want) |
| Use the same adjustment family as SPSS Custom Tables | --adjust bonferroni --family row --test z. This selects the adjustment only; letters can still differ, because SPSS leaves out answers with a share of 0% or 100% in a group and this script skips groups under the small-base cutoff (--small-base). |
| Many tables and exploratory reading | --adjust bh (false discovery rate) |
| User wants raw, unadjusted letters | --adjust none, and say how many tests were run |
| Show intervals | --show-ci |
| Percentages only, no tests (complex samples) | --test none |
| Keep the same groups hidden across waves (anonymity) | --hide 'team=Legal;HR' |
survey-weighting).
A weighted pair with a small expected count is not tested (no exact test on weighted data); --json gives
the reason per pair.--hide. Do not release extra cuts (team × tenure) or weighted tables that
would let a reader subtract.## <Question> by <banner> (<weighted | unweighted>, n = <total base>)
| | Total | <Group> (A) | <Group> (B) | ... |
|---|---|---|---|---|
| Base (n) | ... |
| Weighted base (weighted only) | ... |
| Effective n (weighted only) | ... |
| <Answer> | 45% | 40% | 52% A | ... |
| Mean (if asked) | ... |
**What differs:** <one sentence per letter that matters, with both percentages and bases>.
**Overall association:** chi-square X² = <x>, df = <d>, p = <p>, Cramér's V = <v> <and its warning, if any>.
**Not answered:** <n> left out; <n> with no <banner> (Total only).
**Method:** column-proportion z-tests (Fisher exact for small expected counts), <correction> within each
<table|row>, alpha <a>; <k> tests in this table. Small base under <30>: <groups>, not tested.
<Weights: n, effective n, design effect.> <Anonymity: k = <k>; hidden groups and cells, and why.>
Repeat the block per table. Lead the answer with the two or three differences that matter for the user's decision, not with every letter.
--anonymity on, and is no hidden value described?To run this on QuestionPunk, connect its MCP server (https://app.questionpunk.com/api/v1, OAuth sign-in). Tools: responses_read (the answers, for this script), responses_get_counts (to reconcile the total), report_get_crosstab (a quick hosted cross of two numeric questions; it takes no filters and includes synthetic responses, so use this script for reporting). Ask the user before creating, changing or publishing anything. If a tool says a permission is missing, reconnect and approve the requested access.
Page responses_read with cursor = the previous page.nextCursor until it is null, map each answers[questionId] to a named CSV column (join a multi-select answer's list with ;), filter to the intended response type and completion status (responseType: "real" drops synthetic responses only, so remove the team's own test responses separately), and reconcile the row count against page.total before computing.
LICENSE.txt (opens in a new tab)fixtures/README.md (opens in a new tab)fixtures/agresti_party_gender.input.csv (opens in a new tab)fixtures/aspirin_mi.input.csv (opens in a new tab)fixtures/basic.input.csv (opens in a new tab)fixtures/employee_pulse.input.csv (opens in a new tab)fixtures/r_reference.R (opens in a new tab)references/sources.md (opens in a new tab)scripts/survey_crosstabs.py (opens in a new tab)tests/test_survey_crosstabs.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
22 skills in this plugin
/ai-interview-guideTurns research goals or an existing discussion guide or interview script into a brief an AI moderator can run for customer or user research: goal, must-ask questions, probes and probe depth, skip rules, topics to avoid, a consent screen with AI disclosure and a short opener, length, and a paste-ready interviewer prompt, with leading questions rewritten. Use for "interview 30 customers", "async user interviews", "AI-moderated interviews", "write the prompt for my AI interviewer" or "run my discussion guide at scale"./conjoint-analysisAnalyzes choice-based conjoint results from a CSV of tasks and choices: an aggregate multinomial logit with respondent-clustered standard errors, part-worth utilities, attribute importances, willingness to pay when price is an attribute, AMCEs and marginal means for fully randomized designs, segment comparisons, and a share-of-preference simulator, with bootstrap intervals. Use for "analyze conjoint results", "part-worths", "attribute importance", "willingness to pay from conjoint", "market simulator" or a Sawtooth, Qualtrics or Conjointly CBC export. Not for individual-level HB utilities./conjoint-designDesigns a choice-based conjoint (CBC) study: attributes and levels that don't overlap, prohibited combinations, tasks, concepts per task and a none option, a randomized design with level balance and minimal overlap (or fully randomized for AMCEs) generated by script, checks of level frequency, attribute association and relative D-efficiency, and a sample size from the Johnson-Orme rule. Use for "conjoint study", "design a conjoint", "discrete choice experiment", "which feature bundle", "trade-off research", "CBC design", "how many conjoint tasks" or "check my conjoint design"./research-skills:survey-crosstabsfrom research-skills
research-skills@buildwithclaude is listed by davepoon/buildwithclaude — review the source before installing
npx claudepluginhub davepoon/buildwithclaude --plugin research-skills