$npx skillfedfor your agent

laravel-api

Laravel API guides you through building REST APIs using stateless, resource-scoped architecture with explicit boundaries between HTTP, business logic, and data layers. It enforces PSR-12 code quality, JWT authentication, versioned endpoints, and invokable controllers to establish maintainable patterns from your first resource.

Laravel API helps you build production-grade REST APIs using clean, stateless architecture with Laravel best practices.

AI-generated summary based on this skill's SKILL.md

26 2 MITupdated by JustSteveKing

Decision gist · record as of 2026-01-12

Laravel API helps you build production-grade REST APIs using clean, stateless architecture with Laravel best practices. Laravel API guides you through building REST APIs using stateless, resource-scoped architecture with explicit boundaries between HTTP, business logic, and data layers. It enforces PSR-12 code quality, JWT authentication, versioned endpoints, and invokable controllers to establish maintainable patterns from your first resource.

manual: git clone https://github.com/JustSteveKing/laravel-api-skill → cp -r laravel-api-skill/laravel-api ~/.claude/skills/laravel-api
laravel-api/SKILL.md · version 372a821d

Use it when

  • Laravel API teaches resource-scoped architecture that separates HTTP concerns from business logic and data access.
  • Laravel API covers stateless JWT authentication for APIs and versioned endpoint design.

Verify before relying

Read SKILL.md below before installing (9 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

JustSteveKing/laravel-api-skill/laravel-api · repository language: Python

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I build a Laravel REST API with clean architecture?

Laravel API guides you through building REST APIs using stateless, resource-scoped architecture with explicit boundaries between HTTP, business logic, and data layers. The skill emphasizes invokable controllers, Form Request DTOs, and Action classes to keep concerns separated. You'll learn to structure endpoints around resources, enforce PSR-12 code quality, and establish maintainable patterns from your first resource onward.

What's the best way to structure a Laravel API project?

Laravel API teaches resource-scoped architecture that separates HTTP concerns from business logic and data access. Use invokable controllers for single-action endpoints, Form Request classes for validation and data transfer, and Action classes for reusable business logic. This layered approach keeps your codebase readable and testable while following Laravel conventions and PSR-12 standards.

How do I add JWT auth to Laravel and set up API versioning?

Laravel API covers stateless JWT authentication for APIs and versioned endpoint design. You'll configure token-based auth to replace session cookies, implement versioning strategies to manage API evolution, and ensure each request carries authentication context without server-side state. The skill shows how to integrate these patterns into your resource routing and controller structure.

What Laravel API best practices should I follow?

Laravel API emphasizes stateless design, explicit resource routing, PSR-12 code quality, and separation of concerns through invokable controllers and Action classes. Best practices include using Form Request DTOs for validation, filtering via query builders, consistent response formatting, and avoiding anti-patterns like fat controllers or mixed business logic. These patterns ensure your API remains maintainable and scalable.

How can I review and refactor my Laravel API code for quality?

Laravel API teaches code review techniques focused on architecture boundaries, PSR-12 compliance, and design patterns. Look for violations like business logic in controllers, inconsistent response formats, or missing validation layers. Refactor by extracting Action classes, using Form Requests, and ensuring each layer has a single responsibility. The skill guides you toward readable, testable, production-grade code.

How do I scaffold new API resources following Laravel conventions?

Laravel API shows how to scaffold REST endpoints using invokable controllers, resource routing, and Form Request validation. Each resource gets a dedicated controller with single-action methods, a Form Request for input handling, and clear separation from business logic. This convention-based approach ensures consistency across your API and reduces boilerplate while maintaining clean architecture.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Laravel API - Steve's Architecture

Build Laravel REST APIs with clean, stateless, resource-scoped architecture.

Quick Start

When user requests a Laravel API, follow this workflow:

  1. Understand requirements - What resources? What operations? Authentication needed?
  2. Initialize project structure - Set up routing, remove frontend bloat
  3. Build first resource - Complete CRUD to establish pattern
  4. Add authentication - JWT via PHP Open Source Saver
  5. Iterate on remaining resources - Follow established pattern

Core Architecture Principles

Read references/architecture.md for comprehensive details.

(truncated - see the full file via the links below)

File tree — 9 files
laravel-api/SKILL.md
laravel-api/assets/templates/Action.php
laravel-api/assets/templates/Controller.php
laravel-api/assets/templates/FormRequest.php
laravel-api/assets/templates/Model.php
laravel-api/assets/templates/Payload.php
laravel-api/references/architecture.md
laravel-api/references/code-examples.md
laravel-api/references/code-quality.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Build production-grade Laravel REST APIs with clean architecture”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

php-rules
by softspark · softspark/ai-toolkit

PHP Rules enforces coding standards covering style, frameworks, patterns, security, and testing. It guides PSR-12 compliance, modern PHP 8.1+ syntax, Laravel and Symfony conventions, Eloquent and Doctrine patterns, and error handling best practices.

Apache-2.0updated Jul 2026
★ 161repo stars
laravel-specialist
by Jeffallan · Jeffallan/claude-skills

Laravel Specialist guides you through building production-ready Laravel 10+ applications with type-safe Eloquent models, queue workers, API resources, and Livewire components. It enforces modern PHP 8.2+ patterns, eager loading, dependency injection, and >85% test coverage across feature and unit tests. Use it for architecting database schemas, implementing authentication flows, optimizing queries, and validating code against PSR-12 standards.

MITupdated May 2026
★ 10,759repo stars
laravel-api-resource-patterns
by iSerter · iSerter/laravel-claude-agents

Learn how to structure Laravel API Resources for clean model transformation and consistent JSON responses. This skill covers conditional attributes, relationship loading, collections with pagination, and techniques to prevent N+1 queries.

MITupdated Apr 2026
★ 41repo stars
laravel-best-practices
by AsyrafHussin · AsyrafHussin/agent-skills

Laravel Best Practices is a comprehensive reference for building scalable Laravel 13 applications, covering 31 rules organized across architecture, Eloquent patterns, controllers, validation, security, performance, and API design. Use it when structuring applications, creating models and migrations, implementing form requests, or designing APIs. Includes essential patterns for service classes, repositories, form requests, and Eloquent models.

MITupdated May 2026
★ 58repo stars
Laravel
by rawveg · rawveg/skillsforge-marketplace

Get expert guidance on Laravel 12.x application development, from foundational concepts like routing and database migrations to advanced patterns including Eloquent relationships, API design, and authentication with Sanctum. This skill covers the full development lifecycle—models, validation, queues, dependency injection, and best practices for building scalable web applications.

no license declared → metadata onlyupdated Feb 2026
★ 39repo stars
php-pro
by Jeffallan · Jeffallan/claude-skills

PHP Pro is a senior-level specialist for modern PHP development with Laravel, Symfony, and PHP 8.3+. It enforces strict typing, dependency injection, and PSR compliance while generating typed DTOs, services, controllers, and comprehensive tests. Every implementation passes PHPStan level 9 and PHPUnit/Pest coverage thresholds before delivery.

MITupdated May 2026
★ 10,759repo stars

More skills php-expert (Apache-2.0) · laravel-patterns (MIT) · eloquent-best-practices (MIT) · laravel-systematic-debugging (MIT)

Tags
rest-api-frameworkjwt-authenticationdto-patternapi-versioningcode-refactoringpsr-12-standardslaravel-architecturestateless-designresource-routingaction-classes