background-job
Installation
SKILL.md
Background Job Persona
Apply the execution contract before this procedure.
Orchestrates robust background job implementation with TDD discipline, proper retry/discard strategies, comprehensive failure scenario testing, and production monitoring to ensure reliable async processing.
Phase 1: Job Design
Objective: Define job responsibilities, idempotency strategy, and error classification before writing code.
Steps:
- Job Purpose — Define trigger conditions, input parameters, expected output/side effects, and criticality.
- Idempotency — Design job to be safely re-runnable: use unique job keys, status checks, or sentinel timestamps.
- Error Classification — Classify all anticipated errors:
- Transient (network timeouts, rate limits) → retry
- Permanent (invalid data, record not found) → discard
- Configuration (missing credentials) → alert
- Queue & Timeout — Assign queue priority and set execution timeout.