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 agentmods add rules/pekral/cursor-rules/livewiregit clone --depth 1 https://github.com/pekral/cursor-rulesWhat 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 | $0.00000 | $0.02459 |
| Opus 5 | $0.00000 | $0.01229 |
| Sonnet 5 | $0.00000 | $0.00492 |
| Haiku 4.5 | $0.00000 | $0.00246 |
Grade A, and why
livewire 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 — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Component Structure
- Never use single-file Volt components unless the repository explicitly uses them already.
- Every Livewire component must be split into:
- a PHP class in
app/Livewire - a Blade view in
resources/views/livewire
- a PHP class in
- Component classes must extend
Livewire\\Component.
Responsibilities
- Livewire components are entry points.
- Keep component classes slim: accept input, validate, delegate work, update UI state.
- Do not place business logic directly in Livewire components.
- Delegate business logic to Actions or Services according to project architecture.
- Do not execute direct Eloquent queries or
DB::calls in components unless the repository already uses that pattern consistently.
Dependency Injection
- Livewire does not support constructor injection — it creates components without DI.
- Use the
boot()lifecycle hook to inject service dependencies. - Never pass service dependencies as method parameters.
Validation and UI
- Use Livewire's built-in validation where appropriate.
- Reuse validation traits from
App\\Concernswhen available. - Keep lifecycle hooks (
mount,updated*,dehydrate) slim. - Keep Blade templates presentation-only.
- Prefer Livewire events/listeners over tight component coupling.
- Use
wire:modelfor form bindings unless there is a clear reason not to. - Keep UI strings in the language expected by the repository.
HTML / Blade Layout Splitting
Every Livewire/Blade view must be analyzed as a tree of UI concerns and split into the smallest set of reusable components that still makes the view readable. The goal is reusability and single-responsibility per view file — not maximum component count.
Component-type decision (Livewire vs Blade)
Before extracting anything, pick the right component type. Picking wrong is a code-review finding on its own:
- Livewire component (
app/Livewire/...+resources/views/livewire/...) — extract only when the piece of UI has its own state, lifecycle, or server interaction: holdswire:modelform state independent of the parent, ownsmount()data loading, exposeswire:click/wire:submithandlers that must hit the server, emits or listens to Livewire events, or carries#[Computed]/updated*lifecycle behavior. - Blade component (
resources/views/components/...orx-...anonymous) — extract whenever the piece is stateless presentation (data in via attributes / slots, no server round-trip, no Livewire lifecycle). Buttons, cards, badges, headings, layout shells, empty-state messages, icon wrappers, and dumb table rows belong here. - Never wrap a stateless presentational block in a Livewire component just to enable reuse — the Livewire wrapper adds a payload, a roundtrip, and a lifecycle the block does not need. Use a Blade component instead. The "split into Livewire components" mandate in this section means split into the correct component type; Livewire components are reserved for the stateful subset above.
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 First seen · 92 lines · 0 tokens per session scan A b0175c6f3e7d
livewire is a cursor rule published in the GitHub repository pekral/cursor-rules (6 stars, last pushed 7d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,459 tokens. 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 cursor rules, from other repositories
owl-admin
🎈 Owl Admin : 基于 laravel 和 amis 开发的后台框架, 友好的组件使用体验, 可轻松实现复杂页面, 内置代码生成器, 让开发者快速搭建后台管理系统.
16-wechat-sdk
微信 SDK 接入规范(EasyWeChat / WechatManager).
15-config-center
动态配置中心读取规范(ConfigCenter / configcenter).
lean
Answer densely. Cut filler, keep all technical signal.
00-project
基于 Laravel + Blade + Vue3 + Element Plus 的轻量级后台管理系统.
99-guard
Cursor rule "99-guard" from neoshopcn/neo-admin, covering 🔒 protected directories(禁止修改), ⚠️ conditional(仅在明确要求时允许) and 🚫 dangerous operations(禁止主动执行).