Works with the AI Agents you already use

    laravel bug finder

    by Alir

    2

    Systematic Laravel debugger for fixing Eloquent, routing, authentication, and runtime errors.

    Free

    7 usesSecurity scanned
    laravel bug finder

    laravel bug finder

    Example session with this skill installed

    I am getting a '419 Page Expired' error whenever I try to submit my contact form. Here is my Blade file and my route file.

    • Read your context and instructions
    • Compiled the laravel bug finder

    I have analyzed your contact.blade.php and web.php files. The error is caused by a missing security token required by Laravel's VerifyCsrfToken middleware.

    🐛 Bug Found

    Severity:
    High

    Problem:
    Form submissions are failing with a 419 status code.

    Root Cause:
    The <form> element in resources/views/contact.blade.php is missing the @csrf Blade directive. Laravel requires a CSRF token for all POST, PUT, PATCH, or DELETE requests to protect against cross-site request forgery.

    Affected File:
    resources/views/contact.blade.php

    🔧 Fix

    Insert the @csrf directive inside your form opening tag:

    <!-- resources/views/contact.blade.php -->
    <form action="{{ route('contact.submit') }}" method="POST">
        @csrf
        <div class="mb-3">
            <label for="name">Name</label>
            <input type="text" name="name" id="name" class="form-control">
        </div>
        <!-- ... rest of the form ... -->
        <button type="submit">Send Message</button>
    </form>
    

    🧪 Test

    1. Open the /contact page in your browser.
    2. Fill out the name and message fields.
    3. Click the Send Message button.
    4. Expected result: The form submits successfully and redirects to the success page instead of showing the 419 error.

    💡 Why This Happened

    Laravel includes a middleware that automatically verifies that the user making the request is the one who actually rendered the form. By adding @csrf, Laravel generates a hidden input field containing a unique token that the server checks upon submission.

    Next steps

    • Check other forms in your application (e.g., login, registration) for the @csrf tag.
    • Ensure your session.php config has the correct domain set if the error persists.

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

    About this skill

    The problem

    Laravel errors can be cryptic, often masking simple root causes behind generic 500 pages or BindingResolutionExceptions. Manually tracing a bug across routes, controllers, and Blade templates leads to hours of trial-and-error debugging.

    What it does

    • Analyzes exact error messages to isolate the specific failure point in the Laravel lifecycle.
    • Identifies root causes in Eloquent relationships, route parameters, and middleware authorization gates.
    • Detects PHP ParseErrors and syntax issues, specifically identifying misplaced braces or class structures.
    • Scans for security vulnerabilities like unsafe mass assignment, missing CSRF tokens, and unvalidated inputs.
    • Generates targeted fixes with specific code blocks and clear verification steps for manual testing.

    Frameworks & tools

    Laravel (including Eloquent, Blade, and Migrations), PHP, Vite, npm, and Composer.

    Why this beats prompting it yourself

    Generic prompts often result in broad architectural rewrites or hallucinated file paths. This skill follows a strict "Inspect Before Changing" workflow, ensuring solutions are derived from your actual codebase rather than generic best practices.

    Use cases

    • Fixing 'Route [name] not defined' or 'Target class does not exist' errors.
    • Debugging complex Eloquent relationship queries and mass assignment failures.
    • Resolving Vite manifest errors or asset loading issues in frontend components.
    • Auditing controller methods for missing authorization policies or validation gaps.

    Known limitations

    Requires access to the relevant Laravel project files to provide specific line-by-line fixes. Cannot execute database migrations or terminal commands directly.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    7 uses

    Times used to date

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    • Free with an Agensi account

    Permissions

    No special permissions declared or detected

    Listed2 months ago

    What's inside

    Creator

    Alir

    Alir

    3 skills on Agensi

    Frequently Asked Questions

    Simply provide the specific error message (e.g., a BindingResolutionException) or the problematic code snippet from your controller, route, or model. The skill will analyze your Laravel-specific logic and generate the precise code fix needed to resolve the issue.

    This skill is optimized for all modern versions of Laravel (6.x through 11.x) and supports core components including Eloquent ORM, Blade templates, and Vite/Mix asset pipelines. It requires an AI agent with file-reading capabilities to analyze your project structure effectively.

    Unlike generic AI prompts, this skill uses a systematic 'Inspect Before Changing' workflow tailored to the Laravel lifecycle. It focuses on isolating the exact failure point in your middleware, routes, or models rather than suggesting broad, unnecessary architectural changes.

    The skill identifies logic gaps such as missing CSRF tokens, unsafe mass assignment in Eloquent models, and unauthorized controller access. While it generates the fix, you must manually apply the suggested code to your project as the skill cannot directly modify your file system.

    Upon purchase, you receive full access to the Laravel Bug Finder skill for use within your AI agent interface. This includes ongoing updates to ensure compatibility with new Laravel releases and updated security best practices.

    New in APIs & Backend

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Free