coolify: Skill for Claude Code

.agents/skills/laravel-best-practices/SKILL.md

laravel-best-practices is a skill for Claude Code, Codex from coollabsio/coolify. It costs 114 tokens per session (2,069 once invoked), scanned A, original, Apache-2.0.

A set of practical guidelines for writing, reviewing, and refactoring Laravel PHP code. Laravel is a PHP framework for building web applications, and the guidance covers common application code and database queries.

In plain words
What is it for?
Use it when changing Laravel controllers, models, migrations, requests, policies, jobs, commands, services, or database queries.
Why use it?
It helps prevent inconsistent code, slow database access, repeated queries, and other common maintenance problems by following the patterns already used in the project.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

This is coollabsio/coolify's own configuration. It tells Claude Code and Codex how to work on coolify itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything coolify configures →

About the project

Coolify is a self-hosted platform for managing servers and deploying applications, databases, static sites, and other services on hardware controlled by the user. Developers and teams use it as an alternative to hosted application platforms such as Heroku, Netlify, and Vercel, while the catalogue entries help coding agents operate Coolify.

coollabsio/coolify · 61,644 stars · on GitHub · coolify.io

Reuse

Borrowing it

Nothing to install: this file belongs to coollabsio/coolify. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/coollabsio/coolify/main/.agents/skills/laravel-best-practices/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/coollabsio/coolify

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-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/coollabsio/coolify/laravel-best-practices/github.svg)](https://agentmods.dev/skills/coollabsio/coolify/laravel-best-practices)
Your own site
<a href="https://agentmods.dev/skills/coollabsio/coolify/laravel-best-practices"><img src="https://agentmods.dev/badge/skills/coollabsio/coolify/laravel-best-practices/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-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/coollabsio/coolify/laravel-best-practices"><img src="https://agentmods.dev/badge/skills/coollabsio/coolify/laravel-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,069 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found 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.00114 $0.02069
Opus 5 $0.00057 $0.01035
Sonnet 5 $0.00023 $0.00414
Haiku 4.5 $0.00011 $0.00207

Measured 11d ago against content hash 39ac9e89aeb3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

laravel-best-practices scanned grade A with 0 findings 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 11d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.agents/skills/laravel-best-practices/SKILL.md · 191 lines

How it starts

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

Laravel Best Practices

Best practices for Laravel, prioritized by impact. Each rule teaches what to do and why. For exact API syntax, verify with search-docs.

Consistency First

Before applying any rule, check what the application already does. Laravel offers multiple valid approaches — the best choice is the one the codebase already uses, even if another pattern would be theoretically better. Inconsistency is worse than a suboptimal pattern.

Check sibling files, related controllers, models, or tests for established patterns. If one exists, follow it — don't introduce a second way. These rules are defaults for when no pattern exists yet, not overrides.

Quick Reference

1. Database Performance → rules/db-performance.md

  • Eager load with with() to prevent N+1 queries
  • Enable Model::preventLazyLoading() in development
  • Select only needed columns, avoid SELECT *
  • chunk() / chunkById() for large datasets
  • Index columns used in WHERE, ORDER BY, JOIN
  • withCount() instead of loading relations to count
  • cursor() for memory-efficient read-only iteration
  • Never query in Blade templates

2. Advanced Query Patterns → rules/advanced-queries.md

  • addSelect() subqueries over eager-loading entire has-many for a single value
  • Dynamic relationships via subquery FK + belongsTo
  • Conditional aggregates (CASE WHEN in selectRaw) over multiple count queries
  • setRelation() to prevent circular N+1 queries
  • whereIn + pluck() over whereHas for better index usage
  • Two simple queries can beat one complex query
  • Compound indexes matching orderBy column order
  • Correlated subqueries in orderBy for has-many sorting (avoid joins)

3. Security → rules/security.md

  • Define $fillable or $guarded on every model, authorize every action via policies or gates
  • No raw SQL with user input — use Eloquent or query builder
  • {{ }} for output escaping, @csrf on all POST/PUT/DELETE forms, throttle on auth and API routes
  • Validate MIME type, extension, and size for file uploads
  • Never commit .env, use config() for secrets, encrypted cast for sensitive DB fields

Read the full file on GitHub · 191 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. 11d ago First seen · 191 lines · 114 tokens per session scan A 39ac9e89aeb3

Subscribe to this mod's changes

laravel-best-practices is a skill published in the GitHub repository coollabsio/coolify (61,644 stars, last pushed today), licensed Apache-2.0. It adds 114 tokens to every session and 2,069 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

developing-with-laravel

Laravel framework patterns for PHP applications including Eloquent ORM, migrations, routing, queues, and Blade templates. Use when building Laravel applications or working with Laravel projects.

FortiumPartners/ensemble · 39 tokens

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

owl-admin-devtools-generator

A development guide for Owl Admin, a Laravel-based administration system, covering its code generator, API templates, relationships, and visual pages.

slowlyo/owl-admin · 82 tokens

llamaindex-development

Expert guidance for LlamaIndex development including RAG applications, vector stores, document processing, query engines, and building production AI applications.

Mindrally/skills · 32 tokens

zhihu-search

A search skill for finding content on Zhihu, a Chinese question-and-answer and article platform, through its search API.

itwanger/toBeBetterJavaer · 103 tokens

nestjs

Use when building or structuring a NestJS backend — feature modules, providers and DI wiring, provider scopes and request-lifecycle order, where to bind guards/pipes/interceptors/filters, and testing with Test.createTestingModule. NOT a bare Express/Fastify service with no DI (that is nodejs), NOT framework-agnostic…

ericrisco/rsc-harness · 81 tokens