Agent skill

Drift Diffusion Model

by NeuroAIHub in NeuroAIHub/BrainPilot

Expert guidance on selecting, fitting, and evaluating drift-diffusion models for two-choice response time data in cognitive science

AGPL-3.0Auto-check passedAI & LLM Engineering

Install Drift Diffusion Model

skills CLI
$ npx skills add NeuroAIHub/BrainPilot --skill drift-diffusion-model -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NeuroAIHub/BrainPilot drift-diffusion-model --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NeuroAIHub/BrainPilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/skills/skills/03_Cognitive_Psychology/drift-diffusion-model .claude/skills/drift-diffusion-model && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
drift-diffusion-model
GitHub stars
1.1k
Token cost
~3k tokens
SKILL.md length
1,284 words
Files
3 (incl. references)
Skills in repo
59
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Expert guidance on selecting, fitting, and evaluating drift-diffusion models for two-choice response time data in cognitive science

  • Works in 4 steps: Assess Your Research Question → Assess Data Characteristics → Choose Variant → …
  • Tasks that involve Diffusion and image models
  • SKILL.md covers Purpose, When to Use This Skill, When NOT to Use This Skill and Research Planning Protocol, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Drift Diffusion Model is an agent skill from NeuroAIHub/BrainPilot. Expert guidance on selecting, fitting, and evaluating drift-diffusion models for two-choice response time data in cognitive science

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/fitting-guide.md` and `references/model-variants.md`).

It sits in AI & LLM Engineering, covering Diffusion and image models. The repository describes itself as: BrainPilot: Automating Brain Discovery with Agentic Research. The licence is AGPL-3.0.

When your agent uses it

  • Tasks that involve Diffusion and image models

Example prompts

  • “/drift-diffusion-model”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Assess Your Research Question
  2. Assess Data Characteristics
  3. Choose Variant
  4. Select Fitting Method

What it can do on your machine

Read from SKILL.md and the folder at commit 93f6855. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Drift Diffusion Model loads about 3k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 38 tokens; SKILL.md has 1,284 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from NeuroAIHub/BrainPilot at commit 93f6855, republished under its AGPL-3.0 licence (© NeuroAIHub). 1,284 words, ~3,031 tokens.

Download SKILL.mdSave it as .claude/skills/drift-diffusion-model/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
drift-diffusion-model
description
Expert guidance on selecting, fitting, and evaluating drift-diffusion models for two-choice response time data in cognitive science
domain
computational-cognitive-modeling
version
1.0.0
papers
Ratcliff, 1978, Ratcliff & McKoon, 2008, Wagenmakers et al., 2007, Voss et al., 2013, Wiecki et al., 2013
dependencies.required
research-literacy
review_status
ai-generated

Drift-Diffusion Model

Purpose

This skill encodes expert knowledge for applying drift-diffusion models (DDMs) to two-choice reaction time data. DDMs decompose observed accuracy and RT distributions into latent cognitive processes — evidence accumulation rate, response caution, and non-decision time. This skill guides researchers through model variant selection, parameter fitting, and result evaluation, encoding domain-specific judgment that requires specialized training in computational cognitive modeling.

When to Use This Skill

  • Designing a study where two-alternative forced choice (2AFC) RT data will be collected and you want to decompose behavior into latent cognitive components
  • Choosing between DDM variants (classic DDM, full DDM, EZ-diffusion, HDDM, LBA) for a given dataset and research question
  • Setting up model fitting: selecting fitting method, preparing data, configuring software tools
  • Evaluating model fit quality: checking parameter recovery, running posterior predictive checks, comparing nested models
  • Interpreting DDM parameters in terms of cognitive processes (e.g., drift rate as evidence quality, boundary separation as response caution)
  • Troubleshooting fitting problems: convergence failures, implausible parameter estimates, poor fits to RT quantiles

When NOT to Use This Skill

  • Tasks with more than two response options require multi-accumulator models (see Racing Diffusion Model or LBA in references/model-variants.md)
  • Go/No-Go tasks violate the two-boundary assumption; use single-boundary models or SSP models instead (Ratcliff et al., 2018)
  • Tasks where speed-accuracy tradeoff is not a meaningful dimension (e.g., pure accuracy tasks with unlimited time)
  • If you only need a coarse summary of RT effects and do not need process-level decomposition, standard ANOVA on mean RT may suffice

Research Planning Protocol

Before executing the domain-specific steps below, you MUST:

  1. State the research question — What cognitive process decomposition question is this DDM addressing?
  2. Justify the method choice — Why DDM (not simple RT analysis, Bayesian models, etc.)? What alternatives were considered?
  3. Declare expected outcomes — Which parameter(s) do you expect to differ across conditions, and in what direction?
  4. Note assumptions and limitations — What does the DDM assume (e.g., 2AFC, stationary drift)? Where could it mislead?
  5. Present the plan to the user and WAIT for confirmation before proceeding.

For detailed methodology guidance, see the research-literacy skill.

⚠️ Verification Notice

This skill was generated by AI from academic literature. All parameters, thresholds, and citations require independent verification before use in research. If you find errors, please open an issue.

Core Concepts

What the DDM Models

The DDM assumes that on each trial, noisy evidence accumulates over time from a starting point toward one of two decision boundaries. The key insight: observed RT = decision time + non-decision time, and accuracy depends on which boundary is reached first (Ratcliff, 1978).

The Four Core Parameters
ParameterSymbolCognitive InterpretationTypical RangeSource
Drift ratevQuality/strength of evidence accumulation0.1 – 5.0 (commonly 0.5–3.0)Ratcliff & McKoon, 2008; Voss et al., 2004, Table 2
Boundary separationaResponse caution (speed-accuracy tradeoff)0.5 – 2.5 (commonly 0.8–2.0)Ratcliff & McKoon, 2008; Voss et al., 2004, Table 2
Non-decision timet0 (or Ter)Encoding + motor execution time0.1 – 0.6 s (commonly 0.2–0.5 s)Ratcliff & McKoon, 2008; Matzke & Wagenmakers, 2009, Table 1
Starting pointzResponse bias (relative to boundaries)a/2 (unbiased) ± 20%Ratcliff & McKoon, 2008; Voss et al., 2013
Trial-to-Trial Variability Parameters (Full DDM)
ParameterSymbolInterpretationTypical RangeSource
Drift rate variabilitysvCross-trial variation in evidence quality0 – 2.0Ratcliff & McKoon, 2008
Starting point variabilityszCross-trial variation in bias0 – 0.3 × aRatcliff & McKoon, 2008
Non-decision time variabilityst0Cross-trial variation in encoding/motor time0 – 0.3 sRatcliff & McKoon, 2008

Decision Logic: Choosing a Model Variant

Step 1: Assess Your Research Question
Is the goal to decompose RT data into cognitive components?
├── YES → Continue to Step 2
└── NO → DDM may not be needed; consider simpler analyses
Step 2: Assess Data Characteristics
How many trials per condition do you have?
├── < 20 trials → Insufficient for any DDM variant (Ratcliff & Childers, 2015)
├── 20-40 trials → Use EZ-diffusion only (Wagenmakers et al., 2007)
├── 40-100 trials → Classic 4-parameter DDM or EZ-diffusion
├── 100-200 trials → Full DDM possible but fix some variability parameters
└── > 200 trials → Full DDM with all 7 parameters estimable

(Trial count thresholds: Ratcliff & Childers, 2015, simulation study)

Step 3: Choose Variant
Are you comparing groups or conditions at the population level?
├── YES, with moderate sample size (N > 15 participants)
│ └── Consider HDDM for hierarchical/Bayesian estimation (Wiecki et al., 2013)
├── YES, with large trial counts per person
│ └── Classic or Full DDM per participant, then group-level tests on parameters
└── Exploratory / individual differences focus
 └── HDDM or hierarchical Bayesian approach
How many response alternatives?
├── 2 → Standard DDM variants
├── > 2 → LBA or Racing Diffusion Model (see references/model-variants.md)
└── Go/No-Go → Single-boundary model (not covered here)

See references/model-variants.md for detailed comparison of all variants.

Step 4: Select Fitting Method
What variant did you choose?
├── EZ-diffusion → Closed-form solution, no fitting needed (Wagenmakers et al., 2007)
├── Classic/Full DDM → Use fast-dm (Voss & Voss, 2007) or PyDDM (Shinn et al., 2020)
│ ├── MLE: Best for large trial counts (>100 per condition)
│ ├── Chi-square: Robust for moderate trial counts (Ratcliff & Tuerlinckx, 2002)
│ └── Quantile-based (QMP): Most robust to outliers (Heathcote et al., 2002)
└── HDDM → Use HDDM Python package, Bayesian estimation (Wiecki et al., 2013)

See references/fitting-guide.md for the complete fitting workflow.

Fitting Workflow Summary

  1. Data Preparation: Clean RTs, apply cutoffs (remove < 200 ms and > 3000-5000 ms; Ratcliff, 1993; Ratcliff & Tuerlinckx, 2002), code accuracy
  2. Model Specification: Choose parameters to estimate vs. fix; decide which parameters vary across conditions
  3. Parameter Estimation: Run fitting with chosen method and tool
  4. Convergence Check: Verify optimizer converged; run multiple starting points
  5. Model Comparison: Use BIC (for MLE-fitted models) or DIC/WAIC (for Bayesian; Spiegelhalter et al., 2002) to compare nested models
  6. Posterior Predictive Check: Simulate data from fitted parameters; compare predicted vs. observed RT quantiles (Ratcliff & McKoon, 2008, Fig. 2)
  7. Parameter Recovery: Simulate data with known parameters; verify your pipeline can recover them (Heathcote et al., 2015)

See references/fitting-guide.md for detailed guidance on each step.

Interpreting Parameters

Drift Rate (v)
  • Higher v = faster, more accurate decisions
  • Sensitive to: stimulus difficulty, attention, perceptual quality
  • Manipulations that typically affect v: stimulus contrast, coherence (motion dots), word frequency (Ratcliff et al., 2004)
  • If v is near 0 for a condition, participants are essentially guessing
Show full SKILL.md (496 more words)Show less
Boundary Separation (a)
  • Higher a = more cautious (slower but more accurate)
  • Sensitive to: speed-accuracy instructions, emphasis conditions
  • Manipulations that typically affect a: speed vs. accuracy instruction (Ratcliff & McKoon, 2008), reward structure
  • If a changes across stimulus conditions (rather than instruction conditions), reconsider the model specification
Non-Decision Time (t0)
  • Reflects encoding + response execution time
  • Sensitive to: stimulus degradation, response modality (key press vs. voice)
  • Manipulations that typically affect t0: stimulus masking, response complexity (Ratcliff & McKoon, 2008)
  • If t0 > 0.5 s, check for unusually slow motor responses or task-specific encoding demands
Starting Point (z)
  • Reflects a priori bias toward one response
  • Sensitive to: prior probability, payoff asymmetry
  • When z = a/2, no bias; z > a/2 = bias toward upper boundary
  • Manipulations that typically affect z: unequal base rates, cue validity (Ratcliff & McKoon, 2008; Voss et al., 2004)

Common Pitfalls

  1. Fitting too many free parameters with too few trials: The full 7-parameter DDM requires >200 trials per condition for stable estimates (Ratcliff & Childers, 2015). With fewer trials, fix variability parameters or use EZ-diffusion.

  2. Ignoring RT outliers: Extremely fast (< 200 ms) or slow (> 3000–5000 ms) RTs likely reflect non-decision processes (guesses, lapses). Include these and they distort parameter estimates (Ratcliff, 1993; Ratcliff & Tuerlinckx, 2002). Apply cutoffs BEFORE fitting.

  3. Not checking parameter recovery: Always simulate data with known parameters using your exact pipeline and verify you can recover them. Poor recovery means your results are uninterpretable (Heathcote et al., 2015; White et al., 2018).

  4. Confusing drift rate and boundary effects: Speed-accuracy tradeoff instructions should primarily affect boundary separation (a), not drift rate (v). If both change, the model may be misspecified or the manipulation has multiple effects (Ratcliff & McKoon, 2008).

  5. Using mean RT instead of full RT distributions: DDMs leverage the shape of the entire RT distribution. Analyzing only mean RT discards the information DDMs are designed to capture (Ratcliff, 1978; Wagenmakers et al., 2007).

  6. Neglecting error RT distributions: Correct and error RT distributions are jointly constrained by the DDM. Fitting only correct RTs loses critical information about the generative process (Ratcliff & McKoon, 2008).

  7. Treating HDDM posterior modes as point estimates: Bayesian models yield posterior distributions. Report and interpret the full posterior, including credible intervals, rather than treating the mode as a frequentist point estimate (Wiecki et al., 2013).

Key References

  • Ratcliff, R. (1978). A theory of memory retrieval. Psychological Review, 85(2), 59–108.
  • Ratcliff, R., & McKoon, G. (2008). The diffusion decision model: Theory and data for two-choice decision tasks. Neural Computation, 20(4), 873–922.
  • Wagenmakers, E.-J., van der Maas, H. L. J., & Grasman, R. P. P. P. (2007). An EZ-diffusion model for response time and accuracy. Psychonomic Bulletin & Review, 14(1), 3–22.
  • Voss, A., Nagler, M., & Lerche, V. (2013). Diffusion models in experimental psychology: A practical introduction. Experimental Psychology, 60(6), 385–402.
  • Wiecki, T. V., Sofer, I., & Frank, M. J. (2013). HDDM: Hierarchical Bayesian estimation of the drift-diffusion model in Python. Frontiers in Neuroinformatics, 7, 14.
  • See references/model-variants.md for DDM family details.
  • See references/fitting-guide.md for the complete fitting workflow.

© NeuroAIHub, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in packages/skills/skills/03_Cognitive_Psychology/drift-diffusion-model of NeuroAIHub/BrainPilot.

  • SKILL.md
  • references/fitting-guide.md
  • references/model-variants.md

Open the folder on GitHubat commit 93f6855

Compare with similar skills

Drift Diffusion Model next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Drift Diffusion Model compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Drift Diffusion Model this skillNeuroAIHub/BrainPilot1.1k—~3kAutomated safety check: PassAGPL-3.0
Adapt New Diffusion Modelintel/auto-round1.6k—~2.8kAutomated safety check: PassApache-2.0
Add Pipelineverl-project/verl-omni1.2k—~1kAutomated safety check: PassApache-2.0
Comfyui AnimatoolShiroEirin/comfyui-good-anima481—~4.6kAutomated safety check: PassGPL-3.0
Stage1 Add VaeEnd2End-Diffusion/diffusion-bench105—~1.1kAutomated safety check: PassNone
Comfyui Agent Skill MieMieMieeeee/comfyui-agent-skill116—~3.9kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    Adapt AutoRound to support a new diffusion model architecture (DiT, UNet, hybrid AR+DiT).

    1.6k GitHub stars~2.8k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Add Pipeline

    verl-project/verl-omni

    Router for adding a diffusion or omni pipeline to verl-omni.

    1.2k GitHub stars~1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Comfyui Animatool

    ShiroEirin/comfyui-good-anima

    Route ALL Anima image generation: validate Danbooru hard anchors, form visual brief, assemble English prompts and args, then load comfyui-manager for workflow execution.

    481 GitHub stars~4.6k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Stage1 Add Vae

    End2End-Diffusion/diffusion-bench

    Add a new HuggingFace-supported VAE to the stage1 tokenizer pipeline.

    105 GitHub stars~1.1k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Comfyui Agent Skill Mie

    MieMieeeee/comfyui-agent-skill

    Agent skill for running registered ComfyUI workflows through a stable CLI, and for importing a user's own ComfyUI workflow into their private registry after review.

    116 GitHub stars~3.9k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check passed
  • Importing Subgraphs

    Comfy-Org/workflow_templates

    Imports and registers subgraph blueprints into the ComfyUI workflowtemplates repository.

    1.3k GitHub stars~1.5k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from NeuroAIHub/BrainPilot

All 59 skills in this repo
  • Deeplabcut

    NeuroAIHub/BrainPilot

    Toolbox for markerless animal pose estimation with DeepLabCut.

    1.1k GitHub stars~1.7k tokensUpdated 7 days ago
    Auto-check passed
  • Fmriprep

    NeuroAIHub/BrainPilot

    Preprocess task-based or resting-state fMRI data with fMRIPrep — a robust, BIDS-App preprocessing pipeline built on FSL, ANTs, FreeSurfer, AFNI, and Nilearn.

    1.1k GitHub stars~4.1k tokensUpdated 7 days ago
    Auto-check passed
  • Mne Python Guide

    NeuroAIHub/BrainPilot

    Domain-validated pipeline guidance for EEG/MEG data analysis using MNE-Python: data loading, preprocessing (filtering, ICA, re-referencing), epoching, ERP/ERF computation, time-frequency…

    1.1k GitHub stars~2.3k tokensUpdated 7 days ago
    Auto-check passed
  • Netneurotools Guide

    NeuroAIHub/BrainPilot

    Domain-validated guidance for network neuroscience analysis using netneurotools: datasets, brain network metrics, connectivity consensus, modularity, spatial statistics, null models, and cortical…

    1.1k GitHub stars~2.6k tokensUpdated 7 days ago
    Auto-check passed
  • Nature Figure

    NeuroAIHub/BrainPilot

    Submission-grade Nature/high-impact journal figure workflow for Python or R.

    1.1k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Pycortex Guide

    NeuroAIHub/BrainPilot

    Domain-validated guidance for cortical surface visualization and brain surface rendering of fMRI data using pycortex: data types (Volume, Vertex, Dataset), 2D cortical flatmaps, 3D WebGL brain…

    1.1k GitHub stars~1.6k tokensUpdated 7 days ago
    Auto-check passed

Questions about Drift Diffusion Model

What does Drift Diffusion Model do?

Expert guidance on selecting, fitting, and evaluating drift-diffusion models for two-choice response time data in cognitive science. Drift Diffusion Model is an agent skill from NeuroAIHub/BrainPilot.

When should I use Drift Diffusion Model?

Drift Diffusion Model fits situations like: tasks that involve Diffusion and image models.

How do I install Drift Diffusion Model in Claude Code?

Run `npx skills add NeuroAIHub/BrainPilot --skill drift-diffusion-model -a claude-code`. Or copy the skill folder (packages/skills/skills/03_Cognitive_Psychology/drift-diffusion-model in NeuroAIHub/BrainPilot) into .claude/skills/drift-diffusion-model in your project. Claude Code loads it when a task matches its description.

How do I install Drift Diffusion Model in Codex?

Run `npx skills add NeuroAIHub/BrainPilot --skill drift-diffusion-model -a codex`. Or copy the skill folder (packages/skills/skills/03_Cognitive_Psychology/drift-diffusion-model in NeuroAIHub/BrainPilot) into .agents/skills/drift-diffusion-model in your project. Codex loads it when a task matches its description.

Can I use Drift Diffusion Model in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NeuroAIHub/BrainPilot --skill drift-diffusion-model -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/drift-diffusion-model, .gemini/skills/drift-diffusion-model, .github/skills/drift-diffusion-model and .opencode/skills/drift-diffusion-model in your project.

What does Drift Diffusion Model need to run?

SKILL.md names no scripts, command-line tools or credentials: Drift Diffusion Model is instructions for the agent only. Our summary lists: Python 3.

Does Drift Diffusion Model access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Drift Diffusion Model safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Drift Diffusion Model use?

Drift Diffusion Model is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Drift Diffusion Model use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 15k tokens, read only when the agent opens those files.

What are the alternatives to Drift Diffusion Model?

Skills that share tags, products or a category with Drift Diffusion Model: Adapt New Diffusion Model (intel/auto-round, 1.6k stars), Add Pipeline (verl-project/verl-omni, 1.2k stars), Comfyui Animatool (ShiroEirin/comfyui-good-anima, 481 stars) and Stage1 Add Vae (End2End-Diffusion/diffusion-bench, 105 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Drift Diffusion Model?

NeuroAIHub (a GitHub organization) maintains it in NeuroAIHub/BrainPilot, which has 1,062 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on October 2, 2026.

Source: NeuroAIHub/BrainPilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.