add calendar skill, update plan-holiday bw-vault pattern
This commit is contained in:
parent
e90030872d
commit
166976253d
2 changed files with 70 additions and 2 deletions
68
dot_claude/skills/calendar.md
Normal file
68
dot_claude/skills/calendar.md
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
name: calendar
|
||||
description: Query and manage Nextcloud calendar events via CalDAV. Use when the user
|
||||
asks about their calendar, schedule, events, availability, or wants to create events.
|
||||
Triggers on "check my calendar", "what's on my calendar", "any events", "create event",
|
||||
"schedule", "am I free", "calendar", "what do I have this week".
|
||||
---
|
||||
|
||||
## Calendar Access
|
||||
|
||||
All commands use `bw-vault inject` to securely pass Nextcloud credentials. Passwords never appear in stdout.
|
||||
|
||||
### Base Command Pattern
|
||||
```bash
|
||||
bw-vault inject "76169a13-9830-48ee-b583-6cc9055ed03c" --as NEXTCLOUD_APP_PASSWORD -- env NEXTCLOUD_USER=admin ~/.venvs/claude/bin/python3 /Users/viktorbarzin/code/infra/.claude/calendar-query.py <command> [options]
|
||||
```
|
||||
|
||||
### Available Commands
|
||||
|
||||
#### List all calendars
|
||||
```bash
|
||||
bw-vault inject "76169a13-9830-48ee-b583-6cc9055ed03c" --as NEXTCLOUD_APP_PASSWORD -- env NEXTCLOUD_USER=admin ~/.venvs/claude/bin/python3 /Users/viktorbarzin/code/infra/.claude/calendar-query.py list
|
||||
```
|
||||
|
||||
#### Show events for a time period
|
||||
```bash
|
||||
# Today's events
|
||||
bw-vault inject "76169a13-9830-48ee-b583-6cc9055ed03c" --as NEXTCLOUD_APP_PASSWORD -- env NEXTCLOUD_USER=admin ~/.venvs/claude/bin/python3 /Users/viktorbarzin/code/infra/.claude/calendar-query.py today
|
||||
|
||||
# Tomorrow
|
||||
bw-vault inject "76169a13-9830-48ee-b583-6cc9055ed03c" --as NEXTCLOUD_APP_PASSWORD -- env NEXTCLOUD_USER=admin ~/.venvs/claude/bin/python3 /Users/viktorbarzin/code/infra/.claude/calendar-query.py tomorrow
|
||||
|
||||
# This week
|
||||
bw-vault inject "76169a13-9830-48ee-b583-6cc9055ed03c" --as NEXTCLOUD_APP_PASSWORD -- env NEXTCLOUD_USER=admin ~/.venvs/claude/bin/python3 /Users/viktorbarzin/code/infra/.claude/calendar-query.py week
|
||||
|
||||
# This month
|
||||
bw-vault inject "76169a13-9830-48ee-b583-6cc9055ed03c" --as NEXTCLOUD_APP_PASSWORD -- env NEXTCLOUD_USER=admin ~/.venvs/claude/bin/python3 /Users/viktorbarzin/code/infra/.claude/calendar-query.py month
|
||||
```
|
||||
|
||||
#### Custom date range
|
||||
```bash
|
||||
bw-vault inject "76169a13-9830-48ee-b583-6cc9055ed03c" --as NEXTCLOUD_APP_PASSWORD -- env NEXTCLOUD_USER=admin ~/.venvs/claude/bin/python3 /Users/viktorbarzin/code/infra/.claude/calendar-query.py events --date YYYY-MM-DD --days N
|
||||
```
|
||||
|
||||
#### Filter by calendar
|
||||
Add `--calendar "Calendar Name"` to any command. Omit to show all calendars.
|
||||
|
||||
#### JSON output
|
||||
Add `--json` to any command for machine-readable output.
|
||||
|
||||
#### Create an event
|
||||
```bash
|
||||
bw-vault inject "76169a13-9830-48ee-b583-6cc9055ed03c" --as NEXTCLOUD_APP_PASSWORD -- env NEXTCLOUD_USER=admin ~/.venvs/claude/bin/python3 /Users/viktorbarzin/code/infra/.claude/calendar-query.py create \
|
||||
--title "Event Title" \
|
||||
--start "YYYY-MM-DD HH:MM" \
|
||||
--end "YYYY-MM-DD HH:MM" \
|
||||
--calendar "Personal" \
|
||||
--location "Location" \
|
||||
--description "Description"
|
||||
```
|
||||
|
||||
Start time also accepts relative formats: `"today 14:00"`, `"tomorrow 10:00"`.
|
||||
For all-day events add `--all-day`.
|
||||
|
||||
## Notes
|
||||
- Credentials use the Nextcloud admin account via Vaultwarden item `76169a13-9830-48ee-b583-6cc9055ed03c`
|
||||
- Some subscription calendars (Google Calendar imports) may show warnings — these are harmless
|
||||
- The script is at `/Users/viktorbarzin/code/infra/.claude/calendar-query.py`
|
||||
- Python deps (`caldav`, `icalendar`) are in `~/.venvs/claude/`
|
||||
|
|
@ -88,9 +88,9 @@ If True, the return date will be Monday instead of Sunday.
|
|||
|
||||
#### Calendar Conflict Check (best-effort)
|
||||
```bash
|
||||
python3 /Users/viktorbarzin/code/infra/.claude/calendar-query.py events --date <start> --days <length> --json
|
||||
bw-vault inject "76169a13-9830-48ee-b583-6cc9055ed03c" --as NEXTCLOUD_APP_PASSWORD -- env NEXTCLOUD_USER=admin ~/.venvs/claude/bin/python3 /Users/viktorbarzin/code/infra/.claude/calendar-query.py events --date <start> --days <length> --json
|
||||
```
|
||||
Requires `NEXTCLOUD_USER` and `NEXTCLOUD_APP_PASSWORD` env vars. If the script fails or creds are missing, note "calendar check skipped" and proceed. If conflicts found, report them and ask user to confirm or shift dates.
|
||||
Uses `bw-vault inject` for secure credential injection. If the script fails, note "calendar check skipped" and proceed. If conflicts found, report them and ask user to confirm or shift dates.
|
||||
|
||||
### Step 2 — Phase 1: Parallel Research (3 agents)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue