LA

laravel:rate-limiting

Secure Laravel endpoints with per-user or per-route rate limiting and intelligent backoff headers.

Install

mkdir -p .claude/skills/laravel-rate-limiting && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11676" && unzip -o skill.zip -d .claude/skills/laravel-rate-limiting && rm skill.zip

Installs to .claude/skills/laravel-rate-limiting

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Apply per-user and per-route limits with RateLimiter and throttle middleware; use backoffs and headers for clients
114 charsno explicit “when” trigger
Beginner

Key capabilities

  • Apply per-user rate limits to API routes
  • Implement per-route throttling using middleware
  • Communicate rate limits to clients via standard HTTP headers
  • Provide sensible 429 responses with retry hints
  • Scope limits by user when authenticated, falling back to IP

How it works

This skill configures Laravel's RateLimiter and throttle middleware to apply rate limits based on user ID or IP address. It ensures communication of limits through standard headers.

Inputs & outputs

You give it
Laravel application routes and user authentication context
You get back
API endpoints protected by rate limits with appropriate HTTP responses

When to use laravel:rate-limiting

  • Add rate limits to API routes
  • Protect endpoints from brute-force
  • Implement per-user traffic throttling
  • Configure custom backoff headers

About this skill

Rate Limiting and Throttle

Protect endpoints from abuse while keeping UX predictable.

Commands

// App\Providers\RouteServiceProvider
RateLimiter::for('api', function (Request $request) {
    return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
});

// routes/api.php
Route::middleware(['throttle:api'])->group(function () {
    // ...
});

Patterns

  • Scope limits by user when authenticated; fall back to IP
  • Communicate limits to clients via standard headers
  • Provide sensible 429 responses with retry hints
  • Separate bursty endpoints into specialized limiters

When not to use it

  • When the application is not built with Laravel

Limitations

  • Applicable only to Laravel applications
  • Requires configuration of RateLimiter and throttle middleware

How it compares

This skill provides specific Laravel-native patterns for rate limiting, integrating directly with the framework's features, unlike implementing rate limiting manually or with external tools.

Compared to similar skills

laravel:rate-limiting side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
laravel:rate-limiting (this skill)09moNo flagsBeginner
laravel-pdf113moReviewBeginner
laravel-specialist123moNo flagsIntermediate
pennant-development24moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

laravel-pdf

spatie

Generate PDFs from Blade views or HTML using spatie/laravel-pdf. Covers creating, formatting, saving, downloading, and testing PDFs with the Browsershot, Cloudflare, or DOMPDF driver.

1140

laravel-specialist

Jeffallan

Use when building Laravel 10+ applications requiring Eloquent ORM, API resources, or queue systems. Invoke for Laravel models, Livewire components, Sanctum authentication, Horizon queues.

1215

pennant-development

laravel

Manages feature flags with Laravel Pennant. Activates when creating, checking, or toggling feature flags; showing or hiding features conditionally; implementing A/B testing; working with @feature directive; or when the user mentions feature flags, feature toggles, Pennant, conditional features, rollouts, or gradually enabling features.

29

developing-shopper

shopperlabs

Provides coding standards and patterns for Laravel Shopper development. Use when creating or modifying Models, Actions, Enums, Livewire components, migrations, or tests in any Shopper package.

36

developing-with-turbo-streams

hotwired-laravel

Basics of developing with Turbo Streams in web applications. Activate when working on projects that utilize Turbo Streams for enhancing user experience through real-time updates, dynamic content changes, and partial page updates without full reloads.

15

extending-shopper

shopperlabs

Provides patterns for extending Laravel Shopper with custom sidebar items, component overrides, event listeners, and domain features like stock, pricing, and media. Use when customizing Shopper behavior.

14

Search skills

Search the agent skills registry