michtio/craftcms-claude-skills / skills/craft-plugins
craft-plugins
VerifiedIndex and router for plugin-specific Craft CMS 5 guidance — configuration, Twig API, PHP API, migrations, deployment, and pitfalls for the plugins this pack documents. Load whenever a task names a plugin this pack documents, and for passwordless or magic-link auth with no plugin named; read references/<plugin>.md first.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.4 KB |
| references/amazon-ses.md | markdown | 2.9 KB |
| references/blitz.md | markdown | 10.5 KB |
| references/cache-igniter.md | markdown | 2.8 KB |
| references/ckeditor.md | markdown | 18.5 KB |
| references/colour-swatches.md | markdown | 7.0 KB |
| references/element-api.md | markdown | 7.0 KB |
| references/elements-panel.md | markdown | 2.4 KB |
| references/embedded-assets.md | markdown | 5.1 KB |
| references/feed-me.md | markdown | 8.8 KB |
| references/formie.md | markdown | 27.5 KB |
| references/hyper.md | markdown | 5.4 KB |
| references/image-optimize.md | markdown | 27.6 KB |
| references/imager-x.md | markdown | 15.1 KB |
| references/knock-knock.md | markdown | 2.5 KB |
| references/navigation.md | markdown | 6.8 KB |
| references/password-policy.md | markdown | 5.1 KB |
| references/retour.md | markdown | 4.1 KB |
| references/seomatic.md | markdown | 23.2 KB |
| references/sherlock.md | markdown | 3.2 KB |
| references/sprig.md | markdown | 9.7 KB |
| references/timeloop.md | markdown | 6.7 KB |
| references/typogrify.md | markdown | 2.9 KB |
| references/vite.md | markdown | 6.1 KB |
| references/warp.md | markdown | 12.4 KB |
references/timeloop.md
View on GitHub# Timeloop
Repeating date field by CraftPulse. Creates recurring dates (daily, weekly, monthly, yearly) without complex inputs — editors pick a frequency, cycle, and optional end date. Exposes a Twig variable API, a `recurringDates()` function for cross-entry queries, and full GraphQL support. CraftPulse's own plugin.
`craftpulse/craft-timeloop` — Free (internal)
## Documentation
- GitHub: https://github.com/craftpulse/craft-timeloop
- Packagist: https://packagist.org/packages/craftpulse/craft-timeloop
Source lives at `~/dev/craft-plugins/v5/craft-timeloop/src/`. When in doubt, read the source directly.
## Common Pitfalls
- Not setting an end date — without `loopEndDate`, the plugin defaults to start + 20 years. That's 7,300+ daily entries. Always set a sane end date or use `limit` in `getDates()`.
- Expecting `getUpcoming()` to return an array — it returns a single `DateTime|null` (the next occurrence). For multiple upcoming dates, use `getDates()` with a limit.
- Monthly frequency without timestring — when using monthly recurrence, set the ordinal + day (e.g., "second Tuesday") via the field UI. Without it, the plugin uses raw month arithmetic with end-of-month correction, which may not be what editors expect.
- Using `recurringDates()` on large element queries — the Twig function iterates every element and computes loops per entry. Pre-filter with element criteria to avoid performance hits.
- Forgetting `.eagerly()` on relation fields that carry Timeloop fields — the Timeloop field normalizes to a `TimeloopModel`, not a relation, so N+1 isn't the issue. But if the Timeloop field lives on a related entry type, eager-load the relation itself.
- `loopPeriod` stored as JSON text — the field stores its value as a JSON string in a TEXT column. Custom queries against the raw DB value need `JSON_EXTRACT` or similar.
## Field Configuration
The Timeloop field has one setting:
| Setting | Type | Description |
|---------|------|-------------|
| `showTime` | boolean | Enable time selection on start/end dates |
## Data Model
The field normalizes to a `TimeloopModel` with these properties:
| Property | Type | Description |
|----------|------|-------------|
| `loopStartDate` | `DateTime\|null` | Recurrence start |
| `loopEndDate` | `DateTime\|null` | Recurrence end (null = +20 years) |
| `loopStartTime` | `DateTime\|null` | Start time (when `showTime` enabled) |
| `loopEndTime` | `DateTime\|null` | End time (when `showTime` enabled) |
| `loopPeriod` | `array\|null` | `{ frequency, cycle, days[], timestring }` |
| `loopReminderValue` | `int\|null` | Reminder offset value |
| `loopReminderPeriod` | `string\|null` | Reminder offset unit (`days`, `weeks`, etc.) |
### Period Frequencies
| Frequency code | Meaning | Cycle example |
|---------------|---------|---------------|
| `P1D` | Daily | Every `cycle` days |
| `P1W` | Weekly | Every `cycle` weeks (with optional `days[]` selection) |
| `P1M` | Monthly | Every `cycle` months (with optional ordinal + day timestring) |
| `P1Y` | Yearly | Every `cycle` years |
## Twig API
### Variable: `craft.timeloop`
Access via the `craft.timeloop` variable on any element's Timeloop field value:
```twig
{% set timeloopData = entry.myTimeloopField %}
{# Next upcoming occurrence — returns DateTime|null #}
{% set next = craft.timeloop.getUpcoming(timeloopData) %}
{% if next %}
<time datetime="{{ next|date('c') }}">{{ next|date('d M Y') }}</time>
{% endif %}
{# Next 5 upcoming dates — returns DateTime[] #}
{% set dates = craft.timeloop.getDates(timeloopData, 5) %}
{% for date in dates %}
<li>{{ date|date('d M Y') }}</li>
{% endfor %}
{# All dates (including past) — set futureDates to false #}
{% set allDates = craft.timeloop.getDates(timeloopData, 10, false) %}
{# Reminder date for next occurrence — returns DateTime|null #}
{% set reminder = craft.timeloop.getReminder(timeloopData) %}
{# Period model — returns PeriodModel|null #}
{% set period = craft.timeloop.period(timeloopData) %}
```
### Variable Methods
| Method | Returns | Description |
|--------|---------|-------------|
| `getUpcoming(data)` | `DateTime\|null` | Next single upcoming occurrence |
| `getDates(data, limit?, futureDates?)` | `DateTime[]` | Up to `limit` dates (default `0` = no limit). `futureDates` default `true`. (The 100 default applies only to the GraphQL `dates(limit:)` arg.) |
| `getReminder(data)` | `DateTime\|null` | Reminder date based on configured offset before next occurrence |
| `period(data)` | `PeriodModel\|null` | Raw period configuration model |
### Model Methods (on the field value directly)
The `TimeloopModel` also exposes methods directly:
```twig
{% set tl = entry.myTimeloopField %}
{{ tl.getUpcoming()|date('d M Y') }}
{{ tl.getNextUpcoming()|date('d M Y') }}
{{ tl.getDates(5)|length }} upcoming dates
{{ tl.getReminder()|date('d M Y') }}
{{ tl.loopStartTime }}
{{ tl.loopEndTime }}
```
| Method | Returns | Description |
|--------|---------|-------------|
| `getUpcoming()` | `DateTime\|null` | First upcoming date |
| `getNextUpcoming()` | `DateTime\|null` | Second upcoming date |
| `getDates(limit?, futureDates?)` | `DateTime[]\|null` | Computed occurrence list (`limit` default `0` = no limit) |
| `getReminder()` | `DateTime\|null` | Next reminder date |
| `getPeriod()` | `PeriodModel\|null` | Period configuration |
| `getLoopStartTime()` | `string\|null` | Formatted `H:i` |
| `getLoopEndTime()` | `string\|null` | Formatted `H:i` |
### Function: `recurringDates()`
Cross-entry date query — finds recurring dates across multiple entries within a date range:
```twig
{% set events = craft.entries.section('events') %}
{% set dates = recurringDates(events, 'myTimeloopField', '2025-04-01', '2025-06-30') %}
{% for item in dates %}
<h3>{{ item.entryTitle }} (ID: {{ item.entryId }})</h3>
{% for date in item.dates %}
<li>{{ date|date('d M Y') }}</li>
{% endfor %}
{% endfor %}
```
Returns an array of objects: `{ entryId, entryTitle, dates[] }`.
**Performance note:** This iterates every entry in the query and computes loops. Always scope the element query tightly.
## GraphQL
```graphql
{
entries(section: "events") {
... on events_default_Entry {
myTimeloopField {
loopPeriod {
frequency
cycle
days
timestring {
ordinal
day
}
}
loopStartDate
loopStartTime
loopEndDate
loopEndTime
loopReminder
getUpcoming
getReminder
getDates(limit: 5, futureDates: true)
}
}
}
}
```
## Pair With
- **SEOMatic** — use `getUpcoming()` to populate event structured data dates
- **Element API** — expose recurring dates as JSON endpoints for calendar integrations
- **Formie** — event registration forms linked to entries with Timeloop fields
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |