Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

laravel-security

Skill by affaan-m

laravel-security gives an AI assistant Laravel security best practices for authentication, authorization, Eloquent safety, CSRF, and secure deployment settings. It is for developers reviewing or deploying Laravel applications.

  • Score 91
  • 317k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install laravel-security

Built from the published package, never by AI.

git clone --depth 1 https://github.com/affaan-m/ECC /tmp/ECC && mkdir -p ~/.claude/skills && cp -r /tmp/ECC/skills/laravel-security ~/.claude/skills/laravel-security

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install laravel-security in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

laravel-security is an agent skill that gives an AI assistant Laravel security guidelines. It covers production configuration such as debug mode, APP_KEY, secure session cookies and HTTPS enforcement. It also covers authentication with Sanctum, password hashing, session regeneration, gates and policies, and authorization middleware.

Further sections cover Eloquent safety, including mass assignment protection, parameterized queries, attribute casting and hidden model fields. The file also describes default CSRF protection. Its when-to-activate list covers setting up auth, roles and policies, production settings, and reviewing apps for vulnerabilities. The source is written as code examples and rules to follow, aimed at developers building or auditing Laravel apps.

Written from the project's SKILL.md and checked against it.

What it can do

  • Production configuration reviewChecks debug mode, APP_KEY, secure session cookies and environment file handling.
  • HTTPS enforcementShows how to force HTTPS in production and limit trusted proxy ranges.
  • Sanctum API tokensCovers issuing tokens with abilities and checking them on routes.
  • Password and session securityCovers strong password rules, hashing and session regeneration on login.
  • Gates and policiesShows how to define and check authorization rules for model actions.
  • Authorization middlewareCovers route-level can checks and custom role middleware.
  • Mass assignment protectionExplains fillable whitelists and using validated request data for writes.
  • SQL injection preventionShows safe Eloquent and query builder use and flags raw string interpolation.
  • Model securityCovers hidden fields, attribute casting and safe appended attributes.
  • CSRF protectionDescribes the default CSRF verification in the web middleware group.

What you need

  • A Laravel application
  • Sanctum, Passport, Jetstream or Breeze for the auth examples
  • Laravel 10 or 11 for some casting features

Try asking

  • Review my Laravel routes for missing authorization checks.
  • Check my Laravel config and .env settings for production safety.
  • Audit my Eloquent models for mass assignment risks.

Good to know

  • The provided text ends partway through the CSRF section.
  • The XSS and API security sections named in the description are not shown in the provided text.
  • Some examples depend on specific Laravel versions, such as Laravel 10+ and 11+ casts.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/laravel-security/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md26 KB

Alternatives to laravel-security

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

laravel-security: common questions

Does laravel-security cover Sanctum API tokens?

Yes. The source shows issuing Sanctum tokens with abilities and checking those abilities on routes with middleware.

What production settings does it check?

It covers debug mode, APP_KEY, secure session cookies, trusted proxies and forcing HTTPS in production.

Does it help prevent SQL injection in Laravel?

Yes. It shows parameterized Eloquent and query builder queries and marks raw string interpolation as vulnerable.

How do I install laravel-security?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is laravel-security free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is laravel-security safe to use?

It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to laravel-security?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

laravel-security Install

Add to stack

Loading.