AI plugin
STIsim ships with stisim.ai, a Claude Code plugin that adds STIsim- and HIVsim-specific skills to Claude Code. Its goal is guardrails rather than speed: the skills add checkpoints and workflow discipline around research with STIsim so that AI-assisted analyses are more defensible and reproducible, and less prone to known failure modes.
Installation
The plugin is included in the stisim package, so there is nothing extra to download. After installing STIsim, register the plugin with Claude Code:
pip install stisim
python -m stisim.ai installThen reload Claude Code so it picks up the plugin:
- CLI: exit and relaunch
claude. - VS Code / Positron: Command Palette → Developer: Reload Window.
The installer adds the plugin to ~/.claude/settings.json (as stisim@stisim-local, via a local directory-based marketplace pointing at your installed stisim package). It preserves all other settings and is safe to run more than once. To check or undo the registration:
python -m stisim.ai status # Check whether the plugin is registered
python -m stisim.ai uninstall # Remove the registrationEditable installs
If you installed STIsim from a clone with pip install -e ., the plugin is loaded directly from your checkout. Edits to the skills under stisim/ai/plugin/skills/, or updates from git pull, take effect the next time Claude Code reloads, with no need to reinstall.
Usage
Once installed, the skills are available in every Claude Code session. Claude will invoke them automatically when a task matches a skill’s description (for example, asking it to set up a new HIV model for a country will trigger model-writer). You can also invoke a skill explicitly by typing /stisim:<skill-name>, for example:
/stisim:analysis-intake
A typical workflow for a new analysis is:
- Scope the question with
/stisim:analysis-intake, which interviews you to turn a research idea into a provisional analysis specification. It callsanalysis-selectorearly on to check whether a dynamic transmission model is actually the right tool; if not, it will say so. - Set up project memory with
/stisim:project-memory, so decisions survive across sessions, and use/stisim:session-closeat the end of each session to write a handoff summary. - Build the model with
/stisim:model-writer, drawing onmodel-primer(STIsim architecture),hiv-interventions(testing, ART, VMMC, PrEP), andnetwork-data(sexual network inputs from DHS data). - Plan the calibration with
/stisim:calibration-strategy, which helps decide what to calibrate and to which targets.
Skills
Analysis workflow
| Skill | Purpose |
|---|---|
analysis-intake |
Interview-style intake that turns a vague research idea into a provisional analysis specification. |
analysis-selector |
Classifies the research question by analytical objective, and only routes to HIVsim/STIsim if a dynamic transmission model is actually needed. |
project-memory |
Sets up a durable memory strategy so a multi-month project survives session ends, machine switches, and collaborator handoffs. |
session-close |
Writes a handoff summary at the end of a session. |
Software quality
| Skill | Purpose |
|---|---|
extending-stisim |
Before subclassing or monkey-patching STIsim, classifies the change and steers fixes upstream rather than into private forks. |
editable-dep-hygiene |
Keeps edits to editable (pip install -e) dependencies committed and shared. |
comment-hygiene |
Keeps shared-library comments and docstrings about the code, not about a particular project or session. |
result-extraction |
Uses ss.Result methods (annualize, resample, to_df) rather than hand-rolled aggregation, which can mishandle flows vs. stocks. |
writing-tests |
Favors a small number of scientifically meaningful tests over exhaustive enumeration. |
Companion plugins
stisim.ai is intentionally narrow. These plugins cover adjacent topics and are designed to be used alongside it:
- starsim_ai: general Starsim and Sciris skills, disease-modeling skills, and engineering-quality review. Install from within Claude Code with
/plugin marketplace add https://github.com/starsimhub/starsim_ai. - calib: generic calibration methods (algorithms, likelihoods, diagnostics);
calibration-strategydecides what to calibrate, andcalibhandles how. Install with/plugin marketplace add https://github.com/InstituteforDiseaseModeling/calib-plugin. - canonize: skills for durable decision capture in modeling projects, complementing
project-memory. - idm_standards: IDM software-quality, style, and documentation standards. Install with
/plugin marketplace add https://github.com/InstituteforDiseaseModeling/idm_standards.
For the full plugin layout and contributor notes, see stisim/ai/README.md.