Data Sources and Integrations
This is a member-only chapter. Log in with your Signal Over Noise membership email to continue.
Log in to readModule 3: Data Sources and Integrations
The morning-brief skill has four data sources. Each is a self-contained integration. You can implement all four, or pick the ones that are worth it for your setup. Not all-or-nothing.
This module covers each integration: what it does, the exact pattern used in production, and where it can fail.
Integration 1: Calendar
Mechanism: AppleScript via osascript
The calendar integration uses AppleScript to query the Calendar app directly. SQLite access to the Calendar database is blocked by macOS TCC (Transparency, Consent, and Control), so AppleScript is the right approach — it goes through the app’s own API.
osascript -e '
set today to current date
set time of today to 0
set tomorrow to today + (1 * days)
tell application "Calendar"
set output to ""
repeat with c in calendars
if name of c is "Jim Christian" or name of c is "Family" then
set evts to (every event of c whose start date ≥ today and start date < tomorrow)
repeat with e in evts
set output to output & (time string of start date of e) & " | " & (summary of e) & " [" & (name of c) & "]" & linefeed
end repeat
end if
end repeat
return output
end tell'
Adapting it: The if name of c is "Jim Christian" or name of c is "Family" filter is what you’ll change. Replace those strings with your calendar names. To see all your calendar names, remove the filter entirely and let it return everything — then you’ll know what to filter to.
What can go wrong: AppleScript calendar access requires a permissions grant the first time. macOS will prompt you to allow Terminal (or whichever app runs Claude Code) to access Calendar. Grant it once and it persists.
All-day events appear without a time string. The skill should handle these gracefully — checking for them and noting “all day” rather than crashing on the missing time component.
Integration 2: Tasks
Mechanism: reminders CLI
The Reminders CLI (reminders) is a command-line interface for the Apple Reminders app. It’s available via Homebrew. If you’re on macOS and use Reminders, this is the simplest task integration.
# Get all incomplete tasks from a list called "Tasks"
reminders show Tasks --format json | jq '[.[] | select(.isCompleted == false)] | .[:10] | .[] | .title'
The | .[:10] limits the output to ten items. If your task list is long, Claude seeing 80 open tasks in a morning brief is noise, not signal. Ten (or however many you prefer) keeps it focused.
If you use a different task manager: The integration changes but the pattern stays the same. If your task manager has a CLI or exports to JSON, Claude can read it. Todoist has an API. Things 3 has a URL scheme. OmniFocus has AppleScript. The skill body documents the command for your tool; Claude runs it.
Filtering tasks: The production skill filters to high-priority tasks and anything due today. The jq filter for due-today tasks:
reminders show Tasks --format json | jq '[.[] | select(.isCompleted == false) | select(.dueDate != null) | select((.dueDate | fromdateiso8601 | strftime("%Y-%m-%d")) == (now | strftime("%Y-%m-%d")))]'
Start simple (all incomplete tasks) and tighten the filter once you know what the output looks like.
Integration 3: Email
Mechanism: mail-triage skill invocation
Email is where most morning briefs break down. Full email parsing via AppleScript is fragile — Apple Mail’s scripting dictionary has gaps, and IMAP queries can be slow. The approach that works in production is different: delegate to the mail-triage skill.
In the morning-brief skill body:
### Step 3: Email
Invoke the mail-triage skill to scan the inbox. Ask it to return:
- Emails requiring action (with sender and subject)
- Count of unread emails
- Any urgent items
Do not read every email. Surface the action items only.
This works because Claude Code can invoke other skills from within a skill. Morning-brief orchestrates; mail-triage does the email-specific work. If you don’t have a mail-triage skill, Module 3 of the Co-Operating System course covers building one.
The separation keeps morning-brief legible. Email triage is its own complicated thing. It doesn’t need to live inside the morning brief logic.
Integration 4: News
Mechanism: Brave Search MCP tool
News is the lightest integration and the most optional. The morning brief isn’t a news digest. It’s a brief mention of anything relevant to your work that happened overnight — enough to know if something warrants closer attention, not enough to become a reading session.
The pattern in production uses the Brave Search MCP tool:
### Step 4: News
Use mcp__MCP_DOCKER__brave_web_search to search for:
- "AI tools news today"
- Any specific topics relevant to current projects
Return one to three headlines with a single-sentence summary each.
Cap this section at 100 words. News is context, not content.
If you don’t have Brave Search configured, you can skip this integration. The briefing is complete without it. If you want to add a search integration later, Module 3 of Building AI Agents covers MCP tool usage.
Choosing Your Sources
You do not need all four. The minimum useful briefing is calendar and tasks — two integrations, clear output, five minutes to build.
Add email when you’re ready to handle the complexity of mail-triage. Add news if you want the context layer. The skill is modular by design. Each integration is a numbered step in the body. Adding one means adding a new step and a new section to the output format. Removing one means deleting that step.
The production skill has all four. But it started with two.
The next module covers customisation and the daily-prep companion.
Check Your Understanding
Answer all questions correctly to complete this module.
1. Why does morning-brief use AppleScript for calendar data?
2. How is email integration handled?
3. What is the minimum useful morning briefing?
Pass the quiz above to unlock
Save failed. Please try again.