laravel-eloquent

laravel-eloquent is a skill for Claude Code, Codex from fusengine/agents. It costs 33 tokens per session (1,835 once invoked), scanned A, original, MIT.

A guide to Eloquent, Laravel's object-relational mapper for working with database records as PHP models. It covers model attributes, relationships, queries, observers, factories, and seeders.

In plain words
What is it for?
Use it to create or update database models, define relationships, write queries, configure model fields, observe changes, and generate test or sample data.
Why use it?
It gives the agent a consistent way to model data and avoid mixing old and new Laravel configuration styles.

Skill for Claude CodeCodex

Part of the fuse-laravel plugin — 23 skills, 1 agent shipped together

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.

agentmods
npx agentmods add skills/fusengine/agents/laravel-eloquent
Any agent
npx skills add fusengine/agents --skill laravel-eloquent
Clone the repo
git clone --depth 1 https://github.com/fusengine/agents

Made for: Claude Code, Codex.

Or install fuse-laravel, the plugin that ships this one along with the rest of its 23 skills, 1 agent.

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/fusengine/agents/laravel-eloquent.svg)](https://agentmods.dev/skills/fusengine/agents/laravel-eloquent)
Your own site
<a href="https://agentmods.dev/skills/fusengine/agents/laravel-eloquent"><img src="https://agentmods.dev/badge/skills/fusengine/agents/laravel-eloquent.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,835 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00033 $0.01835
Opus 5 $0.00016 $0.00918
Sonnet 5 $0.00007 $0.00367
Haiku 4.5 $0.00003 $0.00184

Measured today against content hash 1dbd34244490, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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.

plugins/laravel-expert/skills/laravel-eloquent/SKILL.md · 160 lines

How it starts

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

Laravel Eloquent ORM (L13 — Attributes-first)

Agent Workflow (MANDATORY)

Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:

  1. fuse-ai-pilot:explore-codebase - Inspect existing models, mixed property/attribute usage
  2. fuse-ai-pilot:research-expert - Verify Laravel 13 Eloquent + Attributes docs via Context7
  3. mcp__context7__query-docs - Query attribute patterns (#[Fillable], #[Casts], #[Scope])

After implementation, run fuse-ai-pilot:sniper for validation.


Overview

Laravel 13 promotes PHP 8.3 Attributes as the primary metadata mechanism on Eloquent models. Legacy properties ($fillable, $hidden, ...) remain supported for backward compatibility but should not be mixed with their attribute counterparts.

Feature Attribute (L13 MAIN) Legacy property
Table name #[Table('users')] protected $table
Mass assignment #[Fillable([...])] protected $fillable
Hidden / Visible #[Hidden([...])] / #[Visible([...])] protected $hidden / $visible
Guarded #[Guarded([...])] / #[Unguarded] protected $guarded
Casts #[Casts([...])] casts() method
Appends #[Appends([...])] protected $appends
Touches #[Touches([...])] protected $touches
Connection #[Connection('mysql')] protected $connection

Read the full file on GitHub · 160 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. today Changed 1dbd34244490
  2. yesterday First seen · 160 lines · 33 tokens per session scan A 9b42bbf342f7

Subscribe to this mod's changes

laravel-eloquent is a skill published in the GitHub repository fusengine/agents (25 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 1,835 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-09-03.

Related

Other skills, from other repositories

phoenix-contexts

Phoenix context design — creating/splitting contexts, Scope (1.8+), Ecto.Multi, PubSub, routers, plugs, controllers. Use when editing contexts, routers, or designing boundaries.

oliver-kriska/claude-elixir-phoenix · 46 tokens

ecto-n1-check

Detect N+1 query anti-patterns specifically — Repo calls inside Enum/for loops, missing preloads on associations. Use when N+1 is explicitly suspected, NOT for unrelated Ecto questions or wider database performance.

oliver-kriska/claude-elixir-phoenix · 49 tokens

constraint-debug

Compatibility alias for the Elixir/Phoenix plugin's Ecto constraint debugger. Invoke explicitly with /ecto:constraint-debug.

oliver-kriska/claude-elixir-phoenix · 28 tokens

n1-check

Compatibility alias for the Elixir/Phoenix plugin's N+1 query checker. Invoke explicitly with /ecto:n1-check.

oliver-kriska/claude-elixir-phoenix · 30 tokens

ts-db-perf

Optimize TypeScript code that interacts with databases. Use this skill when the user wants to fix N+1 queries, add caching, improve transaction safety, prevent race conditions, simplify async flows, or generally speed up a TypeScript backend. Triggers on phrases like "optimize", "slow query", "N+1", "race condition"…

widnyana/eyay-toolkits · 107 tokens

backend-engineer

Use when designing APIs, working with databases, building microservices, handling authentication and authorisation, optimising server performance, designing data models, or any task involving server-side logic, infrastructure, or system architecture.

pranav8494/team-of-agents · 46 tokens