Skill metadata
Reference: full SKILL.md
The following is the complete skill definition that Mibyan loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
NeuroSkill BCI Integration
Connect Mibyan to a running NeuroSkill instance to read real-time brain and body metrics from a BCI wearable. Use this to give cognitively-aware responses, suggest interventions, and track mental performance over time.⚠️ Research Use Only — NeuroSkill is an open-source research tool. It is NOT a medical device and has NOT been cleared by the FDA, CE, or any regulatory body. Never use these metrics for clinical diagnosis or treatment.See
references/metrics.md for the full metric reference, references/protocols.md
for intervention protocols, and references/api.md for the WebSocket/HTTP API.
Prerequisites
- Node.js 20+ installed (
node --version) - NeuroSkill desktop app running with a connected BCI device
- BCI hardware: Muse 2, Muse S, or OpenBCI (4-channel EEG + PPG + IMU via BLE)
npx neuroskill statusreturns data without errors
Verify Setup
npx neuroskill status returns an error, tell the user:
- Make sure the NeuroSkill desktop app is open
- Ensure the BCI device is powered on and connected via Bluetooth
- Check signal quality — green indicators in NeuroSkill (≥0.7 per electrode)
- If
command not found, install Node.js 20+
CLI Reference: npx neuroskill <command>
All commands support --json (raw JSON, pipe-safe) and --full (human summary + JSON).
Global Flags
1. Checking Current State
Get Live Metrics
--json for reliable parsing. The default output is colorized
human-readable text.
Key Fields in the Response
Thescores object contains all live metrics (0–1 scale unless noted):
device (state, battery, firmware), signal_quality (per-electrode 0–1),
session (duration, epochs), embeddings, labels, sleep summary, and history.
Interpreting the Output
Parse the JSON and translate metrics into natural language. Never report raw numbers alone — always give them meaning: DO:“Your focus is solid right now at 0.70 — that’s flow state territory. Heart rate is steady at 68 bpm and your FAA is positive, which suggests good approach motivation. Great time to tackle something complex.”DON’T:
“Focus: 0.70, Relaxation: 0.40, HR: 68”Key interpretation thresholds (see
references/metrics.md for the full guide):
- Focus > 0.70 → flow state territory, protect it
- Focus < 0.40 → suggest a break or protocol
- Drowsiness > 0.60 → fatigue warning, micro-sleep risk
- Relaxation < 0.30 → stress intervention needed
- Cognitive Load > 0.70 sustained → mind dump or break
- TBR > 1.5 → theta-dominant, reduced executive control
- FAA < 0 → withdrawal/negative affect — consider FAA rebalancing
- SNR < 3 dB → unreliable signal, suggest electrode repositioning
2. Session Analysis
Single Session Breakdown
"up", "down", "flat").
Use this to describe how a session evolved:
“Your focus started at 0.64 and climbed to 0.76 by the end — a clear upward trend. Cognitive load dropped from 0.38 to 0.28, suggesting the task became more automatic as you settled in.”
List All Sessions
3. Historical Search
Neural Similarity Search
- “When was I last in a state like this?”
- “Find my best focus sessions”
- “When do I usually crash in the afternoon?”
Semantic Label Search
Cross-Modal Graph Search
--k-text,
--k-EXG, --reach <minutes> to tune.
4. Session Comparison
insights.improved[] and insights.declined[] arrays,
sleep staging for both sessions, and a UMAP job ID.
Interpret comparisons with context — mention trends, not just deltas:
“Yesterday you had two strong focus blocks (10am and 2pm). Today you’ve had one starting around 11am that’s still going. Your overall engagement is higher today but there have been more stress spikes — your stress index jumped 15% and FAA dipped negative more often.”
5. Sleep Data
- Stage codes: 0=Wake, 1=N1, 2=N2, 3=N3 (deep), 4=REM
- Analysis: efficiency_pct, onset_latency_min, rem_latency_min, bout counts
- Healthy targets: N3 15–25%, REM 20–25%, efficiency >85%, onset <20 min
6. Labeling Moments
- User reports a breakthrough or insight
- User starts a new task type (e.g., “switching to code review”)
- User completes a significant protocol
- User asks you to mark the current moment
- A notable state transition occurs (entering/leaving flow)
search-labels
and interactive commands.
7. Real-Time Streaming
--http).
Use this for continuous monitoring scenarios or to observe metric changes in real-time
during a protocol.
8. UMAP Visualization
separation_score
indicates how neurally distinct two sessions are:
- > 1.5 → Sessions are neurally distinct (different brain states)
- < 0.5 → Similar brain states across both sessions
9. Proactive State Awareness
Session Start Check
At the beginning of a session, optionally run a status check if the user mentions they’re wearing their device or asks about their state:“Quick check-in: focus is building at 0.62, relaxation is good at 0.55, and your FAA is positive — approach motivation is engaged. Looks like a solid start.”
When to Proactively Mention State
Mention cognitive state only when:- User explicitly asks (“How am I doing?”, “Check my focus”)
- User reports difficulty concentrating, stress, or fatigue
- A critical threshold is crossed (drowsiness > 0.70, focus < 0.30 sustained)
- User is about to do something cognitively demanding and asks for readiness
10. Suggesting Protocols
When metrics indicate a need, suggest a protocol fromreferences/protocols.md.
Always ask before starting — never interrupt flow state:
“Your focus has been declining for the past 15 minutes and TBR is climbing past 1.5 — signs of theta dominance and mental fatigue. Want me to walk you through a Theta-Beta Neurofeedback Anchor? It’s a 90-second exercise that uses rhythmic counting and breath to suppress theta and lift beta.”Key triggers:
- Focus < 0.40, TBR > 1.5 → Theta-Beta Neurofeedback Anchor or Box Breathing
- Relaxation < 0.30, stress_index high → Cardiac Coherence or 4-7-8 Breathing
- Cognitive Load > 0.70 sustained → Cognitive Load Offload (mind dump)
- Drowsiness > 0.60 → Ultradian Reset or Wake Reset
- FAA < 0 (negative) → FAA Rebalancing
- Flow State (focus > 0.75, engagement > 0.70) → Do NOT interrupt
- High stillness + headache_index → Neck Release Sequence
- Low RMSSD (< 25ms) → Vagal Toning
11. Additional Tools
Focus Timer
Calibration
OS Notifications
Raw JSON Passthrough
Error Handling
Example Interactions
“How am I doing right now?”references/protocols.md.
→ If metrics look fine, the issue may be motivational rather than neurological.
“Compare my focus today vs yesterday”
References
- NeuroSkill Paper — arXiv:2603.03212 (Kosmyna & Hauptmann, MIT Media Lab)
- NeuroSkill Desktop App (GPLv3)
- NeuroLoop CLI Companion (GPLv3)
- MIT Media Lab Project

