home / skills / openclaw / skills / neuralink-decoder
/skills/aadipapp/neuralink-decoder
This skill simulates neural spike activity and decodes it into 2D cursor velocity for Brain-Computer Interface experiments.
npx playbooks add skill openclaw/skills --skill neuralink-decoderReview the files below or copy the command above to add this skill to your agents.
---
name: neuralink-decoder
description: Simulates and decodes neural spike activity into cursor movement (BCI).
author: tempguest
version: 0.1.0
license: MIT
---
# Neuralink Decoder Skill
This skill simulates a Brain-Computer Interface (BCI).
It generates synthetic neural spiking data based on cosine tuning (motor cortex model) and uses a linear decoder to reconstruct cursor velocity.
## Features
- **Neural Simulator**: Generates realistic spike trains for 64 neurons.
- **Decoder**: Maps spike rates to 2D velocity ($v_x, v_y$).
- **Visualization**: Prints the decoded trajectory.
## Commands
- `decode`: Run the simulation and decoding loop.
This skill simulates a Brain-Computer Interface that decodes synthetic neural spike activity into 2D cursor movement. It generates cosine-tuned spike trains for a population of neurons and applies a linear decoder to reconstruct velocity. The output includes a printed trajectory for quick inspection.
The simulator creates spike trains for a fixed population (default 64 neurons) using cosine tuning relative to intended movement directions and firing-rate noise. Spike counts are converted into rate vectors which a precomputed linear mapping transforms into x/y velocity estimates. The tool runs a time-stepped loop that simulates spikes, decodes velocities, and reports the resulting cursor trajectory.
How many neurons does the simulator model?
By default it simulates 64 neurons, but the population size can be adjusted in the code.
Does the decoder require real neural recordings?
No — it works on the synthetic spike trains generated by the cosine-tuning simulator, making it useful for prototyping and education.