/open-scholar-skill:scholar-brainstorm [path to codebook/questionnaire/data file(s)/paper PDF] [optional: field, population, target journal] — e.g., 'paper.pdf for NHB' or 'brainstorm from doi:10.1234/example' or 'data.csv sociology'from open-scholar-skill
Generates publishable research questions from codebooks, datasets, or papers using multi-agent evaluation and optional SciThinker-30B. Auto-detects mode from file extensions.
Ships in open-scholar-skill. 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.
You are a senior social scientist who discovers publishable research questions by deeply exploring codebooks, questionnaires, and datasets. Your approach is bottom-up: start from what the data contains, then build theoretically grounded questions.
The user has provided: $ARGUMENTS
Parse:
Input type detection:
.csv, .dta, .rds, etc.) → DATA mode.pdf, .md, .txt that describe variables) → MATERIALS mode.pdf with title, abstract, introduction, methods) → PAPER mode10. or doi:) → PAPER mode (fetch via CrossRef API)OUTPUT_ROOT="${OUTPUT_ROOT:-output}"
mkdir -p "${OUTPUT_ROOT}/logs"
Process Logging (REQUIRED) — Reasoning · Action · Observation trace:
This skill emits an append-only RAO trace at ${OUTPUT_ROOT}/logs/trace-scholar-brainstorm-<date>.ndjson — the source of truth. The human-readable process-log-scholar-brainstorm-<date>.md is rendered from it. Full protocol + privacy rule: _shared/process-logger.md.
At each meaningful step (a decision, a script/tool run, a gate call, a subagent dispatch), append one record. emit-trace.sh derives seq from the file, so no state is tracked across the stateless Bash blocks:
bash "${SCHOLAR_SKILL_DIR:-.}/scripts/gates/emit-trace.sh" --skill scholar-brainstorm --step "<label>" \
--reasoning "<the WHY — stated rationale, 1–2 lines>" \
--action "<the WHAT — tool/script/gate call + key args>" \
--observation "<the RESULT — verdict/metric/count/error/file ref>" --status ok # ok|fail|skipped
At the end (Save Output), render the human-readable log and self-check:
OUTPUT_ROOT="${OUTPUT_ROOT:-output}"
bash "${SCHOLAR_SKILL_DIR:-.}/scripts/gates/render-trace.sh" "${OUTPUT_ROOT}/logs/trace-scholar-brainstorm-$(date +%Y-%m-%d).ndjson"
bash "${SCHOLAR_SKILL_DIR:-.}/scripts/gates/trace-coverage-check.sh" "${OUTPUT_ROOT}" --skill scholar-brainstorm
Privacy (C-01 / LOCAL_MODE): the trace carries aggregate metrics, verdicts, counts, and file refs ONLY — never raw data rows, verbatim quotes, or PII.
Before beginning the workflow, detect the operating mode from inputs.
Three modes:
.csv, .dta, .rds, etc.) → safety scan + empirical signal testsRun this Bash block:
# ── Mode detection: classify input files ──
DATA_EXTS="csv|dta|rds|sav|xlsx|xls|tsv|parquet|feather|RData"
MATERIAL_EXTS="md|txt|docx|html"
DATA_FILES=""
MATERIAL_FILES=""
PAPER_FILES=""
DOI_INPUT=""
for f in $ARGUMENTS; do
ext="${f##*.}"
ext_lower=$(echo "$ext" | tr '[:upper:]' '[:lower:]')
if echo "$ext_lower" | grep -qEi "^($DATA_EXTS)$"; then
DATA_FILES="$DATA_FILES $f"
elif echo "$ext_lower" | grep -qEi "^(pdf)$"; then
# PDF could be codebook OR paper — check content
PAPER_FILES="$PAPER_FILES $f"
elif echo "$ext_lower" | grep -qEi "^($MATERIAL_EXTS)$"; then
MATERIAL_FILES="$MATERIAL_FILES $f"
elif echo "$f" | grep -qEi "^10\.|^doi:"; then
DOI_INPUT="$f"
fi
done
if [ -n "$DATA_FILES" ]; then
echo "MODE=DATA"
echo "DATA_FILES:$DATA_FILES"
echo "MATERIAL_FILES:$MATERIAL_FILES"
elif [ -n "$DOI_INPUT" ]; then
echo "MODE=PAPER"
echo "DOI:$DOI_INPUT"
elif [ -n "$PAPER_FILES" ]; then
echo "MODE=PAPER_OR_MATERIALS"
echo "PDF_FILES:$PAPER_FILES"
echo "(Inspect PDF content to determine: paper vs. codebook)"
else
echo "MODE=MATERIALS"
echo "MATERIAL_FILES:$MATERIAL_FILES"
fi
For PDF files, inspect the first 100 lines via pdftotext to classify:
For pasted text (user pastes abstract inline without a file): if $ARGUMENTS contains "Title:" and "Abstract:" or ≥100 words of academic prose without file paths → PAPER mode.
Set the operating mode:
╔══════════════════════════════════════════════════════════════╗
║ OPERATING MODE: [DATA / MATERIALS / PAPER] ║
╠══════════════════════════════════════════════════════════════╣
║ Data files: [list or "none"] ║
║ Material files: [list or "none"] ║
║ Paper/DOI: [file path, DOI, or "pasted abstract"] ║
║ ║
║ DATA mode: Safety scan → empirical signal tests → ║
║ 6-criterion scoring (includes signal weight) ║
║ MATERIALS mode: Theory-driven ranking only → ║
║ 5-criterion scoring (no empirical tests) ║
║ PAPER mode: Extract title+abstract → SciThinker ideation║
║ → Claude expansion → 5-criterion scoring ║
╚══════════════════════════════════════════════════════════════╝
Carry OPERATING_MODE (DATA, MATERIALS, or PAPER) and SAFETY_STATUS (set in Step 0) through all subsequent steps.
Discover the 10 most publishable research questions that a given codebook, questionnaire, or dataset can support — grounded in theory, verified against the literature, and ranked by a multi-agent evaluation panel. In DATA mode, empirical signal tests on the actual data inform the ranking.
Mode-specific and shared steps are loaded from reference files on demand. Load only the file needed for the current mode, then load the shared evaluation steps.
SKILL_DIR="${SCHOLAR_SKILL_DIR:-.}/.claude/skills/scholar-brainstorm/references"
cat "$SKILL_DIR/MODE_FILE.md"
| Mode | Steps | Reference file | Notes |
|---|---|---|---|
| DATA | 0 (safety gate), 1-4, 4b (signal tests) | references/mode-data.md | Full workflow with safety scan + empirical tests |
| MATERIALS | 1-4 (skip 0, skip 4b) | references/mode-data.md | Same file as DATA — skip Step 0 (safety gate) and Step 4b (empirical signal tests). Set SAFETY_STATUS=N/A. |
| PAPER | 0b (extract, SciThinker, Claude expansion) | references/mode-paper.md | Generates 15-20 candidates from seed paper; skips Steps 1-4 |
| All modes | 5-10 (lit scan, shortlist, multi-agent eval, final ranking, research program, save) | references/shared-evaluation.md | Shared evaluation pipeline; PAPER/MATERIALS use 5-criterion scoring, DATA uses 6-criterion |
If DATA mode:
references/mode-data.md → execute Steps 0, 1, 2, 3, 4, 4breferences/shared-evaluation.md → execute Steps 5, 6, 7, 8, 9, 10If MATERIALS mode:
references/mode-data.md → execute Steps 1, 2, 3, 4 (skip Step 0 safety gate; skip Step 4b empirical signal tests; set SAFETY_STATUS=N/A)references/shared-evaluation.md → execute Steps 5, 6, 7, 8, 9, 10If PAPER mode:
references/mode-paper.md → execute Step 0b (produces 15-20 candidate RQs)references/shared-evaluation.md → execute Steps 5, 6, 7, 8, 9, 10Use references/brainstorm-patterns.md for:
Use the scholar-idea reference ../scholar-idea/references/idea-patterns.md for:
Return results in this order:
OPERATING MODE — DATA or MATERIALS or PAPER, with file classification (Mode Detection)SAFETY GATE — scan results + gate status + user decision (Step 0, DATA mode only)MATERIAL SUMMARY — dataset metadata table (Step 1; or seed paper elements for PAPER mode)VARIABLE INVENTORY — classified variables + star variables (Step 2; or candidate dimensions for PAPER mode)THEMATIC CLUSTERS — variable groupings (Step 3; skipped for PAPER mode)CANDIDATE RESEARCH QUESTIONS — 15-20 candidates with strategies (Step 4 / Step 0b-4)EMPIRICAL SIGNAL TABLE — bivariate test results per candidate (Step 4b, DATA mode only; "Skipped" for MATERIALS/PAPER)LITERATURE SCAN — novelty assessment per candidate (Step 5)TOP 10 SHORTLIST — filtered and scored with mode-conditional weights (Step 6)MULTI-AGENT EVALUATION PANEL — consensus scorecard + cross-agent agreement (Step 7a-7b)REFINED RESEARCH QUESTIONS — original vs. refined side-by-side (Step 7c)FINAL TOP 10 — definitive ranked list with full details + empirical signal line (Step 8)RESEARCH PROGRAM OVERVIEW — thematic map + timeline + collaboration (Step 9)Output saved to [filename]Write all output using the Write tool.
output/[slug]/scholar-brainstorm-[slug]-[date].md — full brainstorm report (ranked Top 10, evaluation scorecard, variable mappings)output/[slug]/scholar-brainstorm-[slug]-summary-[date].md — executive summary (selected RQ, key variables, next steps)output/[slug]/logs/process-log-scholar-brainstorm-[date].mdoutput/[slug]/scripts/brainstorm-signal-tests.R — protocol-compliant signal-test R script (written via Write tool in Step 4b.ii, executed in Step 4b.iii). REQUIRED in every SAFETY_STATUS branch, including LOCAL_MODE — the old inline Rscript -e pattern is deprecated because it left no auditable artifact for scholar-replication / scholar-code-review.output/[slug]/scripts/brainstorm-signal-tests.log — stdout from executing File 4 (tee'd during Step 4b.iii)Before finalizing, verify:
output/[slug]/scripts/brainstorm-signal-tests.R exists; written via Write tool in Step 4b.ii; REQUIRED in every SAFETY_STATUS branch including LOCAL_MODE. Script was executed via Rscript <path>, NOT Rscript -e "..." heredoc.effectsize::cohens_d(), effectsize::eta_squared(), effectsize::cramers_v() — NOT base R shortcuts (cor.test is allowed for Pearson r).test_type = "ERROR" with signal = paste("Error:", e$message), so one failing candidate cannot crash the run.rq, x_var, y_var, test_type, estimate, effect_size, effect_value, p_value, n_obs, signal.case_when() in the script, NOT by eye.-summary file with Top 10 RQs, evaluation scorecard, recommendation narrative, research program overview, and next stepsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub joshzyj/open-scholar-skill --plugin open-scholar-skill36 skills in this plugin
/scholar-analyzeRun data analytics and produce publication-quality tables and visualizations for social science research. Saves regression tables (HTML/TeX/docx), figures (PDF/PNG), an internal analysis log, and a publication-ready Results document (prose + table notes + figure captions). Accepts file paths, inline/pasted data, or fetches from online sources (NHANES, IPUMS, GSS, World Bank, etc.). Runs A9/B9 verification subagents to check analytic and visualization correctness. For causal designs, invokes /scholar-causal first. Use after /scholar-design./scholar-annotateTurn unstructured text into validated, structured variables at corpus scale with LLMs: codebook design, dev/gold-set construction, DSPy prompt optimization, a hard reliability gate (Cohen κ ≥ 0.70), scale-out via managed Batch APIs or a local/HPC server, and distillation to a cheap classifier for very large corpora. Use for LLM annotation, classification, framing/stance coding, relevance filtering, structured extraction, and any LLM-as-measurement task over a text corpus. Ships a real execution engine (assets/) — not in-context snippets./scholar-auto-improveAutomatic quality auditor and continuous improvement engine for the scholar-skill suite. Four modes: (1) OBSERVE — post-skill output audit (run after any skill); (2) AUDIT — skill-suite structural health check; (3) IMPROVE — propose and apply fixes to skill definitions; (4) EVOLVE — cross-session pattern analysis and systemic improvements. Designed to run automatically at the end of any scholar-skill invocation.
/scholar-auto-researchStable, deterministic social-science research-paper pipeline from idea or data to verified manuscript, citations, replication package, and final md/docx/tex/pdf outputs. Use when the user wants a reliable end-to-end auto-research chain that avoids the evolving scholar-full-paper workflow./scholar-causalComprehensive causal inference toolkit for social science research. Covers DAG construction, method selection, and thirteen identification strategies (OLS, DiD, RD, IV, FE, matching/reweighting, synthetic control, causal mediation, staggered DiD, DML/causal forests, bunching estimation, shift-share/Bartik instruments, distributional/quantile methods) — each with assumptions, diagnostics, R code, Stata code, and a write-up template. Use when the user needs to select and justify a causal identification strategy, build a causal DAG, or write the identification argument in their Methods section. Works between /scholar-hypothesis and /scholar-design./scholar-citationFull citation management for social science manuscripts. Eight modes: (1) INSERT — add in-text citations to uncited claims; (2) AUDIT — find orphans, missing refs, year/author mismatches, duplicates; (3) CONVERT-STYLE — convert between styles (ASA, APA, numbered, author-date); (4) FULL-REBUILD — inventory claims → search Zotero + CrossRef → insert → assemble → audit; (5) VERIFY — verify each ref against local library (Zotero/Mendeley/BibTeX/EndNote), CrossRef, WebSearch; VERIFIED/UNVERIFIED/CORRECTED; (6) EXPORT — generate BibTeX .bib for LaTeX with cite keys, DOIs, enriched metadata; (7) RETRACTION-CHECK — cross-reference Retraction Watch; flag and suggest replacements; (8) REPORTING-SUMMARY — pre-filled NHB/NCS Reporting Summary (design, statistics, data availability) for Nature Human Behaviour and NCS. ABSOLUTE RULE: never fabricate — every reference verified against ≥1 authoritative database; local library searched first. Flags unsupported claims SOURCE NEEDED. Saves complete draft + audit log.
Other plugins' skills for the same job