laravel-security

laravel-security is a skill for Claude Code, Codex from gongyijie85/dsh-ecc. It costs 55 tokens per session (6,476 once invoked), scanned A, a copy of laravel-security, MIT.

Security guidance for Laravel, a PHP framework for building web applications. It covers login and permissions, safe database queries, protection against common browser attacks, API security, and secure deployment settings.

In plain words
What is it for?
Use it when setting up authentication and user roles, reviewing Eloquent database code, securing APIs, checking CSRF and XSS protections, or preparing a Laravel app for production.
Why use it?
It helps prevent common security mistakes in Laravel apps, such as exposing sensitive configuration, allowing unauthorized access, or accepting unsafe input. It also provides checks for production settings that are easy to overlook.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when setting up authentication and user roles, reviewing Eloquent database code, securing APIs, checking CSRF and XSS protections, or preparing a Laravel app for production.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gongyijie85/dsh-ecc/laravel-security
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.

Any agent
npx skills add gongyijie85/dsh-ecc --skill laravel-security
Clone the repo
git clone --depth 1 https://github.com/gongyijie85/dsh-ecc

Made for: Claude Code, Codex.

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-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/laravel-security/github.svg)](https://agentmods.dev/skills/gongyijie85/dsh-ecc/laravel-security)
Your own site
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/laravel-security"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/laravel-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for laravel-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/laravel-security"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/laravel-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,476 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod 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.1 $0.00055 $0.06476
Opus 5.5 $0.00022 $0.02590
Sonnet 5.5 $0.00011 $0.01295
Haiku 4.5 $0.00006 $0.00648

Measured 2mo ago against content hash 0440ddff450c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

laravel-security scanned grade A with 1 finding 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 2mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

axios.defaults.headers.common['X-CSRF-TOKEN'] = document.querySelector(
Origin

This is a copy

92% identical to laravel-security — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/laravel-security/SKILL.md · 949 lines

How it starts

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

Laravel Security Best Practices

Comprehensive security guidelines for Laravel applications to protect against common vulnerabilities.

When to Activate

  • Setting up Laravel authentication and authorization (Sanctum, Passport, Jetstream, Breeze)
  • Implementing user roles, permissions, and policies
  • Configuring production security settings and environment variables
  • Reviewing Laravel applications for security vulnerabilities
  • Deploying Laravel applications to production
  • Writing secure Eloquent queries and migrations

Production Configuration

Essential Production Settings

// config/app.php
'env' => env('APP_ENV', 'production'),
'debug' => (bool) env('APP_DEBUG', false), // CRITICAL: Never true in production
'key' => env('APP_KEY'), // Must be set: php artisan key:generate

// config/session.php
'secure' => env('SESSION_SECURE_COOKIE', true),
'http_only' => true,
'same_site' => 'lax',

// Verify APP_KEY is set at boot
// bootstrap/app.php or a service provider
if (empty(config('app.key'))) {
    throw new RuntimeException('APP_KEY is not set. Run: php artisan key:generate');
}

Environment File Security

# NEVER commit .env to version control
# .gitignore already includes .env by default

# Use .env.example with placeholders instead
DB_PASSWORD=
APP_KEY=
SANCTUM_TOKEN_PREFIX=

# Validate required variables at boot
// In AppServiceProvider::boot()
$requiredKeys = ['app.key', 'database.connections.mysql.database', 'database.connections.mysql.username'];
foreach ($requiredKeys as $key) {
    if (empty(config($key))) {
        throw new RuntimeException("Missing required config key: {$key}");
    }
}

HTTPS Enforcement

// AppServiceProvider::boot() or middleware
if (app()->environment('production')) {
    URL::forceScheme('https');
    request()->server->set('HTTPS', 'on');
}

// config/app.php for trusted proxies (load balancers)
// Use specific IP ranges — * trusts all, allowing X-Forwarded-* spoofing
// AWS: '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16'
'trusted_proxies' => ['10.0.0.0/8', '172.16.0.0/12'],

// Force HTTPS in production via middleware
// app/Http/Middleware/ForceHttps.php
public function handle($request, Closure $next)
{
    if (!$request->secure() && app()->environment('production')) {
        return redirect()->secure($request->getRequestUri());
    }
    return $next($request);
}

Read the full file on GitHub · 949 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. 2mo ago First seen · 949 lines · 55 tokens per session scan A 0440ddff450c

Subscribe to this mod's changes

laravel-security is a skill published in the GitHub repository gongyijie85/dsh-ecc (12 stars, last pushed 1mo ago), licensed MIT. It adds 55 tokens to every session and 6,476 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). It is 92% identical to laravel-security, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

manage-taskboard

Manage work in the native DeepSeek Harness Taskboard with exact task ids and optimistic versions. Use when an Agent must inspect project work, claim an eligible todo, record progress or blockers, verify an implementation, submit it for human review, or release its own claim; also use when a human asks how to accept…

shengsheng90/DSH-taskboard · 88 tokens

mcp-integration

This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use mcp.json", "set up Model Context Protocol", "connect external service", mentions "${PLUGINROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for…

Sivan757/dsh-agent-plugins-market · 95 tokens

hook-development

This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "wire command hooks", "use ${PLUGINROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStart, SubagentStop…

Sivan757/dsh-agent-plugins-market · 113 tokens

agent-development

This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices…

Sivan757/dsh-agent-plugins-market · 77 tokens

promentor

A tool that turns a software project into a hands-on course in the style of an MIT course. It can produce lessons, code walkthroughs, practical labs, behavior tests, grading, explanations, and AI reviews.

Lyn-77/ProMentor · 85 tokens

playlet-wechat-feed

A daily report of popular short-drama articles from WeChat public accounts, a Chinese publishing platform, grouped by story themes and accompanied by writing insights.

redfox-data/redfox-community-dsh · 269 tokens