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/retour.md
View on GitHub# Retour
Intelligent redirect manager by nystudio107. Handles static and regex redirects, tracks 404s, automatically creates redirects on slug changes, supports CSV import/export, and provides a GraphQL API. SEOMatic's companion for URL management — used in 5/6 projects.
`nystudio107/craft-retour` — $59
## Documentation
- Overview: https://nystudio107.com/docs/retour/
- Configuration: https://nystudio107.com/docs/retour/configuring.html
- Using: https://nystudio107.com/docs/retour/using.html
When unsure about a Retour feature, `WebFetch` the relevant docs page.
## Common Pitfalls
- Not enabling automatic slug-change redirects — this is Retour's killer feature. When an editor changes an entry's slug, Retour auto-creates a redirect from the old URL to the new one. Enable it in Settings.
- Creating exact-match redirects when regex is needed — for URL pattern changes (e.g., `/blog/2024/*` → `/articles/*`), use regex redirects. Exact matches won't catch variations.
- Not reviewing the 404 dashboard regularly — Retour tracks 404s with hit counts. High-traffic 404s indicate broken links or missing redirects.
- Redirect loops — creating a redirect from A → B when B already redirects to A. Retour doesn't detect loops automatically.
- Using Retour for canonical URL handling — redirects and canonicals serve different purposes. Use SEOMatic for canonicals, Retour for redirects.
- Importing CSV without matching column format — Retour expects specific column ordering. Export first to see the format, then match your import file.
## Config File
```php
// config/retour.php
return [
'*' => [
// Create redirects automatically when entry slugs change
'createUriChangeRedirects' => true,
// Preserve query strings when redirecting
'preserveQueryString' => true,
// Strip query strings from 404 tracking (reduces noise)
'stripQueryStringFromStats' => true,
// How many 404 stats to keep per URL
'statsStoredLimit' => 1000,
// Redirect status code for auto-created redirects
'uriChangeRedirectSrcMatch' => 'pathonly',
// Enable the dashboard widget
'enableDashboardWidget' => true,
// Additional headers to send with redirects
'additionalHeaders' => [],
],
];
```
## Redirect Types
| Type | Match | Use Case |
|------|-------|----------|
| Exact Match | `/old-page` → `/new-page` | Single URL redirects |
| Regex Match | `/blog/(.*)` → `/articles/$1` | Pattern-based URL restructuring |
| 301 | Permanent | Default — SEO weight transfers |
| 302 | Temporary | Short-term redirects (promotions, maintenance) |
## CSV Import/Export
### Export
CP → Retour → Redirects → Export CSV. Downloads all redirects in Retour's format.
### Import
CP → Retour → Redirects → Import CSV. Columns must match the export format:
| Column | Description |
|--------|-------------|
| Legacy URL | Source URL pattern |
| Redirect To | Destination URL |
| Match Type | `exactmatch` or `regexmatch` |
| Status Code | `301` or `302` |
### Console Commands
```bash
# Clear all 404 statistics
ddev craft retour/stats/clear
# Trim 404 stats to configured limit
ddev craft retour/stats/trim
```
## 404 Dashboard
CP → Retour → 404s shows:
- URLs generating 404 errors
- Hit count per URL
- Last hit timestamp
- Referrer information
- Quick "create redirect" action per 404
Use this to identify broken inbound links and fix them systematically.
## Twig API
Retour doesn't have a front-end Twig API — it operates at the routing layer before templates render. Redirects are processed on every request before Craft's template rendering kicks in.
## GraphQL
```graphql
{
retour {
redirects {
legacyUrl
redirectDestUrl
redirectHttpCode
hitCount
hitLastTime
}
}
}
```
## Multi-Site
Redirects can be scoped per-site or applied globally across all sites. Site-specific redirects take precedence over global ones.
## Pair With
- **SEOMatic** — handles all SEO meta; Retour handles all redirects (SEOMatic explicitly does not handle redirects)
- **Blitz** — Retour redirects are processed before Blitz serves cached pages
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 |