- Home
- Skills
- APIs & Backend
- laravel bug finder
Works with the AI Agents you already use
laravel bug finder
by Alir
Systematic Laravel debugger for fixing Eloquent, routing, authentication, and runtime errors.
Free
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
- Open the
/contactpage in your browser. - Fill out the name and message fields.
- Click the Send Message button.
- 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
@csrftag. - Ensure your
session.phpconfig 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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
What's inside
Creator
Alir
3 skills on Agensi
Frequently Asked Questions
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.