No slash command · from TI-Toolbox
Orientation for the Temporal Interference Toolbox (TI-Toolbox, Python package `tit`). Explains v3 architecture (Electron desktop app, FastAPI job server, `tit` package), Docker-based scientific workflow, and which MCP tools to call for simulation/optimization tasks.
Ships in TI-Toolbox. 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.
TI-Toolbox simulates, optimizes and analyzes temporal-interference (TI) brain stimulation on subject-specific head models. It wraps SimNIBS, FastSurfer/FreeSurfer and (optionally) QSIPrep/QSIRecon. Docs: https://idossha.github.io/TI-Toolbox/ · Repo: https://github.com/idossha/TI-Toolbox · Cite: Haber et al. 2026, Brain Stimulation, doi:10.1016/j.brs.2025.103016.
Three pieces, and only three:
desktop/ (Electron main/preload +
React + TypeScript strict + Vite). It is a shell: it starts the container and
then loads the UI over HTTP from it. It owns host lifecycle only.tit.server, in
idossha/ti-toolbox. It owns the job model (queue, dependencies, locks, resource
budget, live events, cancellation) and serves the React bundle at /.tit Python package — the only place scientific logic lives, still
usable directly from scripts and notebooks.The PyQt5 GUI (tit/gui/) was deleted in v3.0.0. tit imports no Qt. The core
image ships no X11 and no FreeSurfer. Never cite tit/gui/**; if a user's
question assumes it, say it is gone and point at the desktop app or the Python API.
The wire contract between (1) and (2) is contracts/openapi.yaml — a frozen
interface. Origin is http://127.0.0.1:8765; WebSockets are /ws/system,
/ws/jobs and /ws/kernels/{id}. The bearer token lives only in
the container's own environment (TIT_SERVER_TOKEN) and is never written to the
host — there is nothing for a user to paste.
idossha/ti-toolbox has SimNIBS
4.6, Python 3.11 (simnibs_python), NumPy 2.3.5 (Blender keeps its own NumPy
1.26.4), nibabel, scipy and tit. It has
no FSL, no ANTs, no X11, no FreeSurfer. The host Python cannot import tit
with SimNIBS. The user's project is mounted at /mnt/<project>/.read_source_file (tit/sim/config.py, tit/opt/config.py) or find_symbol
and quote what you find.inspect_project with their
project root before diagnosing "my simulation doesn't show up".docs/wiki/ is the user-facing site — use
search_wiki / read_wiki_page. docs/dev/ is the developer source of truth,
is indexed by AGENTS.md; only CHANGELOG is published — use read_dev_doc.get_toolbox_version / read_changelog when behaviour may depend on version.ti-toolbox)| Need | Tool |
|---|---|
| First call in a session | get_quick_facts |
| Which user-facing page covers X? | search_wiki, list_wiki_pages |
| Read a wiki page / one section | read_wiki_page(page, section?) |
| How is it built / verified / decided? | read_dev_doc(name, section?) |
| How do I run it? | list_launch_paths |
| Exact class/function definition | find_symbol (local checkout) or read_source_file |
| Grep the source | search_source (local checkout) |
| What data does the user have? | inspect_project(project_root, subject?) |
| Montages, viewer scenes, free-hand electrodes | read_project_config(project_root, name, where?, subject?) |
| What changed in vX.Y.Z? | read_changelog(version) |
| Which versions are shipped? | get_toolbox_version |
To run jobs for the user (preprocess, optimise, simulate) use the
ti-toolbox-jobs server and follow the ti-run-pipelines skill: connect first,
find_regions for ROIs, propose_pipeline (the user approves the plan in the app, which
then queues it) and watch_proposal to follow without blocking the conversation. Jobs go through the app the
user has open and show up in its job list.
If the MCP server is unavailable, fetch the same Markdown from
https://raw.githubusercontent.com/idossha/TI-Toolbox/main/docs/wiki/<slug>.md.
Overview ⌘0 · Pre-processing ⌘1 · Optimizer ⌘2 · Simulator ⌘3 ·
Analyzer ⌘4 · Viewer ⌘5 · Results ⌘6 · Notebooks ⌘7 · Jobs ⌘8; ⌘9 is
unassigned. Assistant, System, Settings and Help are pinned below a spacer
and take no digit; Settings answers only to ⌘,. Also ⌘K command palette,
⌘J jobs panel, ⌘⏎ the action bar's primary action. Optimizer is one page —
flex, ex and mEx are a Method cell in its jobs table, not separate pages. The Viewer
builds a scene from the subject's files and opens it in the native TetraVox app.
overview, desktop-app, jobs, notebooks, resultspre-processing, diffusion-processing, simulator, flex-search,
ex-search, analyzer, field-definitions, reports, visualizersatlases, montage_visualizer, electrode-mapping, electrode-placement,
nilearn-visuals, cluster-permutation-testing, nifti-group-averaging,
tissue-analyzer, quick-notes, blender, loggingextension, python_env, agent-plugin,
ai-assistant, troubleshootingThere is no mti page. mTI is a section of simulator. Call list_wiki_pages
rather than guessing a slug.
Pre-process (DICOM/NIfTI → sub-<id>/anat → FastSurfer/FreeSurfer →
SimNIBS CHARM head mesh m2m_<id>) → Optimize electrode positions
(flex-search: differential evolution over the scalp, a local optimum;
ex-search: exhaustive over a leadfield and candidate pool, a global optimum
within the discretisation it was given; mex-search: multipolar variant) →
Simulate a montage (2 channels = TI, 4+ even = mTI; fields TI_max, optional
TI_avg/TI_normal, carrier hf_peak/hf_rms/hf_power_density) → Analyze (spherical or atlas
ROI stats in mesh or voxel space, group analysis) → Stats (cluster-based
permutation, volumetric MNI or fsaverage surface). The head model, DTI, every simulation and
every flex/ex search write their own HTML report. The
Simulator is not an optimiser; say so when a user treats it as one.
code/ tree)<project>/
sourcedata/sub-<id>/<T1w|T2w|ct|dwi|fmap>/ raw DICOM/NIfTI for convert_dicom
(fmap: the DWI's short reverse phase-encoding scan, e.g. PA;
two full opposite-PE DWI series both go in dwi)
sub-<id>/anat/sub-<id>_T1w.nii.gz raw NIfTI (+T2w, ct)
sub-<id>/fmap/sub-<id>_dir-PA_epi.nii.gz reverse-PE DWI fieldmap (dir- from the data)
code/ti-toolbox/
config/*.json montage_list.json, EEG nets, settings
jobs/<id>/{spec,status}.json, events.jsonl, stdout.log the v3 job store
notebooks/ examples/ is the only subdirectory
viewer/<kind>.tetravox.json scenes written by POST /api/view/open
derivatives/
fastsurfer/sub-<id>/ FastSurfer segmentation (the v3 recon)
freesurfer/sub-<id>/ legacy recon-all output (read-only)
qsiprep/, qsirecon/ diffusion (optional, sibling containers)
SimNIBS/sub-<id>/
m2m_<id>/ head model (<id>.msh, eeg_positions/,
segmentation/, surfaces/, stim_configs/)
leadfields/ for ex-search
Simulations/<montage>/TI/{mesh,niftis} + Analyses/{Mesh,Voxel}/ + fsaverage/
Simulations/<montage>/mTI/{mesh,niftis} 4+ channels: the mTI result
flex-search/<run>/ , ex-search/<run>/ , m-ex-search/<run>/
ti-toolbox/{reports,stats,logs,tissue_analysis}/
The job store lives inside the project so a notebook and a restarted server see
the same jobs; .bidsignore carries code/ti-toolbox/jobs/. Path logic lives in
tit/paths.py (get_path_manager(project_root)) — never hand-build a path.
The run name is the directory: a second flex/ex run under the same name
overwrites the first in place.
One run spec. The spec is the root docker-compose.yml (one service, tit; no
FreeSurfer service, no X11) and it has four readers: the Electron app,
tit/launch.py#load_spec, loader.py/loader.sh (with --dev [DIR] for a
checkout), and tit launch.
# users, from a terminal — each opens the desktop app (or the browser with --browser)
./loader.sh --project ~/datasets/000 # Python-free: bash, curl and docker
python loader.py --project ~/datasets/000 # Python >= 3.11, runs tit/launch.py
tit launch --project ~/datasets/000 # the installed form (tit/cli.py)
# ... --status | --logs [--follow] | --stop | --port | --image | --browser | --no-open
# developers
cd desktop && npm run dev # build the renderer + open Electron (rerun after changes)
cd desktop && npm run dev:web # container + Vite HMR, no Electron, http://127.0.0.1:5173/
./loader.sh --dev [DIR] # run a checkout's code in the user launcher
loader.sh needs only bash, curl and the docker CLI; loader.py and tit launch
need CPython ≥ 3.11 — not SimNIBS or Node. The first start pulls ~2.3 GB. Call
list_launch_paths for the details.
simnibs_python -m tit.sim config.json # simulation
simnibs_python -m tit.opt.flex config.json # flex-search
simnibs_python -m tit.opt.ex config.json # ex-search
simnibs_python -m tit.opt.mex config.json # multipolar ex-search
simnibs_python -m tit.analyzer config.json
simnibs_python -m tit.stats config.json
simnibs_python -m tit.pre config.json
simnibs_python -m tit.source config.json # fsaverage projection
The server runs exactly these commands, so anything the UI does is reproducible
from a script. Python-level usage is in the ti-scripting skill.
Kinds: pre sim flex flex_adaptive flex_pareto ex mex leadfield analyzer stats source blender nifti_average nilearn tools project_init.
States: queued running succeeded failed cancelled skipped lost.
Failure error.type values and the wording the UI shows:
| type | label |
|---|---|
runner_failed | Runner failed |
skipped | Skipped |
lost | Lost (server restarted mid-run) |
forced | Force-stopped |
kind_error | Invalid job configuration |
spawn_error | Could not start the job |
lost means the server restarted while the job was running: the job is over and
will not resume. A job stuck at running with no process behind it is freed with
POST /api/jobs/{id}/force, which lands it in state lost with error.type
forced.
For any error message, first call read_wiki_page("troubleshooting") (or
search_wiki with the error text). That page, Troubleshooting, is the single source of
truth for known problems, causes and maintainer-verified fixes; prefer its answer over your own diagnosis.
python instead of simnibs_python inside the container.montage_list.json exactly; EEG net names are real
filenames (e.g. GSN-HydroCel-185.csv).vn/dir/mc) needs m2m_<id>/DTI_coregT1_tensor.nii.gz,
fitted (DIPY) from QSIPrep output by the DTI step; QSIRecon is optional. QSIPrep
itself needs an x86-64 Docker host (it fails at SynthSeg on Apple Silicon).TI_normal is mesh-only; voxel analysis of it is an error by design.TI_normal support existed has no normal mesh —
requesting it raises FileNotFoundError; re-run the simulation.container/blueprint/build.sh --tag <image>, or pass --image with a tag they already have.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ti-toolbox, brain-stimulation, simnibs, temporal-interference, bids
npx claudepluginhub idossha/ti-toolbox --plugin ti-toolbox6 skills in this plugin
/ti-codebaseTI-Toolbox codebase patterns, module graph, conventions and architecture (v3 — Electron desktop app, FastAPI tit.server, shared tit science core). Use when reading or modifying source under tit/ or desktop/ (developers)./ti-domainTemporal interference neurostimulation domain knowledge. Use when working on simulation, optimization, analysis, or preprocessing code in TI-Toolbox./ti-run-pipelinesRun TI-Toolbox pipelines for the user through the app they have open — copy raw DICOM/NIfTI into the project's sourcedata, preprocess (charm head model), flex-search or ex-search optimisation, simulate a montage or an optimisation result, and follow the jobs. Use when the user asks you to DO something with their data in TI-Toolbox ("preprocess sub-101", "optimise for the thalamus", "simulate the best montage"), not to explain it. Needs the ti-toolbox-jobs MCP server./ti-scriptingPython scripting API of TI-Toolbox (`tit` package) — SimulationConfig, FlexConfig, ExConfig, Analyzer, run_group_comparison, run_pipeline, the tit.calc envelope functions, JSON config runners. Use when writing or debugging scripts or notebooks that drive TI-Toolbox, or converting a UI workflow to code./troubleshoot-projectDiagnose a TI-Toolbox project directory — which subjects, head models, simulations, optimizations, jobs and reports exist, and what is missing for the user's goal.Other plugins' skills for the same job