Creating the Sleep Report
I created an AI Agent Skill that will interpret your CPAP OSCAR data for you.
August 5, 2026

I've been using my ResMed AirSense 11 CPAP machine since December of 2022 to great success. The first few nights were magical. I got better sleep than I had in probably decades. The initial brilliance wore off a little, but it was clear I was getting something my body needed. My Oura ring was showing I was getting more REM sleep too, which was a delight. I barely remember my dreams and I started noticing them a bit more. I began to get curious to see if there was anything more I could do. Was there something hiding in that data? It collects a massive amount of data every night, all night. I started looking into how to access and analyze the data.

That journey led me to Reddit where I discovered sources like Apnea Board, and OSCAR and later SleepHQ. I was drawn to OSCAR because it was a free DIY tool that could interpret this data. I took the SD card out of my machine and popped it into my computer with OSCAR loaded up and was amazed at the charts. The story was beginning to reveal itself. I could see my usage but wasn't sure exactly what else to look at. On Reddit, people upload screenshots of their data and have community members take a look. They notice patterns that only their experienced eyes can spot. I wondered if AI could help out here. After all, it sounded like mostly pattern recognition.
This is where Claude Code comes in
I pointed Claude Code at my data and it actually did an ok job. I used a prompt like this:
I have CPAP data in OSCAR on this computer. Find my OSCAR database
(oscar.db), read it without modifying anything, and analyze my last
90 nights: usage, AHI, mask leak, and event types. Check data quality
before trusting any night (high leak or short sessions). Compare
trends, don't diagnose anything, never suggest changing my pressure
settings, and end with a short list of questions worth bringing to
my doctor.
It noticed right away that each time my pressure was raised, I also had a slight increase in events indicating that perhaps my lower settings were better. I could have probably figured that out through the charts in OSCAR, but this told me in about 10 seconds vs me squinting at charts for hours.
Next, I wondered if I could enhance Claude's ability to interpret the data by using credible sources that already exist about patterns between the various events.
I gathered a bunch of resources and derived facts from them. Then I baked that into a reusable AI Agent Skill.

Armed with this skill and my data, Claude did an even better job. It noticed that even though events were creeping up with each pressure change, they weren't spread evenly: the share of central events (pauses where the airway is open but the breath just doesn't come) rose from 19% to 23% to 30% across those same three pressure eras. It also told me what it checked and didn't worry about: my mask seal is excellent, my usage averages over eight hours a night, and nothing came close to a concern threshold. Then it wrote me one question to bring to my next appointment: is this expected at higher pressure, or is the machine just scoring events differently up there?
This is information to discuss with my doctor. I do not treat any of this as medical advice and neither should you. But, it does help me stay informed and feel like an active participant in my treatment. The data is mine, and interpreting it this way helps me learn more about myself and my sleep story.
Want to try it on your own data?
Head over to the Projects page for instructions on how to use the Skill.
