tribev2-brain-encoding — Claude Code skill: fMRI prediction from video
A skill that wires the TRIBE v2 model into your agent so it can predict brain responses to video, audio and text. Built for research work.
npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a claude-codeWhat tribev2-brain-encoding does
TRIBE v2 comes from Meta and merges three encoders: LLaMA 3.2 handles text, V-JEPA2 handles video, Wav2Vec-BERT handles audio. A shared Transformer maps those representations onto the fsaverage5 cortical surface, roughly 20k vertices. The skill lets your agent run inference and training against it.
Inference needs only pip install -e .. Brain plots pull in the [plotting] extras with PyVista and Nilearn; full training pulls [training] with PyTorch Lightning and W&B. Weights come from HuggingFace via TribeModel.from_pretrained("facebook/tribev2", cache_folder="./cache"). You then build an events dataframe with get_events_dataframe and call predict.
Training from scratch runs into LLaMA 3.2 gating. You log in with huggingface-cli login using a read token and wait for access approval on the model page. Grid searches are written for Slurm and read DATAPATH, SAVEPATH and SLURM_PARTITION from the environment. No GPU means no training.
What it helps with
- predict cortical responses to a video clip
- combine video, audio and text into one multimodal input
- project MNI data onto the fsaverage5 surface
- pull responses for a single region such as V1
- batch predictions across several videos
Example prompts for the agent
- Load TRIBE v2 and predict brain responses to
video.mp4 - Build an events dataframe from
narration.txtand run inference - Project the predictions to fsaverage5 and mask V1
How to install tribev2-brain-encoding
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a claude-code2Manually: put the files in place
~/.claude/skills/tribev2-brain-encoding/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/tribev2-brain-encoding/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a codex2Manually: put the files in place
.agents/skills/tribev2-brain-encoding/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a cursor2Manually: put the files in place
.cursor/skills/tribev2-brain-encoding/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills tribev2-brain-encoding2Manually: put the files in place
.github/skills/tribev2-brain-encoding/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/tribev2-brain-encodingManually: put the files in place
.devin/skills/tribev2-brain-encoding/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about tribev2-brain-encoding
How do I install tribev2-brain-encoding in Claude Code?
Run npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a claude-code. The skill lands in ~/.claude/skills/tribev2-brain-encoding/SKILL.md.
What does tribev2-brain-encoding do?
It gives the agent access to TRIBE v2: build an events dataframe from video, audio or text, call predict, and get an array of responses per cortical vertex.
What is required to train a model from scratch?
Gated access to LLaMA 3.2 on HuggingFace — huggingface-cli login with a read token plus an approved request. You also need a GPU, and Slurm for the full grid search.