agentleFS
Itsokay-coItsokay-co/bio-vibing/skills/discover/SKILL.md

discover

Skill17 starsChanged 9 months agoApache-2.0View on GitHub

Automated pattern discovery — finds what correlates with your best and worst sleep nights. Scans workouts, meals, caffeine, tags, gut scores, and timing patterns. Use when the user wants to know what actually affects their sleep.

27 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use refine, execute and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • vltingSkill

    refine

    Iterative refinement loop for modules/components. Research best practices, council-deliberate a spec, collect issues, implement in worktree, review — one target at a time, approval-gated. Auto mode for fully autonomous operation.

    Also in 3 projects that use this

  • sahinSkill

    execute

    Also in 3 projects that use this

  • raven-souravSkill

    ingest

    Also in 4 projects that use this

  • SentrySkill

    spec

    Produce a verified spec — problem, desired outcome, and acceptance criteria — before building. Use when given a GitHub/Linear issue link, when starting from a fuzzy in-conversation idea, or asked to "figure out what to do" / "scope this" / "what should I build" — whenever the *what* isn't yet pinned down. Grills the ambiguities, checks the premise against the code, and produces acceptance criteria you sign off on — then hands to design-first.

    Also in 5 projects that use this

  • AGMO-IncSkill

    benchmark

    Use to run benchmarks, save results to Obsidian vault, and detect regressions against a baseline. Triggers on "벤치마크", "benchmark", "성능 측정".

    Also in 3 projects that use this

  • MicrosoftSkill

    init

    Generate or update chat customization files for AI coding agents

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Gut score patterns: Only if Suna API is connected.

    line 144

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Discover — What drives your best and worst nights

Automated correlation discovery across 60 days. Finds patterns you didn't know to look for.

Steps

Pull 60 days and run correlation discovery:

python3 << 'PYEOF'
import sys, os, json
sys.path.insert(0, os.path.join(os.environ.get('CLAUDE_PLUGIN_ROOT', '.'), 'lib'))
from fetch import fetch_biometrics
from dataclasses import asdict
from metrics import (compute_correlation_discovery, compute_gut_score_correlations,
                     compute_caffeine_sleep_coupling, compute_food_item_effects,
                     compute_food_hr_sensitivity, compute_disruption_classification)

data = fetch_biometrics(days=60)
d = asdict(data)

# --- CORRELATION DISCOVERY ---
disc = compute_correlation_discovery(d)
print(f"DISCOVERY REPORT — {disc.get('n_days_analyzed', 0)} days analyzed")
print()

# Best/worst night profiles
best = disc.get('best_nights')
worst = disc.get('worst_nights')
if best and worst:
    print(f"YOUR BEST SLEEP NIGHTS (avg score {best['avg_score']}):")
    if best.get('common_factors'):
        print(f"  Common factors: {', '.join(best['common_factors'])}")
    print(f"YOUR WORST SLEEP NIGHTS (avg score {worst['avg_score']}):")
    if worst.get('common_factors'):
        print(f"  Common factors: {', '.join(worst['common_factors'])}")
    print()

# Top correlations
correlations = disc.get('correlations', [])
if correlations:
    print("TOP CORRELATIONS:")
    for c in correlations[:10]:
        sign = "+" if c['direction'] == 'positive' else "-"
        print(f"  {sign}  {c['feature']} → {c['outcome']} r={c['r']} (n={c['n']})")
    print()

# --- CAFFEINE COUPLING ---
meals = d.get('meals', [])
sleep = d.get('sleep', [])
if meals:
    caf = compute_caffeine_sleep_coupling(meals, sleep)
    if caf.get('n_days_with_caffeine', 0) >= 5:
        print("CAFFEINE → SLEEP:")
        print(f"  Avg daily: {caf.get('daily_avg_mg', 0)}mg ({caf['n_days_with_caffeine']} days with caffeine)")
        corr = caf.get('correlations', {})
        if corr.get('onset_latency'):
            print(f"  Caffeine × onset latency: r={corr['onset_latency']}")
        if corr.get('deep_sleep'):
            print(f"  Caffeine × deep sleep: r={corr['deep_sleep']}")
        hvl = caf.get('high_vs_low', {})
        if hvl.get('onset_latency'):
            h = hvl['onset_latency']
            print(f"  High caffeine days: onset {round(h['high_caffeine_avg']/60, 1)}min vs low: {round(h['low_caffeine_avg']/60, 1)}min")
        print()

# --- FOOD EFFECTS ---
    fe = compute_food_item_effects(meals, sleep)
    if fe.get('n_foods_analyzed', 0) > 0:
        print(f"FOOD EFFECTS ({fe['n_foods_analyzed']} foods analyzed):")
        if fe.get('best_foods'):
            print(f"  Best for sleep: {', '.join(fe['best_foods'][:3])}")
        if fe.get('worst_foods'):
            print(f"  Worst for sleep: {', '.join(fe['worst_foods'][:3])}")

        for name, effect in list(fe.get('food_effects', {}).items())[:5]:
            metrics = effect.get('metrics', {})
            n = effect.get('n_nights', 0)
            effects_str = ', '.join(f"{m}: d={v['cohens_d']} ({v['direction']})"
                                    for m, v in metrics.items())
            print(f"  {name} (n={n}): {effects_str}")
        print()

# --- FOOD HR SENSITIVITY ---
    heartrate = d.get('heartrate', [])
    fhs = compute_food_hr_sensitivity(meals, heartrate)
    if fhs.get('n_foods_analyzed', 0) > 0:
        print(f"FOOD HR SENSITIVITY ({fhs['n_foods_analyzed']} foods, avg recovery {fhs['overall_avg_recovery_min']}min):")
        if fhs.get('flagged_foods'):
            print(f"  Slow recovery foods: {', '.join(fhs['flagged_foods'])}")
        for name, stats in sorted(fhs.get('foods', {}).items(), key=lambda x: -x[1]['avg_recovery_min'])[:5]:
            flag = " ⚠" if stats['flag'] == 'slow_recovery' else ""
            print(f"  {name}: {stats['avg_recovery_min']}min avg recovery (n={stats['n_meals']}){flag}")
        print()

# --- DISRUPTION HISTORY ---
    disrupt = compute_disruption_classification(d.get('sleep', []), d.get('readiness', []), d.get('spo2', []))
    if disrupt.get('n_disruptions', 0) > 0:
        by_type = disrupt.get('by_type', {})
        print(f"DISRUPTION EVENTS ({disrupt['n_disruptions']} detected):")
        for dtype, count in by_type.items():
            if count:
                print(f"  {dtype}: {count}")
        for e in disrupt.get('events', [])[-5:]:
            print(f"  {e['day']}: {e['classification']} ({e['recovery_shape']}-shape, {e.get('days_to_recovery', '?')}d recovery)")
        print()

# --- GUT SCORE PATTERNS (if Suna connected) ---
gut_scores = d.get('gut_scores', [])
if gut_scores:
    gc = compute_gut_score_correlations(gut_scores, sleep)
    print(f"GUT SCORE PATTERNS ({gc.get('n_days', 0)} days):")
    print(f"  Avg score: {gc.get('avg_score', 0)}")

    corr = gc.get('correlations', {})
    for k, v in corr.items():
        print(f"  {k}: r={v}")

    if gc.get('best_day') and gc.get('worst_day'):
        dow = gc.get('by_day_of_week', {})
        print(f"  Best day: {gc['best_day']} ({dow.get(gc['best_day'], '?')})")
        print(f"  Worst day: {gc['worst_day']} ({dow.get(gc['worst_day'], '?')})")

PYEOF

Interpretation

Present the output directly. Key framing:

  • Correlations: Pearson r values. |r| > 0.3 = moderate, |r| > 0.5 = strong. Minimum n=7 for inclusion.
  • Food effects: Cohen's d effect sizes. |d| > 0.5 = medium, |d| > 0.8 = large. Minimum 3 occurrences.
  • Caffeine: Positive r with onset latency = more caffeine → longer time to fall asleep.
  • Gut score patterns: Only if Suna API is connected. Shows how gut scores correlate with next-night sleep.
  • Correlation ≠ causation. These are patterns worth investigating, not proven causes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.