# tribev2-brain-encoding

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 810 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/tribev2-brain-encoding/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/tribev2-brain-encoding

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/tribev2-brain-encoding/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/tribev2-brain-encoding/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/tribev2-brain-encoding/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/tribev2-brain-encoding/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills tribev2-brain-encoding
```

2. **Manually: put the files in place**
- File: `.github/skills/tribev2-brain-encoding/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/tribev2-brain-encoding
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/tribev2-brain-encoding/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill tribev2-brain-encoding -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/tribev2-brain-encoding/SKILL.md

## When to use it
- 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
- Load TRIBE v2 and predict brain responses to `video.mp4`
- Build an events dataframe from `narration.txt` and run inference
- Project the predictions to fsaverage5 and mask V1

## Similar
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [writing-for-agents](https://affpapa.org/en/nevibecode/skills/writing-for-agents.md) — skill · 466719 installs
- [media-use](https://affpapa.org/en/nevibecode/skills/media-use.md) — skill · 1100000 installs
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [subagent-driven-development](https://affpapa.org/en/nevibecode/skills/subagent-driven-development.md) — skill · 237746 installs
- [orchestration](https://affpapa.org/en/nevibecode/skills/orchestration.md) — skill · 349800 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 139 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
