home / skills / openclaw / skills / icloud-caldav

icloud-caldav skill

/skills/samuelhe52/icloud-caldav

This skill enables direct iCloud CalDAV calendar management to view, create, update, and delete events without third-party services.

npx playbooks add skill openclaw/skills --skill icloud-caldav

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
4.5 KB
---
name: icloud-caldav
description: Direct iCloud Calendar integration via CalDAV protocol. Create, read, update, and delete calendar events without third-party services. Use when the user wants to manage their iCloud Calendar, check schedule, create events, or find free time. Requires Apple ID and app-specific password.
---

# iCloud CalDAV — Direct Calendar Access

Manage iCloud Calendar directly via CalDAV protocol. No third-party services, no data leaves your machine except to Apple's servers.

## When to Use

**Activate when the user wants to:**
- Check their calendar or upcoming events
- Create new calendar events
- Delete existing events
- List available calendars

**Do NOT use for:**
- Reminders (use `apple-reminders` skill if available)
- Contacts (CalDAV is calendar-only)
- Non-iCloud calendars (Google, Outlook, etc.)

## Prerequisites

**Required credentials:**
- `APPLE_ID` — Your Apple ID email address
- `APPLE_APP_PASSWORD` — An [app-specific password](https://appleid.apple.com) (NOT your regular Apple ID password)

**To generate app-specific password:**
1. Go to [appleid.apple.com](https://appleid.apple.com)
2. Sign in → Sign-In and Security → App-Specific Passwords
3. Generate a new password
4. Use this password (not your regular one)

## Quick Start

```bash
# Set credentials
export APPLE_ID="[email protected]"
export APPLE_APP_PASSWORD="xxxx-xxxx-xxxx-xxxx"

# List calendars
./scripts/caldav.py list-calendars

# List events for next 7 days
./scripts/caldav.py list-events --days 7

# Create an event
./scripts/caldav.py create-event \
  --title "Team Meeting" \
  --start "2025-07-23T14:00:00" \
  --duration 60 \
  --calendar "Work"
```

## Available Operations

| Operation | Command | Description |
|-----------|---------|-------------|
| List calendars | `list-calendars` | Show all iCloud calendars |
| List events | `list-events` | Events in a date range |
| Create event | `create-event` | Add new calendar event |
| Delete event | `delete-event` | Remove event by filename or UID |

## Workflow Patterns

### Creating Events

```bash
# Basic event
./scripts/caldav.py create-event \
  --title "Dentist Appointment" \
  --start "2025-07-25T09:30:00" \
  --duration 30

# With location and description
./scripts/caldav.py create-event \
  --title "Project Review" \
  --start "2025-07-26T14:00:00" \
  --duration 60 \
  --location "Conference Room B" \
  --description "Q3 planning review" \
  --calendar "Work"

# All-day event
./scripts/caldav.py create-event \
  --title "Vacation" \
  --start "2025-08-01" \
  --all-day
```

### Batch Operations

**Note:** CalDAV does not support native batch operations. To create multiple events, run the script multiple times:

```bash
# Create multiple events by running the command multiple times
./scripts/caldav.py create-event --title "Meeting 1" --start "2025-07-26T10:00:00" --duration 60
./scripts/caldav.py create-event --title "Meeting 2" --start "2025-07-26T14:00:00" --duration 60
./scripts/caldav.py create-event --title "Meeting 3" --start "2025-07-27T09:00:00" --duration 60
```

iCloud handles rapid sequential requests well, but there is no single API call for creating multiple events.

### Deleting Events

```bash
# Delete by filename
./scripts/caldav.py delete-event \
  --file "event-name.ics" \
  --calendar "Calendar"

# Delete by UID (searches calendar for matching event)
./scripts/caldav.py delete-event \
  --uid "[email protected]" \
  --calendar "Calendar"
```

**Warning:** Deletions are permanent. iCloud may have its own backup, but standard CalDAV DELETE immediately removes the event.

## Date/Time Formats

- **ISO 8601**: `2025-07-23T14:00:00` (assumes local timezone if none specified)
- **With timezone**: `2025-07-23T14:00:00+08:00`
- **All-day**: `2025-07-23` (date only)

## Security Notes

- Credentials are read from environment variables only
- No credentials are logged or stored
- All communication is HTTPS to `caldav.icloud.com`
- App-specific passwords can be revoked anytime at appleid.apple.com

## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| 401 Unauthorized | Bad credentials | Check APPLE_ID and APPLE_APP_PASSWORD |
| 404 Not Found | Calendar/event doesn't exist | List calendars/events first |
| 403 Forbidden | Read-only calendar | Try a different calendar |
| Timeout | Network issue | Retry the request |

## References

- See `references/caldav-protocol.md` for CalDAV implementation details
- See `references/icloud-endpoints.md` for iCloud-specific endpoints

Overview

This skill provides direct iCloud Calendar access using the CalDAV protocol so you can create, read, update, and delete events without third-party services. It requires your Apple ID and an app-specific password and communicates only with Apple's CalDAV servers over HTTPS. Use it to manage calendars locally from scripts or automation tools.

How this skill works

The skill authenticates to caldav.icloud.com with your Apple ID and app-specific password read from environment variables, then issues CalDAV requests to list calendars, list events, create events, and delete events. It accepts ISO 8601 date/time formats (including timezone and all-day dates) and maps CLI options to CalDAV operations, performing individual requests for each event operation.

When to use it

  • Check upcoming events or full schedules in iCloud Calendar
  • Create single calendar events with detailed fields (title, start, duration, location, description)
  • Delete events by filename or UID from a specific calendar
  • List and choose among available iCloud calendars
  • Automate calendar management in local scripts or CI jobs that can securely store app-specific passwords

Best practices

  • Use an app-specific password (not your Apple ID password) and set it in environment variables only
  • List calendars before creating or deleting events to ensure the correct target calendar
  • Provide full ISO 8601 timestamps with timezone when precise timing is required
  • Avoid attempting bulk creates in a single API call; run sequential create commands and rate-limit if necessary
  • Treat deletions as permanent; verify event UID or filename before issuing delete

Example use cases

  • List all iCloud calendars to find the correct calendar name for automation
  • Create a meeting with title, start time, duration, location, and description from a deployment script
  • Query events for the next 7 days to generate a daily agenda message
  • Delete an outdated event by UID found during a calendar audit
  • Add an all-day vacation entry to a personal calendar via a scheduled job

FAQ

What credentials are required?

You need your Apple ID email and an app-specific password generated at appleid.apple.com; set them as environment variables.

Can I manage non-iCloud calendars?

No. This skill uses CalDAV against iCloud servers only and will not manage Google, Outlook, or other provider calendars.