No slash command · from TI-Toolbox
Runs TI-Toolbox pipelines through the desktop app: copies raw DICOM/NIfTI into sourcedata, preprocesses with charm head model, runs flex-search or ex-search optimisation, simulates montages, and tracks jobs. Use when the user asks to DO something with their data.
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.
You drive the TI-Toolbox the user already has open, through the ti-toolbox-jobs MCP
server. Every job you submit goes through the app's own job server: it appears live in the
desktop app's job list and terminal, and writes exactly the records, outputs and reports a
job started from the app writes. You never run simnibs_python yourself and never write
into derivatives/ by hand.
connect first, every session. It tells you the project folder, every subject and
what it has (has_sourcedata, has_raw, has_m2m, ...), what is already queued or
running, and approval_required. If it says no TI-Toolbox is running, tell the user to
open the app on their project (or run tit launch) — do not try to start one.approval_required: true, the default). Put the
whole pipeline in one propose_pipeline call. submit_job and simulate_flex_result
are refused in this mode — never try to get around that (no other creator name, no
settings change). propose_pipeline returns proposed: false with errors when a step
does not validate; nothing was shown to the user — fix it and propose again.watch_proposal(proposal_id) the last call of the turn. It returns on the next change
only — approved, rejected, a step finished, all done.
get_proposal (it returns at once).watch_proposal returns within 45 s. If nothing
changed, end the turn telling the user to say "status" anytime; then call
watch_proposal(proposal_id, timeout_s=0) and report what changed.approved_config — go with it); a finished step's state, output
folder, report (*.html) and key numbers from log_tail. Then watch again.
changed: false means nothing happened: say nothing and watch again.done: true: a short final summary of every step, then stop watching.find_regions, runs from watch_proposal/get_proposal, nets from the user or
a flex run's mappings.plan_job (same arguments as one step) shows
errors, missing_inputs, will_overwrite, lock_conflicts, eta_minutes; fix errors
yourself and tell the user about missing inputs. propose_pipeline plans every step
again in the app, and the card shows the user the same facts.will_overwrite is non-empty, prefer a new run
name (output_folder: "<name>" for flex). Pass overwrite: true only when the user
already said to replace; otherwise the card asks them (approval is refused until they
allow it or rename).get_config_schema shows them).*.html)
from watch_proposal (finished) or wait_for_job. On failure, quote the error and the last log lines, then check the
troubleshooting wiki page (read-only server) before guessing.There is no staging tool: copy the scans yourself with your own file tools (the CLI asks the
user's permission) into the project folder connect returned (project.host_path):
<host_path>/sourcedata/sub-<id>/T1w/ # required: the T1-weighted series (DICOM folder, archive or NIfTI)
/T2w/ # optional, recommended
/ct/ # optional CT
/dwi/ # optional diffusion (with its .bval/.bvec/.json beside a NIfTI)
.zip, .tar, .tar.gz, .tgz) and .nii/.nii.gz also work
(the layout is the pre-processing wiki page's).pre step for that subject (config: {} takes the Pre-processing page's
defaults, including DICOM conversion).connect # approval_required: true; project.host_path
copy the scans into <host_path>/sourcedata/sub-101/<T1w|T2w|ct|dwi|fmap>/ # your own file tools;
# fmap = the DWI's short reverse-PE scan (e.g. PA)
propose_pipeline(title="Head model for sub-101", rationale="...",
steps=[{"id": "pre", "kind": "pre", "subject_ids": ["101"], "config": {}}])
watch_proposal(proposal_id=...) # last call of the turn; wakes you on changes
find_regions(subject_id="101", query="thalamus") # atlases exist only after preprocessing
propose_pipeline(title="Maximise the field in the bilateral thalamus", rationale="...",
steps=[
{"id": "opt", "kind": "flex", "subject_ids": ["101"],
"config": {"goal": "mean", "roi": <rois.all>, "output_folder": "thalamus_mean"}},
{"id": "sim", "kind": "sim_from_flex", "subject_ids": ["101"],
"config": {"flex_step": "opt"}}]) # electrodes + currents from that run
watch_proposal(proposal_id=...) # -> approved; watch again
# -> opt succeeded (the app queues sim); again
# -> sim succeeded, done: final summary
Two proposals, because an atlas target needs the head model first; with a coordinate target
(SphericalROI) or a subject that already has has_m2m: true, propose pre → flex →
sim_from_flex (with after) in one plan, or skip pre. To simulate an existing run, propose
one sim_from_flex step with "flex_run": "<run name>".
Direct mode (approval_required: false, the user turned it on): plan_job then
submit_job per step, wait_for_job between dependent steps (also the last call of a turn —
it backgrounds like watch_proposal), and simulate_flex_result for a flex result.
subject_id is without sub-. config for pre takes the Pre-processing page's flags; set
run_fastsurfer: false only if the user says so (it supplies the subcortical atlases).
| The user says | Send |
|---|---|
| "high / maximum intensity", "strongest field in X" | goal: "mean" (mean field in the ROI); "max" only for "peak" |
| "focal", "spare the rest of the brain" | goal: "focality_tf", intensity_weight 0 (balanced) to 1 (favour intensity) |
| "focality with thresholds" | kind flex_adaptive (the app's default focality mode), goal: "focality" |
| "bilateral X", "both X" | roi: rois.all from find_regions (union of left and right) |
| "left X" / "right X" | rois.left / rois.right |
| "N mA" | current_mA: N (per channel; total is 2N). Otherwise leave the 1 mA default — field scales linearly with current, so the placement is what the search decides |
| "map to ", "use the 10-10 cap" | enable_mapping: true, eeg_net: "<net file>.csv" |
| "more thorough" | n_multistart: 3 (or more); it is the only thing CPUs parallelise |
ROI choice: find_regions returns SubcorticalROI (volume atlas — deep structures such as
thalamus, hippocampus, amygdala) and AtlasROI (cortical surface atlas). Paste the object
verbatim into roi. Each atlas has a space: prefer subject (the subject's own anatomy); use
an mni one (a shipped template atlas such as CIT168 or Harvard-Oxford, warped to the subject)
for a structure the subject's atlases lack or when the user names that atlas. For a target given as coordinates use
{"_type": "SphericalROI", "x": [..], "y": [..], "z": [..], "radius": [..], "use_mni": true, "volumetric": true, "tissues": "GM"} — volumetric: true for deep targets. ex-search takes
different targets (an ROI CSV and a leadfield); read get_config_schema(kind="ex") first.
sim_from_flex step (flex_step or flex_run; optional eeg_net,
intensities and any SimulationConfig field such as "conductivity": "vn", which needs
DTI) — or, in direct mode, simulate_flex_result. Both use the app's rule: the run's
electrodes (a mapped EEG net if the run has one, or the eeg_net you pass, else the
optimised XYZ positions) and the run's own current.sim step (or submit_job in direct mode) with
config={"montages": [{"_type": "Montage", "name": ..., "mode": "net", "electrode_pairs": [[a, b], [c, d]], "eeg_net": ...}], "intensities": [mA, mA]}. Each [a, b] is one channel
(Ek+, Ek-): two channels is TI; four or more is mTI with one current per channel.| Symptom | Do |
|---|---|
missing_inputs from plan_job | Read each how_to_fix; usually run pre first |
| HTTP 403 on submit | Approval is required: use propose_pipeline |
A step error / skipped in get_proposal | Tell the user; they can retry the step from the card once the cause is fixed |
| HTTP 422 on submit | The detail names the field; fix it and plan again |
| HTTP 409 / overwrite refusal | Ask the user; resubmit with overwrite: true or a new run name |
Job failed | Quote error.message + log_tail; check read_wiki_page("troubleshooting") |
Job lost | The server restarted mid-run; resubmit after telling the user |
| "Several TI-Toolbox projects are open" | Ask which project; connect(project=<path>) |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ti-toolbox, neurostimulation, pipeline-automation, mcp-server
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-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./ti-toolboxOrientation for the Temporal Interference Toolbox (TI-Toolbox, Python package `tit`). Use whenever the user mentions TI-Toolbox, TI stimulation simulation/optimization, SimNIBS-based TI workflows, flex-search, ex-search, mTI, the v3 desktop app, or a BIDS project with derivatives/SimNIBS. Explains how the toolbox runs, where docs live, and which MCP tools to call./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