eeg-microstate

Fit and back-fit EEG microstate templates to quantify scalp microstate dynamics.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/dengzhe-hou/auto-eeg-analysis --skill eeg-microstate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: eeg-microstate
Source: https://github.com/dengzhe-hou/auto-eeg-analysis/tree/main/skills/eeg-microstate
Command: npx skills add https://github.com/dengzhe-hou/auto-eeg-analysis --skill eeg-microstate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you compute standardized EEG microstate statistics (coverage, GEV, mean duration, occurrence, and transitions) from cleaned EEG without manually stitching together microstate-analysis steps.

Core Features & Use Cases

  • GFP-peak microstate segmentation: fits modified k-means microstate models using GFP peaks rather than all time points.
  • Configurable K and templates: supports Koenig-style canonical K (default 4) and optional published vs fitted template modes.
  • Backend-validated execution: resolves and uses pycrostates through ENVIRONMENT.json to ensure the right runtime.
  • Actionable outputs: writes per-subject microstate parameter JSON plus group template files and a summary CSV, and appends results to FINDINGS.md for reporting.

Quick Start

Run microstate analysis on your project by ensuring ANALYSIS_PLAN.md and clean-stage data exist, then instruct your agent: "/eeg-microstate projects/my-study -- k: 4 -- template: fit-here".

Frequently Asked Questions about eeg-microstate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I quantify EEG microstate dynamics from cleaned resting-state data?

You can quantify EEG microstate dynamics by fitting modified k-means models to GFP peaks in cleaned resting-state EEG, which outputs coverage, GEV, mean duration, occurrence, and transition probability matrices automatically.

What EEG microstate statistics are included in a standard segmentation analysis?

Standard EEG microstate segmentation analysis includes coverage, global explained variance (GEV), mean duration, occurrence, and a transition probability matrix to characterize scalp topography temporal dynamics across conditions.

How do I run modified k-means microstate segmentation using GFP peaks?

Run modified k-means microstate segmentation by configuring the pycrostates backend and fitting models to GFP peaks in your continuous EEG data, using configurable K values like the default Koenig-style 4 canonical templates.

Do I need pre-cleaned EEG data to compute microstate parameters?

Yes, computing microstate parameters requires pre-cleaned or continuous EEG data available in clean-stage or epochs-stage formats, plus a frozen ANALYSIS_PLAN.md and a resolved pycrostates backend configured via ENVIRONMENT.json.

What is the best way to compare EEG microstate transitions across experimental conditions?

The best way to compare EEG microstate transitions across conditions is to fit and back-fit microstate templates per subject, generating transition probability matrices and group summary CSV files for direct statistical comparison.

Why does my pycrostates EEG microstate analysis fail to execute?

Your pycrostates EEG microstate analysis may fail to execute if the backend is unresolved in ENVIRONMENT.json, or if the ANALYSIS_PLAN.md is not frozen and cleaned continuous EEG data is absent from clean-stage or epochs-stage directories.