laravel-eloquent

laravel-eloquent is a skill for Claude Code, Codex from DemboNauta/skill-doc-generator. It costs 38 tokens per session (2,695 once invoked), scanned A, original, MIT.

A guide to Laravel Eloquent, the object-relational mapper included with Laravel 13. It covers PHP models that represent database records, queries, relationships, value conversion, collections, and API responses.

In plain words
What is it for?
Use it when generating Eloquent models, defining tables and keys, querying records, setting up relationships, casting values, or preparing API resources.
Why use it?
It gives the conventions and commands needed to create and inspect models and work with database data through Laravel.

Skill for Claude CodeCodex

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

Good fit Use it when generating Eloquent models, defining tables and keys, querying records, setting up relationships, casting values, or preparing API resources.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dembonauta/skill-doc-generator/laravel-eloquent
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 DemboNauta/skill-doc-generator --skill laravel-eloquent
Clone the repo
git clone --depth 1 https://github.com/DemboNauta/skill-doc-generator

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/dembonauta/skill-doc-generator/laravel-eloquent/github.svg)](https://agentmods.dev/skills/dembonauta/skill-doc-generator/laravel-eloquent)
Your own site
<a href="https://agentmods.dev/skills/dembonauta/skill-doc-generator/laravel-eloquent"><img src="https://agentmods.dev/badge/skills/dembonauta/skill-doc-generator/laravel-eloquent/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-eloquent

Your own site · 80×15
<a href="https://agentmods.dev/skills/dembonauta/skill-doc-generator/laravel-eloquent"><img src="https://agentmods.dev/badge/skills/dembonauta/skill-doc-generator/laravel-eloquent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,695 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.
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.00038 $0.02695
Opus 5 $0.00019 $0.01347
Sonnet 5 $0.00008 $0.00539
Haiku 4.5 $0.00004 $0.00269

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

Security

Grade A, and why

laravel-eloquent 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.

examples/skills/laravel-eloquent/SKILL.md · 386 lines

How it starts

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

Laravel Eloquent ORM (13.x)

Model Generation

php artisan make:model Flight                          # basic model
php artisan make:model Flight -m                       # + migration
php artisan make:model Flight -mfsc                    # + migration, factory, seeder, controller
php artisan make:model Flight -a                       # all: migration, factory, seeder, policy, controller, requests
php artisan make:model Member --pivot                  # pivot model
php artisan model:show Flight                          # inspect attributes & relations

Model Conventions

// Table name: snake_case plural of class (Flight → flights)
// Override with PHP attribute:
#[Table('my_flights')]
class Flight extends Model {}

// Custom primary key
#[Table(key: 'flight_id')]
// Non-incrementing string key
#[Table(key: 'uuid', keyType: 'string', incrementing: false)]

// UUID / ULID keys
class Article extends Model { use HasUuids; }   // UUIDv7 by default
class Article extends Model { use HasUlids; }

// Disable timestamps
#[WithoutTimestamps]
// Custom timestamp column names
public const CREATED_AT = 'creation_date';
public const UPDATED_AT = 'updated_date';

// Custom DB connection
#[Connection('mysql')]

// Default attribute values
protected $attributes = ['delayed' => false, 'options' => '[]'];

Strictness (AppServiceProvider::boot)

Model::preventLazyLoading(! $this->app->isProduction());
Model::preventSilentlyDiscardingAttributes(! $this->app->isProduction());

Retrieving Models

// All records
Flight::all();

// Query builder
$flights = Flight::where('active', 1)->orderBy('name')->limit(10)->get();

// Single record
Flight::find(1);
Flight::findOrFail(1);                    // throws ModelNotFoundException
Flight::where('number', 'FR 900')->first();
Flight::firstOrCreate(['name' => 'London'], ['delayed' => false]);
Flight::firstOrNew(['name' => 'London']);
Flight::updateOrCreate(['departure' => 'Oakland'], ['price' => 99]);

// Aggregates
Flight::where('active', 1)->count();
Flight::max('price');

// Refresh
$fresh = $flight->fresh();    // new instance, does not affect original
$flight->refresh();           // re-hydrates in place, including loaded relations

// Large datasets — avoid memory issues
Flight::chunk(200, function (Collection $flights) { /* ... */ });
Flight::chunkById(200, fn ($flights) => /* ... */, 'id');
Flight::lazy()->each(fn ($flight) => /* ... */);    // lazy collection / cursor

Read the full file on GitHub · 386 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 · 386 lines · 38 tokens per session scan A f8fbbfd99362

Subscribe to this mod's changes

laravel-eloquent is a skill published in the GitHub repository DemboNauta/skill-doc-generator (9 stars, last pushed 4mo ago), licensed MIT. It adds 38 tokens to every session and 2,695 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

butterbase

AI-native, open-source backend-as-a-service with a built-in Model Context Protocol server. Postgres, auth, storage, functions, AI gateway.

butterbase-ai/butterbase · 34 tokens

supabase

Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies…

supabase/agent-skills · 185 tokens

kotlin-backend-jpa-entity-mapping

Model Kotlin persistence code correctly for Spring Data JPA and Hibernate. Covers entity design, identity and equality, uniqueness constraints, relationships, fetch plans, and common ORM (Object-Relational Mapping) traps specific to Kotlin. Use when creating or reviewing JPA (Java Persistence API) entities, diagnosing…

Kotlin/kotlin-agent-skills · 104 tokens

spring-data-neo4j

Provides Spring Data Neo4j integration patterns for Spring Boot applications. Use when you need to work with a graph database, Neo4j nodes and relationships, Cypher queries, or Spring Data Neo4j. Creates node entities with @Node annotation, defines relationships with @Relationship, writes Cypher queries using @Query…

giuseppe-trisciuoglio/developer-kit · 94 tokens

spring-boot-crud-patterns

Provides and generates complete CRUD workflows for Spring Boot 3 services. Creates feature-focused architecture with Spring Data JPA aggregates, repositories, DTOs, controllers, and REST APIs. Validates domain invariants and transaction boundaries. Use when modeling Java backend services, REST API endpoints, database…

giuseppe-trisciuoglio/developer-kit · 79 tokens

nestjs-best-practices

Provides comprehensive NestJS best practices including modular architecture, dependency injection scoping, exception filters, DTO validation with class-validator, and Drizzle ORM integration. Use when designing NestJS modules, implementing providers, creating exception filters, validating DTOs, or integrating Drizzle…

giuseppe-trisciuoglio/developer-kit · 64 tokens