/oss:topic-modeling [describe your corpus and research question]from oss
Advises on setting up and validating topic models (STM, LDA, BERTopic) for survey and experimental text. Covers discovery vs measurement, preprocessing, topic-count selection, and validation.
Ships in oss. 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.
None: SKILL.md is the whole skill.
Help the user design the analysis before fitting anything. Work through the decisions below in order, explain what each choice changes and which standard governs it, and record the choice with its rationale. Every one of them — model, preprocessing, covariates, K, labels — shapes which topics appear, so each belongs in the methods section.
Settle this first; it decides the rest.
text-classification.pre-registration-writing) so estimateEffect() output is confirmatory rather than exploratory by default (Nosek et al. 2018).Preprocessing is not neutral: stemming, stopword removal, and frequency thresholds all change which topics emerge (Denny & Spirling 2018). Justify each choice.
stm, plotRemoved() shows terms and documents dropped across candidate thresholds before you pass one to prepDocuments(). Report the threshold and the retained counts.prevalence = ~ treatment + country (Roberts et al. 2014).sageLabels() (Roberts, Stewart & Tingley 2014; 2019).init.type = "Spectral"). It is deterministic on a given machine and BLAS configuration; cross-machine precision can still differ slightly, so record hardware and OS (Roberts, Stewart & Tingley 2019).stm version and R session info.searchK() returns all four; selectModel() fits several initializations at a fixed K and returns the coherence-exclusivity frontier (useful only with non-spectral initialization).stm reports FREX, a weighted harmonic mean of frequency and exclusivity ranks (default ω = 0.7). The coherence-FREX frontier marks models that balance both (Roberts, Stewart & Tingley 2019).Statistical fit does not show that a topic measures what its label claims. Validate the topics as measures (Grimmer & Stewart 2013).
findThoughts()). Word lists alone are not enough to interpret a topic.estimateEffect() and plot them with confidence intervals (Roberts et al. 2014). When testing many topics against a treatment, report FDR or similar corrections alongside uncorrected estimates.permutationTest(), which permutes the treatment label and refits to give a randomization-inference null for each topic's effect (Roberts, Stewart & Tingley 2014; 2019).topicCorr().prepDocuments), K and its rationale, initialization, convergence (max EM iterations, final variational bound), seed, stm version, R session info. For the broader checklist see methods-reporting.text-classificationsearchK/selectModel) plus interpretability; held-out vs. coherence conflicts resolved toward interpretability (Chang et al. 2009)sageLabels() inspected for content covariatesfindThoughts() documents, and labeled with definitionsestimateEffect() with confidence intervals and multiple-comparison adjustmentpermutationTest() run for experimental treatment effectstopicCorr()stm version, session info, and replication materials archivedA minimal STM pattern for a survey experiment where df has one row per respondent with open_ended_responses (text) and treatment_arm (factor). Adapt it; stages (a)-(d) map onto Sections 3-6.
library(stm)
set.seed(20260418)
# (a) Preprocess and choose the rare-term threshold (Section 3).
processed <- textProcessor(df$open_ended_responses, metadata = df)
plotRemoved(processed$documents, lower.thresh = seq(1, 20, by = 2))
prepped <- prepDocuments(processed$documents, processed$vocab,
processed$meta, lower.thresh = 5)
# (b) Sweep K: coherence, exclusivity, held-out likelihood, residuals (Section 5).
k_search <- searchK(prepped$documents, prepped$vocab, K = c(5, 10, 15, 20),
prevalence = ~ treatment_arm, data = prepped$meta,
init.type = "Spectral")
plot(k_search)
# (c) At the chosen K, compare random initializations on the frontier.
# Spectral init is deterministic, so selectModel needs a random init here.
k_chosen <- 10
candidates <- selectModel(prepped$documents, prepped$vocab, K = k_chosen,
prevalence = ~ treatment_arm, data = prepped$meta,
runs = 20, init.type = "LDA")
plotModels(candidates)
fit <- candidates$runout[[1]]
# (d) Treatment effects on prevalence (Section 6); follow with permutationTest and topicCorr.
effects <- estimateEffect(1:k_chosen ~ treatment_arm, fit,
metadata = prepped$meta, uncertainty = "Global")
summary(effects)
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
topic-modeling, stm, lda, bertopic, text-analysis, survey-data
46 skills in this plugin
/advisorConsults Fable as an independent, read-only reviewer at an effort the caller matches to the question. The calling session (usually Opus, or Haiku) holds the task and escalates one decision point. Use before committing to an interpretation or a substantial piece of writing or analysis, when stuck or not converging, when changing approach, or as a final check on a finished task. Fallback for when the native advisor tool is unavailable. Not for a session already running Fable./beamerHouse rules and craft for LaTeX Beamer slide decks (lectures, seminars, talks), drawn from the author's own Overleaf edits and published slide-design guidance. Covers storyboarding, frame titles, slide prose, word and frame budgets, layout without overfull boxes, XeLaTeX fonts and Korean (xeCJK), color, figures and screenshots, Overleaf source hygiene, speaker notes, and a build-and-QA loop with a contact sheet. Use when writing, editing, reviewing, or building a Beamer deck, theme, or storyboard. A course skill supplies course facts and the frame skeleton; this skill supplies the craft. Not for HTML or PowerPoint decks, posters, or papers./citation-checkAudits a manuscript's citations for fabricated or nonexistent sources, DOIs that resolve to a different work, mismatches between in-text citations and the reference list, APA 7 or journal style, and whether each source supports the claim it is attached to. Checks entries against Crossref, OpenAlex, and DataCite and labels anything it could not verify NOT CHECKED. Use to check citations, references, a .bib file, or DOIs, or when a source may be AI-invented. Figures and tables go to figure-table-audit.npx claudepluginhub scdenney/open-science-skills --plugin ossOther plugins' skills for the same job