Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
create-job
alizharb/agent-skills
claude-code
queues
jobs
retries
idempotency
async-workflows
testing

Use when creating or changing Laravel queued jobs, batches, asynchronous workflows, or retryable background work.

Install
php artisan boost:add-skill alizharb/agent-skills

Save this content to: .claude/skills/create-job/SKILL.md

# Create Job

## When To Use

Use this skill for asynchronous, slow, retryable, external, scheduled, or failure-tolerant work.

## Inputs Needed

- Work to perform, payload, queue, timeout, retries, uniqueness, idempotency, failure handling, and tests.

## Workflow

1. Inspect existing queue conventions.
2. Create the job with Artisan.
3. Prefer queue attributes such as `#[Queue]`, `#[Connection]`, `#[Tries]`, `#[Backoff]`, `#[Timeout]`, `#[MaxExceptions]`, `#[Delay]`, `#[UniqueFor]`, `#[FailOnTimeout]`, `#[DeleteWhenMissingModels]`, and `#[WithoutRelations]` for simple job metadata.
4. Pass IDs or small serializable data instead of large mutable objects when practical.
5. Inject services into `handle()` instead of calling `app()` from the job body.
6. Set timeout, tries or retry strategy, backoff, and failure behavior.
7. Make retries idempotent where possible.
8. Dispatch after commit when the job depends on newly written data, or set queue connection `after_commit` behavior intentionally.
9. Add tests with queue fakes or synchronous execution as appropriate.

## Files That May Be Created

- `app/Jobs/*`
- Job tests.

## Files That May Be Modified

- Actions, listeners, commands, schedules, queue config, and tests.

## Architecture Rules

- Jobs run background work; Actions own primary business operations.
- Jobs may call Actions or Services.
- Jobs should not contain UI or HTTP response logic.
- Job dependencies should be method-injected into `handle()` unless they must be serialized.

## Testing Requirements

- Test dispatch, payload, retry-sensitive behavior, failure handling, and idempotency where relevant.

## Security Requirements

- Re-authorize or validate assumptions for delayed work when permissions or state may change.
- Avoid logging secrets.

## Review Checklist

- Is async work necessary?
- Is the job retry-safe?
- Are timeout and retry settings explicit?

## Common Mistakes

- Queueing non-idempotent work without safeguards.
- Dispatching inside a transaction too early.
- Storing user-provided secrets in job payloads.

Create Job

When To Use

Use this skill for asynchronous, slow, retryable, external, scheduled, or failure-tolerant work.

Inputs Needed

  • Work to perform, payload, queue, timeout, retries, uniqueness, idempotency, failure handling, and tests.

Workflow

  1. Inspect existing queue conventions.
  2. Create the job with Artisan.
  3. Prefer queue attributes such as #[Queue], #[Connection], #[Tries], #[Backoff], #[Timeout], #[MaxExceptions], #[Delay], #[UniqueFor], #[FailOnTimeout], #[DeleteWhenMissingModels], and #[WithoutRelations] for simple job metadata.
  4. Pass IDs or small serializable data instead of large mutable objects when practical.
  5. Inject services into handle() instead of calling app() from the job body.
  6. Set timeout, tries or retry strategy, backoff, and failure behavior.
  7. Make retries idempotent where possible.
  8. Dispatch after commit when the job depends on newly written data, or set queue connection after_commit behavior intentionally.
  9. Add tests with queue fakes or synchronous execution as appropriate.

Files That May Be Created

  • app/Jobs/*
  • Job tests.

Files That May Be Modified

  • Actions, listeners, commands, schedules, queue config, and tests.

Architecture Rules

  • Jobs run background work; Actions own primary business operations.
  • Jobs may call Actions or Services.
  • Jobs should not contain UI or HTTP response logic.
  • Job dependencies should be method-injected into handle() unless they must be serialized.

Testing Requirements

  • Test dispatch, payload, retry-sensitive behavior, failure handling, and idempotency where relevant.

Security Requirements

  • Re-authorize or validate assumptions for delayed work when permissions or state may change.
  • Avoid logging secrets.

Review Checklist

  • Is async work necessary?
  • Is the job retry-safe?
  • Are timeout and retry settings explicit?

Common Mistakes

  • Queueing non-idempotent work without safeguards.
  • Dispatching inside a transaction too early.
  • Storing user-provided secrets in job payloads.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox