laravel-tall-stack-best-practices-cursorrules-prom

laravel-tall-stack-best-practices-cursorrules-prom is a cursor rule for coding agents from PatrickJS/awesome-cursorrules. It costs 978 tokens per session, scanned A, original, CC0-1.0.

A set of coding rules for the TALL stack: Laravel, Livewire, Alpine.js, and Tailwind CSS. It covers PHP style, Laravel structure, validation, dependency injection, error handling, and reusable code.

In plain words
What is it for?
Use it when building or maintaining Laravel applications that use Livewire, Alpine.js, and Tailwind CSS.
Why use it?
It reduces inconsistent Laravel code and helps the coding agent follow common patterns across the four technologies.

Cursor rule

About the project

PatrickJS/awesome-cursorrules is a collection of Markdown rule files that give Cursor AI editor project-specific instructions about code, frameworks, workflows, and standards. Developers use it to find reusable guidance for shaping Cursor’s behavior in different kinds of software projects.

PatrickJS/awesome-cursorrules · 40,725 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/patrickjs/awesome-cursorrules/laravel-tall-stack-best-practices-cursorrules-prom
Clone the repo
git clone --depth 1 https://github.com/PatrickJS/awesome-cursorrules

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for laravel-tall-stack-best-practices-cursorrules-prom

README.md
[![agentmods](https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/laravel-tall-stack-best-practices-cursorrules-prom.svg)](https://agentmods.dev/rules/patrickjs/awesome-cursorrules/laravel-tall-stack-best-practices-cursorrules-prom)
Your own site
<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/laravel-tall-stack-best-practices-cursorrules-prom"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/laravel-tall-stack-best-practices-cursorrules-prom.svg" alt="Measured on agentmods" height="20"></a>
Per session 978 This file is loaded in full into every session.
When invoked 978 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00978 $0.00978
Opus 5 $0.00489 $0.00489
Sonnet 5 $0.00196 $0.00196
Haiku 4.5 $0.00098 $0.00098

Measured 2d ago against content hash 68998cdedc25, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

laravel-tall-stack-best-practices-cursorrules-prom scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/laravel-tall-stack-best-practices-cursorrules-prom.mdc · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert in the TALL stack: Laravel, Livewire, Alpine.js, and Tailwind CSS, with a strong emphasis on Laravel and PHP best practices.

Key Principles

  • Write concise, technical responses with accurate PHP examples.
  • Follow Laravel best practices and conventions.
  • Use object-oriented programming with a focus on SOLID principles.
  • Prefer iteration and modularization over duplication.
  • Use descriptive variable and method names.
  • Favor dependency injection and service containers.

PHP and Laravel Core

  • Use PHP 8.1+ features when appropriate (e.g., typed properties, match expressions).
  • Follow PSR-12 coding standards.
  • Use strict typing: declare(strict_types=1);
  • Utilize Laravel's built-in features and helpers when possible.
  • Follow Laravel's directory structure and naming conventions.
  • Use PascalCase for class-containing directories (e.g., app/Http/Controllers).
  • Implement proper error handling and logging:
    • Use Laravel's exception handling and logging features.
    • Create custom exceptions when necessary.
    • Use try-catch blocks for expected exceptions.
  • Use Laravel's validation features for form and request validation.
  • Implement middleware for request filtering and modification.
  • Utilize Laravel's Eloquent ORM for database interactions.
  • Use Laravel's query builder for complex database queries.
  • Implement proper database migrations and seeders.

Laravel Best Practices

  • Use Eloquent ORM instead of raw SQL queries when possible.
  • Implement Repository pattern for data access layer.
  • Use Laravel's built-in authentication and authorization features.
  • Utilize Laravel's caching mechanisms for improved performance.
  • Implement job queues for long-running tasks.
  • Use Laravel's built-in testing tools (PHPUnit, Dusk) for unit and feature tests.
  • Implement API versioning for public APIs.
  • Use Laravel's localization features for multi-language support.
  • Implement proper CSRF protection and security measures.
  • Use Laravel Mix for asset compilation.
  • Implement proper database indexing for improved query performance.
  • Use Laravel's built-in pagination features.
  • Implement proper error logging and monitoring.

Livewire Implementation

  • Create modular, reusable Livewire components.
  • Use Livewire's lifecycle hooks effectively (e.g., mount, updated, etc.).
  • Implement real-time validation using Livewire's built-in validation features.
  • Optimize Livewire components for performance, avoiding unnecessary re-renders.
  • Integrate Livewire components with Laravel's backend features seamlessly.

Alpine.js Usage

  • Use Alpine.js directives (x-data, x-bind, x-on, etc.) for declarative JavaScript functionality.
  • Implement small, focused Alpine.js components for specific UI interactions.
  • Combine Alpine.js with Livewire for enhanced interactivity when necessary.
  • Keep Alpine.js logic close to the HTML it manipulates, preferably inline.

Tailwind CSS Styling

  • Utilize Tailwind's utility classes for responsive design.
  • Implement a consistent color scheme and typography using Tailwind's configuration.
  • Use Tailwind's @apply directive in CSS files for reusable component styles.
  • Optimize for production by purging unused CSS classes.

Performance Optimization

  • Implement lazy loading for Livewire components when appropriate.
  • Use Laravel's caching mechanisms for frequently accessed data.
  • Minimize database queries by eager loading relationships.
  • Implement pagination for large data sets.
  • Use Laravel's built-in scheduling features for recurring tasks.

Security Best Practices

  • Always validate and sanitize user input.
  • Use Laravel's CSRF protection for all forms.
  • Implement proper authentication and authorization using Laravel's built-in features.
  • Use Laravel's prepared statements to prevent SQL injection.
  • Implement proper database transactions for data integrity.

Testing

  • Write unit tests for Laravel controllers and models.
  • Implement feature tests for Livewire components using Laravel's testing tools.
  • Use Laravel Dusk for end-to-end testing when necessary.

Read the full file on GitHub · 116 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 116 lines · 978 tokens per session scan A 68998cdedc25

Subscribe to this mod's changes

laravel-tall-stack-best-practices-cursorrules-prom is a cursor rule published in the GitHub repository PatrickJS/awesome-cursorrules (40,725 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 978 tokens to every session, about $0.0049 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.