| name | neuroskill-recipes |
| description | NeuroSkill use-case recipes and scripting patterns — shell snippets for focus and productivity monitoring, stress and anxiety tracking, sleep quality analysis, ADHD/cognitive-load queries, meditation tracking, cross-modal graph search, A/B session comparison, time-range queries, and automation with cron/Python/Node.js/HTTP. Use when looking for practical examples or building automation pipelines. |
NeuroSkill Use-Case Recipes
Focus & Productivity
npx neuroskill status --json | jq '.scores.focus'
npx neuroskill status --json | jq '.scores.bands.rel_alpha'
npx neuroskill session 0 --json | jq '{focus_avg: .metrics.focus, trend: .trends.focus, first_half: .first.focus, second_half: .second.focus}'
npx neuroskill status --json | jq '.scores.bar'
npx neuroskill status --json | jq '.scores.spectral_centroid'
npx neuroskill compare \
--a-start 1740380100 --a-end 1740382665 \
--b-start 1740412800 --b-end 1740415510 \
--json | jq '.insights.deltas.focus'
npx neuroskill search --start $(npx neuroskill sessions --json | jq '.sessions[0].start_utc') \
--end $(npx neuroskill sessions --json | jq '.sessions[0].end_utc') \
--json | jq '.result.analysis.neighbor_metrics.focus'
npx neuroskill label "deep focus block — no distractions"
npx neuroskill search-labels "deep focus" --k 10
while true; do
F=$(npx neuroskill status --json | jq '.scores.focus')
if (( $(echo "$F < 0.35" | bc -l) )); then
npx neuroskill notify "Focus low" "Current: $F — take a break?"
fi
sleep 30
done
Stress & Anxiety
npx neuroskill status --json | jq '.scores.lf_hf_ratio'
npx neuroskill session 0 --json | jq '.metrics.stress_index'
npx neuroskill status --json | jq '.scores.faa'
npx neuroskill status --json | jq '[.scores.bar, .scores.faa, .scores.lf_hf_ratio]'
npx neuroskill compare --json | jq '.insights.deltas | {anxiety_faa: .faa, stress_hr: .hr, lf_hf: .lf_hf_ratio}'
npx neuroskill session 0 --json | jq '{rmssd: .metrics.rmssd, sdnn: .metrics.sdnn, pnn50: .metrics.pnn50}'
npx neuroskill label "stressful presentation — racing thoughts"
npx neuroskill search-labels "stress anxiety overwhelmed" --mode both --k 10
Sleep Quality
npx neuroskill sleep --json | jq '.summary'
npx neuroskill sleep --json | jq '(.summary.n3_epochs / .summary.total_epochs * 100 | round | tostring) + "% N3"'
npx neuroskill sleep --json | jq '(.summary.rem_epochs / .summary.total_epochs * 100 | round | tostring) + "% REM"'
npx neuroskill sleep --json | jq '.analysis'
npx neuroskill sleep 0
npx neuroskill status --json | jq '{drowsiness: .scores.drowsiness, wakefulness: .consciousness.wakefulness}'
npx neuroskill status --json | jq '.sleep'
Cognitive Load & ADHD
npx neuroskill status --json | jq '.scores.tbr'
npx neuroskill status --json | jq '.scores.cognitive_load'
npx neuroskill status --json | jq '.scores.pac_theta_gamma'
npx neuroskill session 0 --json | jq '.metrics.sample_entropy'
npx neuroskill session 0 --json | jq '{tbr: .metrics.tbr, cog_load: .metrics.cognitive_load, tbr_trend: .trends.tbr}'
while true; do
npx neuroskill status --json | jq '{tbr: .scores.tbr, focus: .scores.focus}'
sleep 10
done
Meditation & Relaxation
npx neuroskill status --json | jq '.scores.meditation'
npx neuroskill status --json | jq '.scores.apf'
npx neuroskill status --json | jq '.scores.bands.rel_theta'
npx neuroskill session 0 --json | jq '{meditation: .metrics.meditation, relaxation: .metrics.relaxation, trend: .trends.meditation}'
npx neuroskill session 0 --json | jq '{perm_entropy: .metrics.permutation_entropy, sample_entropy: .metrics.sample_entropy}'
npx neuroskill label "entered theta meditation state"
npx neuroskill label "meditation ended — felt deeply rested"
npx neuroskill search-labels "meditation" --mode both --k 20
npx neuroskill compare \
--a-start <meditation_start> --a-end <meditation_end> \
--b-start <work_start> --b-end <work_end> \
--json | jq '.insights.deltas | {relaxation, meditation: .meditation, alpha: .rel_alpha}'
Cross-Modal Graph Search
npx neuroskill interactive "deep focus"
npx neuroskill interactive "deep focus" --reach 30
npx neuroskill interactive "meditation" --k-text 8 --k-EXG 8 --k-labels 5 --reach 20
npx neuroskill interactive "anxiety" --json | jq '[.nodes[] | select(.kind == "text_label") | {text, sim: (1 - .distance | . * 100 | round)}]'
npx neuroskill interactive "stress" --json | jq '[.nodes[] | select(.kind == "found_label") | .text]'
npx neuroskill interactive "flow state" --json | jq '[.nodes | group_by(.kind)[] | {(.[0].kind): length}] | add'
npx neuroskill interactive "deep focus" --dot | dot -Tsvg -o focus_graph.svg && open focus_graph.svg
npx neuroskill interactive "meditation" --dot | dot -Tpng -o meditation_graph.png
Comparing Two Sessions
npx neuroskill compare
npx neuroskill sessions --json | jq '.sessions[:2] | [.[].start_utc, .[].end_utc]'
npx neuroskill compare \
--a-start 1740380100 --a-end 1740382665 \
--b-start 1740412800 --b-end 1740415510
npx neuroskill compare --json | jq '.insights.improved'
npx neuroskill compare --json | jq '.insights.declined'
npx neuroskill compare --json | jq '.insights.deltas | to_entries | sort_by(.value.pct) | reverse'
npx neuroskill umap \
--a-start 1740380100 --a-end 1740382665 \
--b-start 1740412800 --b-end 1740415510 \
--json | jq '.result.analysis.separation_score'
Time-Range Queries
All commands that accept --start and --end use Unix seconds (UTC).
npx neuroskill sessions --json | jq '.sessions[0] | {start: .start_utc, end: .end_utc}'
date -j -f "%Y-%m-%d %H:%M" "2026-02-24 08:00" +%s
date -d "2026-02-24 08:00" +%s
NOW=$(date +%s)
npx neuroskill sleep --start $((NOW - 7200)) --end $NOW
TODAY=$(date -j -v0H -v0M -v0S +%s 2>/dev/null || date -d "today 00:00" +%s)
npx neuroskill sleep --start $TODAY --end $(date +%s)
npx neuroskill sleep
Automation & Scripting
*/5 * * * * node /path/to/npx neuroskill status --json \
| jq -r '[now, .scores.focus, .scores.relaxation, .scores.hr] | @csv' \
>> ~/EXG_log.csv
neuroskill_focus() { npx neuroskill status --json | jq '.scores.focus'; }
neuroskill_relax() { npx neuroskill status --json | jq '.scores.relaxation'; }
neuroskill_tbr() { npx neuroskill status --json | jq '.scores.tbr'; }
neuroskill_battery(){ npx neuroskill status --json | jq '.device.battery'; }
Python polling:
import subprocess, json, time
def neuroskill(cmd):
r = subprocess.run(
["node", "neuroskill", *cmd.split(), "--json"],
capture_output=True, text=True
)
return json.loads(r.stdout)
while True:
data = neuroskill("status")
focus = data["scores"]["focus"]
print(f"Focus: {focus:.2f}")
if focus < 0.35:
neuroskill(f'notify "Focus dropped" "Current: {focus:.2f}"')
time.sleep(30)
Python HTTP (no Node required):
import requests
PORT = 8375
def neuroskill(command, **kwargs):
return requests.post(
f"http://127.0.0.1:{PORT}/",
json={"command": command, **kwargs}
).json()
status = neuroskill("status")
print("Focus:", status["scores"]["focus"])
print("Battery:", status["device"]["battery"], "%")
sessions = neuroskill("sessions")
sleep = neuroskill("sleep",
start_utc=sessions["sessions"][0]["start_utc"],
end_utc=sessions["sessions"][0]["end_utc"])
print("N3 sleep:", sleep["summary"]["n3_epochs"], "epochs")
Node.js HTTP polling:
const PORT = 8375;
const neuroskill = (cmd) =>
fetch(`http://127.0.0.1:${PORT}/`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(cmd),
}).then(r => r.json());
setInterval(async () => {
const { scores } = await neuroskill({ command: "status" });
console.log(`focus=${scores.focus.toFixed(2)} relax=${scores.relaxation.toFixed(2)} hr=${scores.hr.toFixed(1)}`);
}, 5000);
⚠ Research use only. EXG indices, sleep staging, consciousness metrics, and all
derived scores are research biomarkers and experimental indicators. They are not validated
medical devices and must not be used for diagnosis or clinical decision-making.