laravel-eloquent

laravel-eloquent is a skill for Claude Code from fusengine/agents. It costs 33 tokens per session (2,029 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 Code

Written for Claude Code: user-invocable in frontmatter.

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

Good fit Use it to create or update database models, define relationships, write queries, configure model fields, observe changes, and generate test or sample data.

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

Made for: Claude Code.

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/github.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/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/fusengine/agents/laravel-eloquent"><img src="https://agentmods.dev/badge/skills/fusengine/agents/laravel-eloquent.svg" alt="Reviewed on agentmods" width="80" 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 2,029 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
  • 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.00033 $0.02029
Opus 5.5 $0.00013 $0.00812
Sonnet 5.5 $0.00007 $0.00406
Haiku 4.5 $0.00003 $0.00203

Measured 22d ago against content hash f4be0b9219f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 22d 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.

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

How it starts

The opening of the file, as written. The whole thing — 178 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], #[Table], #[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 no attribute — casts() method protected $casts
Appends #[Appends([...])] protected $appends
Touches #[Touches([...])] protected $touches
Connection #[Connection('mysql')] protected $connection
Primary key #[Table(key: 'uuid', keyType: 'string', incrementing: false)] $primaryKey / $keyType / $incrementing
Timestamps off #[WithoutTimestamps] public $timestamps = false
Refresh after write (13.33+) #[Refreshes(['slug'])] —

Read the full file on GitHub · 178 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. 22d ago Changed · +18 lines f4be0b9219f6
  2. 1mo ago Changed 1dbd34244490
  3. 1mo ago 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 (33 stars, last pushed 8d ago), licensed MIT. It adds 33 tokens to every session and 2,029 once invoked, about $0.0001 per session on Opus 5.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

tiledbvcf

Stores and retrieves genomic variant calls with TileDB-VCF. Use for indexed single-sample VCF/BCF ingestion, incremental cohorts, region and sample queries, streaming results, allele statistics, QC, and VCF/BCF export locally or through TileDB Cloud.

K-Dense-AI/scientific-agent-skills · 62 tokens

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