Agent skill
laravel-api
Build RESTful APIs with Laravel using API Resources, Sanctum authentication, rate limiting, and versioning. Use when creating API endpoints, transforming responses, or handling API authentication.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/laravel-api-fusengine-agents
SKILL.md
Laravel API Development
Documentation
HTTP Layer
- routing.md - Routing
- controllers.md - Controllers
- middleware.md - Middleware
- requests.md - HTTP requests
- responses.md - HTTP responses
- redirects.md - Redirects
- urls.md - URL generation
API Features
- rate-limiting.md - Rate limiting
- pagination.md - Pagination
- http-client.md - HTTP client
Validation & Helpers
- validation.md - Validation rules
- strings.md - String helpers
API Controller
<?php
declare(strict_types=1);
namespace App\Http\Controllers\Api\V1;
final class PostController extends Controller
{
public function __construct(
private readonly PostService $postService,
) {}
public function index(): AnonymousResourceCollection
{
return PostResource::collection($this->postService->paginate(15));
}
public function store(StorePostRequest $request): JsonResponse
{
$post = $this->postService->create($request->validated());
return PostResource::make($post)->response()->setStatusCode(201);
}
}
API Routes
Route::prefix('v1')->group(function () {
Route::get('posts', [PostController::class, 'index']);
Route::middleware('auth:sanctum')->group(function () {
Route::post('posts', [PostController::class, 'store']);
});
});
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?