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.
npx skills add Foysal50x/skills --skill laravel-patternsgit clone --depth 1 https://github.com/Foysal50x/skillsWrote 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.
[](https://agentmods.dev/skills/foysal50x/skills/laravel-patterns)<a href="https://agentmods.dev/skills/foysal50x/skills/laravel-patterns"><img src="https://agentmods.dev/badge/skills/foysal50x/skills/laravel-patterns/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.
<a href="https://agentmods.dev/skills/foysal50x/skills/laravel-patterns"><img src="https://agentmods.dev/badge/skills/foysal50x/skills/laravel-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00095 | $0.03306 |
| Opus 5 | $0.00048 | $0.01653 |
| Sonnet 5 | $0.00019 | $0.00661 |
| Haiku 4.5 | $0.00010 | $0.00331 |
Grade A, and why
laravel-patterns 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 252 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Laravel Patterns
Placement rules for domain-driven Laravel applications: Action, Service, Repository, Query Class, Value Object. 63 rules across 9 sections.
Core philosophy: practicality over purity. Never take a greedy decision.
- Eloquent is already a good abstraction for most data access.
- A Repository over Eloquent does not fully decouple you from Eloquent. That is acceptable and expected — do not chase purity.
- Both extremes are bugs: a layer for every model (dead boilerplate) and none at all (queries scattered everywhere).
- A Query Class is the internal implementation technique of a Repository, not a competing pattern.
- Value Objects keep signatures clean and carry pure behavior. They never touch a
Builder. - Domains are bounded contexts. One domain never imports another's internals.
When to Apply
Reference these rules when:
- Creating any class under
app/Domain/ - Deciding between a Service, a Repository and inline code
- Reviewing a pull request that adds a layer
- Refactoring queries scattered across Actions, Services or Blade
- Splitting a monolithic
app/into bounded contexts - Wiring one domain to another
Start Here
Run the Decision Gate before writing any class: references/decision-gate.md.
Default answer: keep it in the Action, use Eloquent directly.
Q1. Single end-to-end use case? → ACTION
Q2. Called by 2+ Actions, or worth isolating? → SERVICE
Q3. Used in only one Action? → KEEP IT IN THE ACTION
Q4. Single-record CRUD (find / create /
update / delete)? → ELOQUENT DIRECTLY
(from an Action or Repository)
Q5. Backend may swap, OR the query earns a
name and its own tests? → REPOSITORY (+ Query Classes)
Q6. Two real implementations, a concrete
backend swap, or a host extension point? → INTERFACE
(otherwise one concrete class)
Q7. Callers pick one by a config or
request key? → FACTORY / REGISTRY
What ships with it
60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- AGENTS.md 96 KB
- examples/orders-domain/Actions/PlaceOrderAction.php 1.2 KB
- examples/orders-domain/Contracts/OrderRepositoryInterface.php 839 B
- examples/orders-domain/Filters/OrderQueryFilter.php 645 B
- examples/orders-domain/Http/OrderIndexController.php 680 B
- examples/orders-domain/Http/SearchOrdersRequest.php 2.3 KB
- examples/orders-domain/Http/StoreOrderRequest.php 1.0 KB
- examples/orders-domain/Queries/ExpireAbandonedOrdersQuery.php 759 B
- examples/orders-domain/Queries/SearchOrdersQuery.php 2.4 KB
- examples/orders-domain/README.md 2.0 KB
- examples/orders-domain/Repositories/EloquentOrderRepository.php 1.8 KB
- examples/orders-domain/Support/DateRange.php 1.3 KB
- examples/orders-domain/Support/Direction.php 278 B
- examples/orders-domain/Support/Sorting.php 1.6 KB
- metadata.json 816 B
- README.md 812 B
- references/anti-patterns.md 3.9 KB
- references/decision-gate.md 4.5 KB
- references/directory-layout.md 4.1 KB
- references/inter-domain-decision-guide.md 2.3 KB
- references/pre-completion-checklist.md 4.4 KB
- rules/_sections.md 2.4 KB
- rules/_template.md 431 B
- rules/action-keep-single-use-logic-inline.md 1.4 KB
- rules/action-maps-request-to-value-objects.md 1.5 KB
- rules/action-naming-verb-noun.md 1.1 KB
- rules/action-not-a-pass-through.md 2.1 KB
- rules/action-one-use-case-end-to-end.md 1.8 KB
- rules/config-cache-in-production.md 1.3 KB
- rules/config-never-env-outside-config.md 1.2 KB
- rules/config-per-environment-overrides.md 1.5 KB
- rules/config-secrets-in-env-structure-in-config.md 1.6 KB
- rules/config-select-deployable-variation.md 2.3 KB
- rules/domain-anti-corruption-layer.md 2.2 KB
- rules/domain-events-for-reactions.md 2.0 KB
- rules/domain-no-cross-domain-models.md 2.2 KB
- rules/domain-open-host-service-for-sync.md 1.9 KB
- rules/domain-public-vs-private-surface.md 1.7 KB
- rules/domain-shared-kernel-concepts-only.md 1.5 KB
- rules/gate-action-for-use-case.md 1.9 KB
- rules/gate-earn-extension-seam.md 2.1 KB
- rules/gate-eloquent-directly-by-default.md 1.9 KB
- rules/gate-opt-in-capability-contract.md 2.2 KB
- rules/gate-query-class-and-repository-together.md 1.9 KB
- rules/gate-reads-go-through-a-named-query.md 2.4 KB
- rules/gate-repository-earns-its-name.md 1.6 KB
- rules/gate-run-decision-gate-first.md 2.3 KB
- rules/gate-service-only-when-reused.md 1.3 KB
- rules/layout-contracts-vs-support.md 1.4 KB
- rules/layout-domain-first-structure.md 1.6 KB
- rules/layout-no-top-level-service-repository-query.md 1.1 KB
- rules/layout-optional-folders-are-deliberate.md 1.3 KB
- rules/layout-scope-based-co-location.md 1.4 KB
- rules/layout-shared-module-owns-mechanism.md 2.4 KB
- rules/query-can-write.md 1.6 KB
- rules/query-compose-query-classes.md 1.7 KB
- rules/query-final-readonly-no-base-class.md 1.3 KB
- rules/query-internal-to-repositories.md 1.4 KB
- rules/query-name-the-business-question.md 1.2 KB
- rules/query-owns-all-query-construction.md 1.6 KB
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.
- yesterday Changed · +1 lines 96909f4261a2
- 10d ago First seen · 251 lines · 95 tokens per session scan A e88953ea8564
laravel-patterns is a skill published in the GitHub repository Foysal50x/skills (9 stars, last pushed 2d ago), licensed MIT. It adds 95 tokens to every session and 3,306 once invoked, about $0.0005 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.
Other skills, from other repositories
moonshine-resources-v3
Use when creating ModelResource, configuring CRUD operations, working with tables/forms/detail pages, adding filters, search, pagination, events, buttons, query modification, import/export, or metrics in MoonShine v3.
moonshine-advanced-v3
Use when working with custom controllers, handlers, routes, type casts, notifications, testing, package development, CrudResource (non-Eloquent), artisan commands, or practical recipe patterns in MoonShine v3.
moonshine-frontend-v3
Use when working with MoonShine v3 as an API backend, JWT auth for API, SDUI (Server-Driven UI), Alpine.js events, JavaScript helpers, reactive fields, or async UI updates.
new
Create a new project to start development quickly.
channel-manager
Configure IM platform channels (Feishu, WeCom, Weixin, Discord, Telegram, DingTalk) for openclacky. Uses browser automation for navigation; guides the user to paste credentials and perform UI steps. Trigger on: "channel setup", "setup feishu", "setup wecom", "setup weixin", "setup wechat", "setup discord", "setup…
yida-data-management
A tool for querying, adding, and updating Yida form records, child tables, process records, and task-center data. It keeps ordinary forms and approval workflows on their separate data interfaces.