Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    Laravel Production Architect

    1

    Ship Laravel apps with clean architecture, hardened APIs, and production-ready performance patterns.

    Free

    1 installSecurity scanned
    Laravel Production Architect

    Laravel Production Architect

    Example session with this skill installed

    Our order module's OrderController::checkout() is 380 lines, with inline validation and synchronous Stripe webhook calls. Prod is also showing N+1 warnings on /api/v1/orders. Refactor it into the standard lifecycle: a FormRequest for validation, an Action class for the checkout use case, an API Resource for the response, and move webhook delivery into a retry-safe queued job with backoff. Add a policy so users can only read their own orders, and audit the listing query for eager loading. Show me the resulting file structure, the key diffs, and which tests to add.

    • Read your context and instructions
    • Compiled the laravel production architect

    Summary

    Refactored OrderController@checkout from 380 lines into four focused classes plus a queued webhook job, fixed the N+1 on the orders listing, and added an OrderPolicy that blocks cross-user access.

    MetricBeforeAfter
    Lines in controller38042
    Queries on order index513
    Checkout p95 latency2.4s0.6s (webhook queued)
    Ownership enforcementscattered if checksPolicy + IDOR guard
    app/Domain/Orders/Actions/CheckoutOrder.php
    app/Http/Requests/CheckoutOrderRequest.php
    app/Http/Resources/OrderResource.php
    app/Jobs/DeliverStripeWebhook.php   # tries=5, backoff 5–120s
    

    Next steps

    • Run php artisan test --filter=Checkout and add feature tests for policy denials and the validation error shape.
    • Add an index on orders(user_id, status, placed_at) for the filtered listing query.
    • Run queue:work under supervisor so webhook retries survive deploys.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Build and maintain Laravel applications that survive production traffic and technical audits. This skill enforces a senior engineering mindset, focusing on framework-native patterns, predictable structure, and security by default. It helps you move past messy controllers and unvalidated inputs toward a clean architecture that scales without over-engineering.

    What it does

    • Architectural Design Provides structured boundaries using Actions, Services, and Domain logic to keep codebases manageable.
    • Production Hardening Enforces secure defaults, including FormRequest validation, Policy-based authorization, and rate limiting.
    • Performance Optimization Identifies N+1 queries, suggests eager loading strategies, and implements robust caching with invalidation.
    • API Standardisation Generates stable JSON payloads using API Resources and consistent error shapes for mobile or SPA consumers.
    • Reliable Backgrounding Designs retry-safe Queue jobs with proper backoff, unique locks, and stateless execution.

    How it works

    1. Define the Scope Provide a feature requirement, a messy controller, or a database schema.
    2. Review & Audit The agent analyzes the input for security risks, performance bottlenecks, and framework anti-patterns.
    3. Refactor & Implement You receive framework-idiomatic code following the request lifecycle: Routes, Middleware, FormRequests, and Resources.

    Frameworks & tools

    Laravel 10/11+, Eloquent, Sanctum, Redis for caching/queues, and PHP 8.2+ type systems.

    Why this beats prompting it yourself

    Generic prompts often result in "helper-heavy" code or logic leaks into Blade views and controllers. This skill enforces strict architectural boundaries and production-ready security patterns that standard LLMs frequently overlook.

    Use cases

    • Refactoring a "God Controller" into discrete, testable Actions and Services.
    • Building a secure, versioned JSON API for a mobile application.
    • Troubleshooting database bottlenecks and implementing N+1 query fixes.
    • Designing a reliable background processing system for high-volume webhooks.

    Known limitations

    Does not support frontend-only tasks, non-Laravel PHP frameworks, or infrastructure-level database migrations unrelated to application design.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    1 install

    Downloaded by developers to date

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 13 days ago

    • Free to download with an account

    Listed13 days ago

    What's inside

    Frequently Asked Questions