Skip to content

Laravel Security Best Practices

Guides an agent through Laravel security: auth, validation, CSRF, uploads, secrets, rate limiting and hardening.

Repository
affaan-m/ECC
Stars
295,127
Licence
MIT
Files
1 file

What it does

Once installed, the agent answers Laravel security questions and reviews code using a checklist of common protections: login and permission checks with policies, validating input with Form Requests, CSRF and XSS defences, safe file uploads, rate limiting on login, encrypted database fields, security headers and CORS settings. It supplies Laravel code examples for these patterns. The skill is a written guide only; it does not change the project by itself.

Great for

  • Laravel developers hardening an existing application before production
  • Teams reviewing API endpoints, file uploads or login flows
  • Developers new to Laravel security who want a structured checklist

Skip it if

  • Full security audits: the guide is a general checklist and cannot prove an app is secure, so use a professional review for high-risk systems
  • Non-Laravel frameworks, since the examples depend on Laravel-specific classes and config files

Try asking

  • “Review my Laravel login controller and rate limiting for security problems”
  • “Add safe invoice PDF upload validation and private storage to my Laravel app”
  • “Check my config and middleware for production hardening issues”
  • “Show me how to encrypt an API token column in my Eloquent model”
Step-by-step guide: how to use Laravel Security Best PracticesInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    laravel-security.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip laravel-security.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip laravel-security.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Point the agent at specific files (routes, controllers, config) so it can check them against the checklist rather than giving generic advice.
  • Confirm suggested settings such as SESSION_SAME_SITE and CSP against your own app, since some values depend on your setup.
  • The guide is written in Spanish; ask for English output if your team needs it.

What's inside

  • SKILL.md

Redistributed unmodified from affaan-m/ECC under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.