/symfony-ux-skills:ux-calendar-linkfrom symfony-ux-skills
Generates "Add to calendar" links in Symfony/Twig for Google, Outlook, Office 365, and .ics files. Supports recurrence rules and reminders.
Ships in symfony-ux-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate "Add to calendar" links from a PHP event object: Google Calendar, Outlook.com, Office 365, and an iCalendar (.ics) file for Apple Calendar, Outlook desktop, Thunderbird and native clients, as plain links.
Since Symfony UX 3.1+. The package is experimental: its API may still change.
composer require symfony/ux-calendar-link
new CalendarEvent(title:, start:, end:, ...) The event
ux_calendar_link(event, 'google') One CalendarLink (provider, label, url)
ux_calendar_links(event) One CalendarLink per registered provider
CalendarRecurrence::weekly(count: 10) RRULE
CalendarReminder::before(minutes: 15) VALARM (.ics only)
Provider names: google, outlook, office365, ics.
use Symfony\UX\CalendarLink\CalendarEvent;
$event = new CalendarEvent(
title: 'Symfony Live Paris',
start: new \DateTimeImmutable('2026-05-14 09:00'),
end: new \DateTimeImmutable('2026-05-15 18:00'),
description: 'Annual Symfony conference in France',
location: 'Cite Universitaire Paris',
url: 'https://live.symfony.com',
);
return $this->render('event/show.html.twig', ['event' => $event]);
| Argument | Type | Notes |
|---|---|---|
title | string | Required, must not be blank |
start, end | \DateTimeInterface | Required; end must be on or after start |
description, location, url | ?string | Optional |
allDay | bool | Date-only event |
recurrence | ?CalendarRecurrence | RRULE |
reminders | list<CalendarReminder> | VALARM |
uid | ?Uuid | Since 3.5: stable ICS UID; derived from the event content when omitted |
Invalid input throws Symfony\UX\CalendarLink\Exception\InvalidArgumentException.
{# One provider #}
<a href="{{ ux_calendar_link(event, 'google').url }}">Add to Google Calendar</a>
{# Every provider #}
<ul class="add-to-calendar">
{% for link in ux_calendar_links(event) %}
<li><a href="{{ link.url }}">{{ link.label }}</a></li>
{% endfor %}
</ul>
A CalendarLink has provider, label and url, and casts to its URL. The ics link is a data:text/calendar URI; add a download attribute so browsers save it as a file:
<a href="{{ ux_calendar_link(event, 'ics') }}" download="event.ics">Download .ics</a>
An unknown provider name throws UnknownProviderException.
use Symfony\UX\CalendarLink\CalendarRecurrence;
use Symfony\UX\CalendarLink\CalendarReminder;
$event = new CalendarEvent(
title: 'Weekly sync',
start: new \DateTimeImmutable('2026-05-14 10:00'),
end: new \DateTimeImmutable('2026-05-14 10:30'),
recurrence: CalendarRecurrence::weekly(count: 10),
reminders: [CalendarReminder::before(minutes: 15)],
);
CalendarRecurrence factories: minutely(), daily(), weekly(), monthly(), yearly(), each with interval, count and until named arguments:
CalendarRecurrence::daily(interval: 2);
CalendarRecurrence::monthly(count: 6);
CalendarRecurrence::yearly(until: new \DateTimeImmutable('2030-01-01'));
CalendarReminder::before() sums weeks, days, hours and minutes, with an optional description:
CalendarReminder::before(hours: 1, minutes: 30);
CalendarReminder::before(hours: 2, description: 'Leave early');
| Field | Outlook | Office 365 | ICS | |
|---|---|---|---|---|
| title, start/end, description, location, all-day | yes | yes | yes | yes |
| reminders (VALARM) | ignored | ignored | ignored | yes |
| recurrence (RRULE) | yes | ignored | ignored | yes |
Each link keeps the fields its provider's URL scheme can carry, and silently drops the rest. Google and Outlook ignore minutely() recurrences; use them for ics only.
$holiday = new CalendarEvent(
title: 'Bastille Day',
start: new \DateTimeImmutable('2026-07-14'),
end: new \DateTimeImmutable('2026-07-14'),
allDay: true,
);
Timed events are written to .ics with their named time zone (TZID plus a matching VTIMEZONE), so recurring events keep their local time across DST changes. Build start and end in the event's real time zone:
new \DateTimeImmutable('2026-05-14 09:00', new \DateTimeZone('Europe/Paris'));
Implement CalendarLinkProviderInterface and tag the service ux_calendar_link.provider yourself (autoconfiguration skips it):
use Symfony\UX\CalendarLink\CalendarEvent;
use Symfony\UX\CalendarLink\CalendarLink;
use Symfony\UX\CalendarLink\Provider\CalendarLinkProviderInterface;
final class ProtonCalendarLinkProvider implements CalendarLinkProviderInterface
{
public function getName(): string
{
return 'proton';
}
public function getLabel(): string
{
return 'Proton Calendar';
}
public function generate(CalendarEvent $event): CalendarLink
{
return new CalendarLink($this->getName(), $this->getLabel(), $this->buildUrl($event));
}
}
# config/services.yaml
services:
App\Calendar\ProtonCalendarLinkProvider:
tags: ['ux_calendar_link.provider']
Build the event once, render every provider. ux_calendar_links() loops over all registered providers, so the template stays the same when you add one.
Keep the uid stable when it matters. The default UID is derived from the event content, so adding the same event twice keeps a single calendar entry. Pass your own Uuid when the event content can change but must stay the same calendar entry.
symfony/ux-calendar-link on Packagist.<twig:ux:icon name="..." /><twig:AddToCalendar :event /> componentWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub smnandre/symfony-ux-skills --plugin symfony-ux-skills20 skills in this plugin
/live-componentSymfony UX LiveComponent: live search, live filters, dependent selects and form validation as users type. Use for reactive PHP and Twig components, #[AsLiveComponent], LiveProp, LiveAction, data-model, loading states, emit/listen, lazy rendering and LiveResponse downloads./stimulusSymfony UX Stimulus: JavaScript behavior for dropdowns, tabs, modals, clipboard buttons and third-party widgets. Use for StimulusBundle, data-controller, data-action, targets, values, outlets, lazy controllers and Twig stimulus_* helpers./symfony-uxSymfony UX: choose and combine packages for a Symfony frontend. Use when deciding between Stimulus, Turbo, TwigComponent and LiveComponent, or fitting several Symfony UX packages into the same feature. Prefer the dedicated skill for a task that fits one package./turboSymfony UX Turbo: Turbo Frames for partial navigation and form submissions, Turbo Streams for multiple updates and Mercure broadcasts, and Turbo Drive for links and forms. Use for turbo-frame, turbo-stream, twig:Turbo, TurboFrame, TurboStreamResponse, turbo_stream_from and #[Broadcast]./twig-componentSymfony UX TwigComponent: reusable Twig buttons, cards, alerts and design system components. Use for twig: tags, #[AsTwigComponent], props, blocks, attributes.defaults(), anonymous components, computed properties, provide()/inject() and html_cva./ux-autocompleteSymfony UX Autocomplete: searchable selects and Ajax suggestions for large Symfony form lists. Use for EntityType, ChoiceType, Tom Select, the autocomplete option, #[AsEntityAutocompleteField], #[AsAutocompleteField], AutocompleterInterface, extra_options and tom_select_options.Other plugins' skills for the same job