# Decide Queuing

> When to queue work vs execute synchronously. Async decisions.

- Skill: `attac-t/decide-queuing` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add attac-t/decide-queuing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/attac-t/decide-queuing/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: attac-t (https://skillmd.com/u/attac-t)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/attac-t/decide-queuing

---


# Skill: Queuing

> "If it can fail and retry, it's a Job."

## The Decision

**Queue as Job when:**
- External API call (Shopify, Stripe, Email)
- Execution > 100ms
- Operation can fail and should retry
- User doesn't need immediate result

**Execute Synchronously when:**
- User is waiting for the result
- Failure should show immediately
- Fast, in-memory computation

## The Heuristic

Ask: *"Can this fail, and should we retry without user intervention?"*

- **Yes** → Job
- **No** → Sync

## The Quick Test

| Ask Yourself  | Answer | Use  |
|---------------|--------|------|
| External API? | Yes    | Job  |
| User waiting? | Yes    | Sync |
| Needs retry?  | Yes    | Job  |
| < 100ms?      | Yes    | Sync |

## Real-World Examples

For concrete examples, see [examples.md](examples.md).

