skills/laravel-transactions-and-consistency/SKILL.md
Wrap multi-write operations in transactions; use dispatchAfterCommit and idempotency patterns to ensure consistency
npx skillsauth add noartem/skills laravel-transactions-and-consistencyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ensure multi-step changes are atomic; make retries safe.
DB::transaction(function () use ($order, $payload) {
$order->update([...]);
$order->items()->createMany($payload['items']);
OrderUpdated::dispatch($order); // or flag for after-commit
});
// Listener queued after commit
class SendInvoice implements ShouldQueue {
public $afterCommit = true;
}
DB::transaction to wrap write sequences and related side-effects$afterCommit or dispatchAfterCommit() for events / jobslockForUpdate() for row-level coordination when neededtesting
Decompose large Vue 3 components into focused SFCs and composables with explicit contracts, simple templates, and SSR-safe side effects.
tools
shadcn-vue for Vue/Nuxt with Reka UI components and Tailwind. Use for accessible UI, Auto Form, data tables, charts, dark mode, MCP server setup, or encountering component imports, Reka UI errors.
tools
Stabilize workflows with Template Method or Strategy; extend by adding new classes instead of editing core logic
tools
Schedule tasks with safety; use withoutOverlapping, onOneServer, and visibility settings for reliable cron execution