frontend-patterns
Skill10 starsChanged 4 months agoMITView on GitHub
Use when building Livewire/Blade/Alpine UI in a Laravel app — component composition, state placement, performance, forms, and loading/empty/error states.
46 other projects use a version of this.
Adopted by
Most recently taken up by
- templetongroup/radianttheir own version, first seen Sep 17, 2026
- themusecatcher/ai-coding-kittheir own version, first seen Sep 15, 2026
- venables/skillstheir own version, first seen Sep 12, 2026
- talayash/agentriumtheir own version, first seen Sep 11, 2026
- KbWen/agentic-ostheir own version, first seen Sep 10, 2026
- best-radar/bradar-everything-claude-codetheir own version, first seen Sep 6, 2026
Used with
Projects with it also use kotlin-testing, configure-ecc and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
tpavanipradeepSkillkotlin-testing
Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.
Also in 6 projects that use this
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 12 projects that use this
mryeastcodeSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 5 projects that use this
InfopibeSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 11 projects that use this
InfopibeSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 9 projects that use this
WorldFlowAISkillproject-guidelines-example
Also in 18 projects that use this
- +3 more from Infopibe
Other versions46 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 46
- WorldFlowAI/everything-claude-code★ 4ksame name
- xu-xiang/everything-claude-code-zh★ 2ksame name
- bybren-llc/safe-agentic-workflow★ 419same name
- loulanyue/awesome-claude-notes★ 272same name
- KbWen/agentic-os★ 206same name
- cloudnative-co/claude-code-starter-kit★ 151same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- hellangleZ/burn-in-cceverywhere-ralph★ 112same name
- Jamkris/everything-gemini-code★ 87same name
36 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository62 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-problemSkill
- api-reviewSkill
- article-writingSkill
- assignment-compliance-checkSkill
- automation-audit-opsSkill
- autonomous-loopsSkill
- benchmark-optimization-loopSkill
- benchmarkSkill
- blueprintSkill
- class-refactoringSkill
- cleanup-local-branchesSkill
- codebase-simplification-auditSkill
- code-review-bugsnagSkill
- code-review-githubSkill
- code-review-jiraSkill
- code-reviewSkill
- composer-updateSkill
- create-issues-from-textSkill
- create-issueSkill
- create-missing-tests-in-prSkill
- create-testSkill
- design-systemSkill
- docker-patternsSkill
- e2e-testingSkill
- frontend-a11ySkill
- frontend-design-directionSkill
- frontend-slidesSkill
- git-workflowSkill
- laravel-authorization-reviewSkill
- laravel-securitySkill
- laravel-telescopeSkill
- latency-critical-systemsSkill
- merge-github-prSkill
- mysql-patternsSkill
- mysql-problem-solverSkill
- penetration-testerSkill
- postgres-patternsSkill
- prepare-issue-contextSkill
- process-code-reviewSkill
- product-capabilitySkill
- production-auditSkill
- pr-staged-merge-planSkill
- pr-summarySkill
- record-project-memorySkill
- redis-patternsSkill
- refactor-entry-point-to-actionSkill
- refresh-claude-mdSkill
- resolve-issueSkill
- rewrite-tests-pestSkill
- security-bounty-hunterSkill
- security-reviewSkill
- security-threat-analysisSkill
- seoSkill
- skill-creatorSkill
- slack-messagingSkill
- smartest-project-additionSkill
- test-driven-developmentSkill
- tester-cookbookSkill
- test-like-humanSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 59
Always set :key on nested components and loop items so Livewire tracks identity across re-renders.
- Distinctive: line 65
Put state where it belongs.
- Distinctive: line 115
Prefer Livewire form objects to keep components slim and validation reusable.
- Very specific: line 142
Keep messages()/attributes() free of identity-revealing detail per @rules/security/frontend.md.
- Distinctive: line 185
Keep Alpine logic small and inline.
- Very specific: line 192
Every loop and nested component has a stable wire:key/:key.
- Distinctive: line 197
No React/Vue artifacts; business logic stays in Actions/Services, not the component.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Constraints
- Apply
@rules/laravel/livewire.mdc— class inapp/Livewire, view inresources/views/livewire, extendLivewire\Component; components are slim entry points; delegate business logic to Actions/Services; inject dependencies viaboot(), 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.
@foreach ($rows as $row)
<livewire:row-editor :row="$row" :key="$row->id" />
@endforeachAlways set :key on nested components and loop items so Livewire tracks identity across re-renders.
State placement: Livewire vs Alpine
Put state where it belongs. The wrong choice causes either chattiness or lost server state.
- Livewire public properties — server-authoritative data, anything persisted or validated, anything other components react to.
- Livewire computed properties (
#[Computed]) — derived values from properties/DB; cached per request, keeps the view clean. - Alpine
x-data— purely local UI state that the server never needs: dropdown open/closed, active tab, hover, optimistic toggles.
{{-- local-only: no server round-trip --}}
<div x-data="{ open: false }">
<button x-on:click="open = !open">Menu</button>
<nav x-show="open" x-cloak>…</nav>
</div>// derived server state
#[Computed]
public function total(): int
{
return $this->items->sum('price');
}Rule of thumb: if toggling it should hit the database or affect validation, it is Livewire; if it is ephemeral chrome, it is Alpine. Bridge the two with @entangle only when both sides genuinely need the value.
Performance
wire:keyin loops — mandatory; without it Livewire mis-reconciles DOM and loses focus/state.- Tune
wire:model— default is deferred (syncs on action). Use.liveonly when the server must react to every keystroke; prefer.bluror.debounce.500msfor inputs to cut requests.
<input type="search" wire:model.live.debounce.400ms="search">- Lazy / deferred loading — render expensive components after first paint with
<livewire:report lazy />, or#[Lazy]on the class, to keep the initial response fast. - Pagination — use
WithPagination; never load full tables into a property. - Avoid N+1 in views — eager-load relations in the query before passing to Blade; cross-reference
@rules/sql/optimalize.mdc. A relation accessed inside a@foreachwithout eager loading fires one query per row.
$this->orders = Order::with('customer')->latest()->paginate(20);- Asset stacks — register component CSS/JS once with
@once+@push('scripts')so repeated components don't duplicate output.
Forms
Prefer Livewire form objects to keep components slim and validation reusable.
// app/Livewire/Forms/MarketForm.php
class MarketForm extends Form
{
#[Validate('required|string|max:200')]
public string $name = '';
#[Validate('required|string')]
public string $description = '';
}// component
public MarketForm $form;
public function save(CreateMarket $action): void // Action injected via boot() or method DI
{
$this->validate();
$action->handle($this->form->toArray());
$this->reset('form');
}- Real-time validation —
wire:model.blurplus anupdated()hook (or per-field$this->validateOnly($field)) validates as the user leaves each field without validating the whole form on every key. - Keep
messages()/attributes()free of identity-revealing detail per@rules/security/frontend.md. - For admin CRUD, prefer Filament forms over hand-built ones.
Loading, empty, error, offline states
Design all four states, not just the happy path.
{{-- loading --}}
<button wire:click="save" wire:loading.attr="disabled" wire:target="save">
<span wire:loading.remove wire:target="save">Save</span>
<span wire:loading wire:target="save">Saving…</span>
</button>
{{-- empty --}}
@forelse ($orders as $order)
<livewire:order-row :order="$order" :key="$order->id" />
@empty
<x-empty-state title="No orders yet" />
@endforelse
{{-- offline --}}
<div wire:offline class="banner-warning">You are offline — changes will retry.</div>- Errors — surface failures with
session()->flash()+ arole="alert"region, or a validation message; never swallow exceptions in the component. Delegate the actual work to an Action that can throw, and catch only to present a safe message. - Skeletons — show
wire:loadingplaceholders for lazy/deferred components so layout doesn't jump.
Progressive enhancement with Alpine
Render meaningful HTML server-side first; layer Alpine for interactivity so the page is useful before JS runs and degrades gracefully if it doesn't.
<details x-data x-bind:open="open"> {{-- works without JS via native <details>; Alpine enhances --}}
<summary>Filters</summary>
…
</details>Keep Alpine logic small and inline; if it grows beyond a few expressions, move the state into a Livewire component.
Done when
- Components are composed from slots/attributes; no oversized configurable mega-components.
- State sits on the correct layer (Livewire for server/validated, Alpine for local chrome).
- Every loop and nested component has a stable
wire:key/:key. wire:modelstrategy minimizes requests; no.livewhere.blur/.debouncesuffices.- Lists eager-load relations — no N+1 in Blade.
- Forms use form objects + validation; admin CRUD reuses Filament.
- Loading, empty, error, and offline states are all handled.
- No React/Vue artifacts; business logic stays in Actions/Services, not the component.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

