Skip to main content
Exécutez n'importe quel Skill dans Manus
en un clic

maintenance-tasks

Étoiles4
Forks1
Mis à jour2 juillet 2026 à 13:50

Build or refactor a great Shopify `maintenance_tasks` Task (Rails) — the full design, not just batching. Starts from the decision that shapes everything — which of the four collection shapes fits: an AR **Relation** (per-record `process`), a **`Model.in_batches(of: N)`** batch enumerator (one set-based bulk write per batch), a plain **Array** (small finite computed collections like catalogs or date ranges), or **`no_collection`** (a single atomic SQL statement, no iteration) — then layers on idempotency, large-table timeout rules, callback/PaperTrail-aware writes, and the opt-in features (dry-run, attributes, throttling, callbacks). Encodes the traps agents hit repeatedly: a collection Relation must carry NO `ORDER BY`/`LIMIT` (the cursor adds its own PK ordering and it raises at runtime); `find_each` ignores a custom `order`; never override `count` for a batch enumerator; prefer the collection API over `no_collection` so you get progress + pause/resume; data backfills belong in a task, not a migration; use `

Installation

Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.

SKILL.md
readonly