Skip to content
calendar-accounts logo

Calendar Accounts — All Synced Calendars

calendar-accounts

List all synced calendar accounts and individual calendars with event counts. Use when user asks what calendars they have, what accounts are synced, or wants an overview of their calendar setup.

aashari/ai-agent-skills0installs6stars

SKILL.md

Full skill instructions

Calendar Accounts — All Synced Calendars

List every synced account and their individual calendars with upcoming event counts.

Steps

DB="$HOME/​Library/​Group Containers/​group.com.apple.calendar/​Calendar.sqlitedb"

echo "=== ALL CALENDARS BY ACCOUNT ==="
sqlite3 -separator '|' "$DB" "
SELECT
  s.name as account,
  CASE s.type
    WHEN 0 THEN 'Local'
    WHEN 1 THEN 'Local'
    WHEN 2 THEN 'CalDAV/​Google'
    WHEN 3 THEN 'Exchange'
    WHEN 5 THEN 'Found in Mail'
    ELSE 'Other'
  END as account_type,
  s.disabled as is_disabled,
  c.title as calendar_name,
  c.ROWID as cal_id,
  COUNT(DISTINCT ci.ROWID) as total_events
FROM Store s
JOIN Calendar c ON c.store_id = s.ROWID
LEFT JOIN CalendarItem ci ON ci.calendar_id = c.ROWID
  AND ci.hidden = 0
  AND ci.status != 2
WHERE s.type != 5
GROUP BY c.ROWID
ORDER BY s.disabled, s.name, c.title;
"

echo ""
echo "=== UPCOMING EVENTS (next 30 days) PER CALENDAR ==="
NOW_CD=$(( $(date +%s) - 978307200 ))
FUTURE_CD=$(( $(date +%s) + 30 * 86400 - 978307200 ))
sqlite3 -separator '|' "$DB" "
SELECT
  c.title as calendar_name,
  s.name as account,
  COUNT(DISTINCT ci.ROWID) as upcoming_count
FROM OccurrenceCache oc
JOIN CalendarItem ci ON oc.event_id = ci.ROWID
JOIN Calendar c ON ci.calendar_id = c.ROWID
JOIN Store s ON c.store_id = s.ROWID
WHERE oc.occurrence_date >= $NOW_CD
  AND oc.occurrence_date <= $FUTURE_CD
  AND ci.hidden = 0
  AND ci.status != 2
  AND s.type != 5
  AND s.disabled = 0
GROUP BY c.ROWID
ORDER BY upcoming_count DESC;
"

Output Format

Active Accounts: Table grouped by account — show: Account (email), Type, Calendars, Total Events.

Upcoming (next 30 days): Ranked list of calendars by upcoming event count.

Flag disabled accounts separately as "(disabled)". Note any "Found in Mail" store exists but is excluded as auto-generated duplicates.

More skills from aashari

mail-core logo
aashari/ai-agent-skills

mail-core

Background technical knowledge for reading Apple Mail data locally on macOS. Auto-loaded when any mail-* skill executes. Contains architecture, query patterns, and parsing techniques for ~/Library/Mail/V10/.

6 0
View
calendar-event logo
aashari/ai-agent-skills

calendar-event

Get full details of a specific event including attendees, description, video link, location, and recurrence. Use when user asks about a specific meeting or event details.

6 0
View
calendar-free logo
aashari/ai-agent-skills

calendar-free

Find free time slots in a day or week. Use when user asks when they're free, wants to schedule something, or needs to find an open time window.

6 0
View
calendar-attendees logo
aashari/ai-agent-skills

calendar-attendees

Find meetings with a specific person, or list attendees of a specific event. Use when user asks who is in a meeting, whether someone is invited, or what meetings they share with a person.

6 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View