- Home
- Skills
- APIs & Backend
- Laravel Backend API Assistant
Works with the AI Agents you already use
Laravel Backend API Assistant
A Laravel backend assistant for building, debugging, and auditing secure REST APIs, database structures, Eloquent models, and backend applications.
Free
Laravel Backend API Assistant
Example session with this skill installed
I need a new API endpoint to allow users to update their profile information. It should validate that the email is unique and the bio is under 500 characters. Use a Form Request.
- Read your context and instructions
- Compiled the laravel backend api
I have designed the update profile endpoint using a Form Request and an API Resource to ensure clean validation and response formatting.
Profile Update Implementation
// app/Http/Requests/UpdateProfileRequest.php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class UpdateProfileRequest extends FormRequest
{
public function authorize(): bool
{
return true; // Authorization handled via middleware or Policy
}
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'email' => [
'required',
'email',
'max:255',
Rule::unique('users')->ignore($this->user()->id),
],
'bio' => ['nullable', 'string', 'max:500'],
];
}
}
// app/Http/Controllers/Api/UserController.php
public function update(UpdateProfileRequest $request)
{
$user = $request->user();
$user->update($request->validated());
return new UserResource($user);
}
// routes/api.php
Route::middleware('auth:sanctum')->put('/profile', [UserController::class, 'update']);
Next steps
- Generate the
UserResourceif it does not exist usingphp artisan make:resource UserResource. - Run
php artisan testto verify the unique email validation logic. - Ensure the
biocolumn exists in youruserstable migration.
Connects securely to your tools. The creator never sees your data.
About this skill
Building and maintaining Laravel APIs requires constant attention to Eloquent performance, authorization logic, and request validation. This skill acts as a senior backend engineer to help you design, implement, and audit Laravel applications with a focus on RESTful best practices and MySQL optimization.
What it does
- API implementation writes controllers, routes, and Form Requests following REST standards.
- Security auditing identifies IDOR vulnerabilities, mass-assignment risks, and missing authorization policies.
- Database optimization designs migrations and Eloquent relationships while preventing N+1 query issues.
- Automated testing generates Feature and Unit tests for happy paths, validation failures, and tenant isolation.
- Systematic debugging analyzes stack traces to provide targeted, low-risk fixes for backend failures.
How it works
- Context inspection analyzes your existing Laravel version, project structure, and coding conventions.
- Endpoint design defines HTTP methods, request validation rules, and response shapes using API Resources.
- Component generation produces the necessary migrations, models, and services to fulfill the logic.
- Security review checks every new endpoint for authentication, authorization, and data leakage.
Frameworks & tools
This skill is built for Laravel (PHP) applications using MySQL. It utilizes Eloquent ORM, Laravel's built-in testing suite (PHPUnit/Pest), and standard API components like Form Requests and Resources.
Why this beats prompting it yourself
Generic prompts often ignore Laravel-specific security features like Policies or fail to scope queries in multi-tenant environments. This skill enforces a strict security review and database integrity check for every code change it proposes.
Use cases
- Scaffold a new REST API endpoint with full validation and authorization.
- Refactor a bloated controller into focused Service or Action classes.
- Audit an existing codebase for SQL injection risks and IDOR vulnerabilities.
- Optimize slow database queries using eager loading and proper indexing.
Known limitations
Does not support frontend-specific frameworks like Vue or React. Cannot execute migrations on production environments without explicit approval.
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
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 8 days ago
- Free with an Agensi account
Permissions
What's inside
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.