agentleFS
ulpi-ioulpi-io/browse/.agents/skills/laravel/SKILL.md

laravel

Skill15 starsChanged 8 months agoApache-2.0View on GitHub

Laravel 12 API development — API-only, Actions pattern, Sanctum/Passport auth, Eloquent strict mode, Redis caching/queues, Horizon, Filament admin, Pest testing. Also covers Laravel AI ecosystem: AI SDK (agents, embeddings, image/audio generation), Boost (AI-assisted development), and MCP (exposing your app to AI clients). Use when working on any Laravel route, controller, model, action, migration, job, notification, test, API endpoint, AI agent, or MCP server task.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use wordpress and react.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • iamandrewpetersSkill

    wordpress

    Use this skill when working on WordPress development tasks including plugins, themes, shortcodes, hooks, WP-CLI commands, multisite, custom post types, meta boxes, the REST API, or debugging WordPress issues.

    Also in 3 projects that use this

  • VercelSkill

    react

    React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.

    Also in 6 projects that use this

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 6 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No returning Eloquent models directly: Every response goes through an API Resource.

    line 20
  2. Very specific:

    No inline validation: All validation lives in Form Request classes.

    line 21
  3. Very specific:

    No $guarded = []: Every model uses explicit $fillable.

    line 22
  4. Distinctive:

    No raw queries: Use Eloquent or the query builder with parameter bindings.

    line 23
  5. Very specific:

    No bare queue:work: All queue processing uses Horizon — in development and production.

    line 24
  6. Distinctive:

    Before writing ANY code, you MUST complete this checklist:

    line 32
  7. Very specific:

    Read references/stack.md to understand locked decisions (runtime, packages, patterns)

    line 34
  8. Distinctive:

    Read the matching reference file(s) — they contain the patterns, code examples, and anti-patterns

    line 36
  9. Distinctive:

    Only then begin implementation

    line 37
  10. Very specific:

    All mutations in Actions wrapped in DB::transaction().

    line 79
  11. Distinctive:

    All list endpoints paginated — never return unbounded collections.

    line 80
  12. Distinctive:

    All responses via API Resources — never return Eloquent models directly.

    line 81

“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<EXTREMELY-IMPORTANT> These rules apply to ALL Laravel code you write. Violating any of them produces broken, insecure, or unmaintainable output.
  1. No business logic in controllers. Controllers validate (Form Request), delegate (Action), return (API Resource). Nothing else.
  2. No returning Eloquent models directly. Every response goes through an API Resource. Never return $user.
  3. No inline validation. All validation lives in Form Request classes. Never $request->validate([...]) in controllers.
  4. No $guarded = []. Every model uses explicit $fillable. Mass-assignment protection is non-negotiable.
  5. No raw queries. Use Eloquent or the query builder with parameter bindings. Never concatenate user input into SQL.
  6. No bare queue:work. All queue processing uses Horizon — in development and production.
  7. Model::shouldBeStrict() must be enabled in AppServiceProvider::boot(). This prevents lazy loading, silently discarded attributes, and access to missing attributes.</EXTREMELY-IMPORTANT>

Laravel 12 API

MANDATORY FIRST RESPONSE PROTOCOL

Before writing ANY code, you MUST complete this checklist:

  1. Read references/stack.md to understand locked decisions (runtime, packages, patterns)
  2. Identify the task type from the routing table below
  3. Read the matching reference file(s) — they contain the patterns, code examples, and anti-patterns
  4. Only then begin implementation

Writing code without reading the reference = wrong patterns, wasted time, rework.

Routing Table

TaskRead
Starting a session / understanding the stackreferences/stack.md
Creating or modifying files, folder conventionsreferences/folder-structure.md
API routes, versioning, middlewarereferences/routing.md
Creating or editing a controllerreferences/controller-pattern.md
Adding validation to a requestreferences/form-requests.md
Creating or editing a model, relationships, scopesreferences/eloquent-models.md
API response transformation, pagination, filteringreferences/api-resources.md
Business logic, Actions, DTOs, service providersreferences/service-layer.md
Authentication, tokens, roles, policiesreferences/auth.md
Migrations, seeders, factories, query optimizationreferences/database.md
Error responses, exception handlingreferences/error-handling.md
Logging configuration, structured loggingreferences/logging.md
Redis caching, cache invalidation, TTL strategyreferences/caching.md
Jobs, queues, events, Horizon, broadcastingreferences/queues-jobs.md
Writing tests (feature or unit)references/testing.md
Security hardening, CORS, rate limiting, webhooksreferences/security.md
API documentation generationreferences/api-docs.md
Telescope, Horizon dashboard, Pulse, health checksreferences/observability.md
Filament admin panel, resources, pages, widgetsreferences/filament.md
Docker setup, CI/CD, deploymentreferences/docker.md
Notifications, email, SMSreferences/notifications-mail.md
File uploads, S3, media libraryreferences/file-storage.md
Task scheduling, cron jobsreferences/scheduling.md
AI agents, text/image/audio generation, embeddings, RAGreferences/ai-sdk.md
AI-assisted development, Boost setup, guidelines, skillsreferences/boost.md
MCP servers, exposing app to AI clients, tools/resources/promptsreferences/mcp.md

Multiple tasks? Read multiple files. The references are self-contained — no need to consult external docs.

Quick Rules

These repeat the critical guardrails for context-window resilience:

  1. Controllers are thin — validate via Form Request, delegate to Action, return API Resource.
  2. All mutations in Actions wrapped in DB::transaction().
  3. All list endpoints paginated — never return unbounded collections.
  4. All responses via API Resources — never return Eloquent models directly.
  5. $fillable on every model — never $guarded = [].
  6. Model::shouldBeStrict() in AppServiceProvider::boot().
  7. Horizon for all queue processing — never bare queue:work.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.