frontend-patterns

frontend-patterns is a skill for Claude Code, Codex from pekral/cursor-rules. It costs 37 tokens per session (1,841 once invoked), scanned A, original, MIT.

A set of guidelines for building user interfaces in Laravel using Blade templates, Livewire components, Alpine.js, Filament, and Tailwind CSS. It covers component structure, state, forms, and loading, empty, error, and offline screens.

In plain words
What is it for?
Use it when composing Laravel screens, deciding where interface state belongs, building validated forms, and reducing unnecessary Livewire rendering or network work.
Why use it?
It helps keep interface code organized and avoids using patterns from unrelated frameworks such as React or Vue. It also points business logic and database work to the appropriate application layers.

Skill for Claude CodeCodex

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

Good fit Use it when composing Laravel screens, deciding where interface state belongs, building validated forms, and reducing unnecessary Livewire rendering or network work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pekral/cursor-rules/frontend-patterns
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 pekral/cursor-rules --skill frontend-patterns
Clone the repo
git clone --depth 1 https://github.com/pekral/cursor-rules

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 frontend-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/pekral/cursor-rules/frontend-patterns/github.svg)](https://agentmods.dev/skills/pekral/cursor-rules/frontend-patterns)
Your own site
<a href="https://agentmods.dev/skills/pekral/cursor-rules/frontend-patterns"><img src="https://agentmods.dev/badge/skills/pekral/cursor-rules/frontend-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.

agentmods 80×15 button for frontend-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/pekral/cursor-rules/frontend-patterns"><img src="https://agentmods.dev/badge/skills/pekral/cursor-rules/frontend-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,841 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.00037 $0.01841
Opus 5.5 $0.00015 $0.00736
Sonnet 5.5 $0.00007 $0.00368
Haiku 4.5 $0.00004 $0.00184

Measured 1mo ago against content hash 19db4222c9cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

frontend-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 1mo 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.

skills/frontend-patterns/SKILL.md · 198 lines

How it starts

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

Constraints

  • Apply @rules/laravel/livewire.mdc — class in app/Livewire, view in resources/views/livewire, extend Livewire\Component; components are slim entry points; delegate business logic to Actions/Services; inject dependencies via boot(), never as method params; Blade stays presentation-only.
  • Apply @rules/laravel/filament.mdc — prefer Filament form/table components for admin UIs; custom Blade+Tailwind needs a registered theme.
  • Apply @rules/laravel/architecture.mdc — keep query/business logic out of views and components.
  • Apply @rules/sql/optimalize.mdc — eager-load to avoid N+1 in loops rendered by Blade.
  • Stack is Blade + Livewire + Alpine.js + Filament + Tailwind. No React/Vue/Next — never output useState/useEffect/useMemo/JSX/Framer Motion/React Query.

Use when

  • Composing UI from Blade/Livewire components.
  • Deciding where state lives (Livewire vs Alpine).
  • Optimizing render/network cost of a Livewire view.
  • Building forms with validation.
  • Handling loading, empty, error, and offline states.

Component composition

Compose; do not inherit. Prefer small components with slots over big configurable ones.

{{-- resources/views/components/card.blade.php (anonymous component) --}}
@props(['variant' => 'default'])
<div {{ $attributes->class(['card', 'card-outlined' => $variant === 'outlined']) }}>
    {{ $slot }}
</div>
<x-card variant="outlined">
    <x-slot:header>Title</x-slot:header>
    Content
</x-card>
  • Anonymous components (view-only, in resources/views/components) for pure presentation.
  • Class components (app/View/Components) only when the component needs PHP logic to prepare data.
  • {{ $attributes }} forwards caller classes/attributes — merge, don't overwrite.
  • Named slots (<x-slot:header>) replace prop-drilling content.

Livewire nesting

A "compound" UI is a parent Livewire component holding child Livewire components. Children are independent; pass data down via props and communicate up via events/listeners — never tight coupling.

Read the full file on GitHub · 198 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. 1mo ago First seen · 198 lines · 37 tokens per session scan A 19db4222c9cd

Subscribe to this mod's changes

frontend-patterns is a skill published in the GitHub repository pekral/cursor-rules (11 stars, last pushed 19d ago), licensed MIT. It adds 37 tokens to every session and 1,841 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-08-31.

Related

Other skills, from other repositories

create-powergrid-plugin

Create a complete PowerGrid plugin from scratch, including PHP class, Column macro, Blade view, Alpine.js component, and registration.

Power-Components/livewire-powergrid · 31 tokens

laravel

Use when building or extending a Laravel 11/12 app — Eloquent models, migrations and relationships, routing with controllers and Form Requests, queues and background jobs, framework-native security (validation, mass-assignment, policies, signed URLs, rate limiting), and Pest/PHPUnit feature tests. NOT pure PHP…

ericrisco/rsc-harness · 76 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

owl-admin-frontend-assets

A development guide for the browser-side files and published assets used by Owl Admin, a Laravel-based administration system. It covers admin views, themes, layouts, React work, and asset publishing.

slowlyo/owl-admin · 80 tokens

owl-admin-ops-commands

Use this skill for Owl Admin installation, publishing assets, upgrades, diagnostics, database inspection, menu maintenance, user creation, password reset, route generation, IDE helper, admin:publish, admin:install, admin:update, admin:doctor, admin:db, admin:menu, admin:create-user, or deployment troubleshooting.

slowlyo/owl-admin · 71 tokens

owl-admin-extension-module

A development guide for Owl Admin extensions and modules. An extension adds optional functionality, while a module groups related routes, settings, menus, and permissions.

slowlyo/owl-admin · 75 tokens