laravel:rate-limiting

Implement per-user and per-route rate limiting with Laravel RateLimiter and throttle middleware.

1|Updated Sep 22, 2025
One-click install
npx skills add https://github.com/meistro57/chat_bridge --skill laravel-rate-limiting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel:rate-limiting
Source: https://github.com/meistro57/chat_bridge/tree/main/.claude/skills/rate-limiting-and-throttle
Command: npx skills add https://github.com/meistro57/chat_bridge --skill laravel-rate-limiting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents API abuse and ensures a predictable user experience by implementing robust rate limiting and throttling mechanisms for web application endpoints.

Core Features & Use Cases

  • Per-User and Per-Route Limits: Define custom rate limits based on authenticated users or specific routes.
  • Client Communication: Utilize standard HTTP headers (like X-RateLimit-Limit, X-RateLimit-Remaining, Retry-After) to inform clients about their current rate limit status.
  • Intelligent Backoffs: Configure sensible retry mechanisms for clients exceeding limits.
  • Use Case: Protect your public API from being overwhelmed by excessive requests from a single IP address or user, ensuring fair usage and service stability.

Quick Start

Apply the throttle:api middleware to protect your API routes.

Frequently Asked Questions about laravel:rate-limiting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement rate limiting in Laravel to protect my API routes?

To implement rate limiting in Laravel, apply the throttle:api middleware to your API routes. This uses Laravel's RateLimiter to scope limits by user ID or IP address and returns 429 responses with retry hints when exceeded.

What HTTP headers does Laravel throttle middleware use to communicate API rate limits?

Laravel throttle middleware communicates API rate limits using standard HTTP headers like X-RateLimit-Limit, X-RateLimit-Remaining, and Retry-After to inform clients about their current throttling status and intelligent backoff intervals.

Can I configure per-user and per-route throttling limits in Laravel?

Yes, you can configure per-user and per-route throttling limits in Laravel. The RateLimiter allows you to define custom rate limits scoped by authenticated user ID or specific web application endpoints to ensure fair usage.

What is API throttling and when do I need it for my web application?

API throttling prevents API abuse by restricting excessive requests from a single IP address or user. You need rate limiting when protecting public endpoints from being overwhelmed, ensuring service stability and predictable user experiences.

Why does my Laravel API return a 429 response for throttled requests?

A 429 response means the client exceeded the configured rate limiting threshold. Laravel's throttle middleware returns this status code with Retry-After headers to provide intelligent backoff hints for clients surpassing their per-user limits.