pulse-development
Automates the setup, dashboard configuration, and custom card development for Laravel Pulse.
Install
mkdir -p .claude/skills/pulse-development && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10654" && unzip -o skill.zip -d .claude/skills/pulse-development && rm skill.zipInstalls to .claude/skills/pulse-development
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Handles Laravel Pulse setup, configuration, and custom card development. Activates when installing Pulse; configuring the dashboard or authorization gate; setting up recorders and filtering; building custom Livewire cards; optimizing with Redis ingest or sampling; or when the user mentions /pulse, pulse:check, pulse:work, Pulse::record(), or application monitoring.Key capabilities
- →Install Laravel Pulse
- →Configure dashboard authorization
- →Manage recorder thresholds
- →Build custom Livewire cards
- →Optimize with Redis ingest
How it works
Pulse records application events into the database or Redis, which are then aggregated and displayed on a Livewire-based dashboard.
Inputs & outputs
When to use pulse-development
- →Install Laravel Pulse
- →Configure dashboard authorization
- →Create a custom Pulse card
- →Optimize Pulse recorders
About this skill
Laravel Pulse Development
Documentation
Use search-docs for detailed Laravel Pulse patterns and documentation, including card layout customization, user resolver configuration, all recorder options, sampling, dedicated database connections, Vite/CSS integration, Tailwind scoping, blade card components, and lazy loading.
Installation
Pulse stores data in your application's database. The current package supports MySQL, MariaDB, PostgreSQL, and SQLite.
composer require laravel/pulse
vendor/bin/sail artisan vendor:publish --provider="Laravel\Pulse\PulseServiceProvider"
vendor/bin/sail artisan migrate
The dashboard is available at /pulse.
Dashboard Authorization
Define the viewPulse gate in AppServiceProvider::boot() to enable production access:
use App\Models\User;
use Illuminate\Support\Facades\Gate;
Gate::define('viewPulse', function (User $user) {
return $user->isAdmin();
});
Without this gate, the dashboard is inaccessible in all non-local environments.
Recorders
All 10 built-in recorders are configurable in config/pulse.php:
| Recorder | Key Config Options |
|---|---|
CacheInteractions | sample_rate, ignore, groups (regex find/replace) |
Exceptions | sample_rate, ignore, location |
Queues | sample_rate, ignore |
SlowJobs | threshold (ms, per-job regex map), sample_rate, ignore |
SlowOutgoingRequests | threshold (ms, per-URL regex map), sample_rate, ignore, groups |
SlowQueries | threshold (ms, per-query regex map), sample_rate, ignore, location |
SlowRequests | threshold (ms, per-route regex map), sample_rate, ignore |
Servers | PULSE_SERVER_NAME env var, monitored disk paths |
UserJobs | sample_rate, ignore |
UserRequests | sample_rate, ignore |
Per-route and per-job threshold overrides use a regex-keyed map with a default fallback:
Recorders\SlowRequests::class => [
'threshold' => [
'#^/api/reports#' => 5000,
'default' => env('PULSE_SLOW_REQUESTS_THRESHOLD', 1000),
],
],
The Servers recorder requires pulse:check running as a persistent daemon (Supervisor recommended).
Filtering Entries
Use Pulse::filter() in AppServiceProvider::boot() to exclude entries globally. Return true to record, false to skip:
use Laravel\Pulse\Entry;
use Laravel\Pulse\Facades\Pulse;
use Laravel\Pulse\Value;
use Illuminate\Support\Facades\Auth;
Pulse::filter(function (Entry|Value $entry) {
return Auth::user()?->isNotAdmin() ?? true;
});
Performance
Redis Ingest
Offload entry writes from the request cycle to a Redis stream (requires Redis 6.2+ and phpredis or predis):
PULSE_INGEST_DRIVER=redis
PULSE_REDIS_CONNECTION=pulse
Run a worker to drain the Redis stream into the database:
vendor/bin/sail artisan pulse:work
Signal a graceful restart during deployment (requires a working cache driver):
vendor/bin/sail artisan pulse:restart
Custom Cards
Custom cards are Livewire components extending Pulse's base Card class.
Recording Entries
Call Pulse::record() from a recorder, listener, or observer. Chain aggregation methods (avg, count, max, min, sum) in a single call:
use Laravel\Pulse\Facades\Pulse;
Pulse::record('user_sale', $user->id, $sale->amount)
->sum()
->count();
When the entry is tied to the authenticated user, use Pulse::resolveAuthenticatedUserId() instead of Auth::id() to respect custom user resolvers.
Card Component
<!-- Custom Pulse Card -->namespace App\Livewire\Pulse;
use Laravel\Pulse\Facades\Pulse;
use Laravel\Pulse\Livewire\Card;
use Livewire\Attributes\Lazy;
#[Lazy]
class TopSellers extends Card
{
public function render(): \Illuminate\View\View
{
$aggregates = $this->aggregate('user_sale', ['sum', 'count']);
$users = Pulse::resolveUsers($aggregates->pluck('key'));
return view('livewire.pulse.top-sellers', [
'sellers' => $aggregates->map(fn ($row) => (object) [
'user' => $users->find($row->key),
'sum' => $row->sum,
'count' => $row->count,
]),
]);
}
}
$this->aggregate(type, aggregates) returns a Collection of stdClass objects with key and one property per aggregation method. $this->aggregateTotal(type, aggregate) returns a single scalar.
Custom Recorders
A recorder is a plain class with a $listen array of Laravel events:
class SaleRecorder
{
public array $listen = [
\App\Events\SaleCompleted::class,
];
public function record(\App\Events\SaleCompleted $event): void
{
\Laravel\Pulse\Facades\Pulse::record('user_sale', $event->user->id, $event->sale->amount)
->sum()
->count();
}
}
Register the recorder in the recorders array in config/pulse.php.
Verification
- Run migrations and confirm
/pulseis accessible in local - Define
viewPulsegate and verify production access - Confirm
pulse:checkis running for the Servers card - If using Redis ingest, confirm
pulse:workis running
Common Pitfalls
- An empty dashboard or database errors usually mean the Pulse tables have not been published and migrated yet.
- The dashboard is local-only by default. Define the
viewPulsegate to enable production access. - The Servers card shows no data unless
pulse:checkruns as a persistent process. Supervisor is recommended. - Redis ingest silently queues data. The dashboard appears empty if
pulse:workis not running. pulse:restartrequires a working cache driver. Without it, the signal is never received.- Pulse exceptions fail silently. Use
Pulse::handleExceptionsUsing()to surface errors during development. - Multiple
Authenticatablemodels can cause incorrect user tracking. UsePulse::resolveAuthenticatedUserId()when recording user-keyed entries. - SQS queues may appear duplicated in the Queue card. Use
ignoreregex patterns to suppress them. - Sampled dashboard values are approximate and prefixed with
~. They are not suitable for financial or audit reporting. - Always use
search-docsfor the latest Pulse documentation rather than relying on this skill alone.
When not to use it
- →Financial or audit reporting
- →High-precision data tracking
Prerequisites
Limitations
- →Sampled values are approximate
- →Requires persistent daemon for Servers card
How it compares
It provides a dedicated, real-time monitoring dashboard integrated directly into the Laravel application, rather than relying on external APM services.
Compared to similar skills
pulse-development side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| pulse-development (this skill) | 0 | 3mo | Review | Intermediate |
| laravel:horizon:metrics-and-dashboards | 0 | 9mo | No flags | Intermediate |
| azure-monitor-opentelemetry-ts | 1 | 3mo | Review | Intermediate |
| laravel-pdf | 11 | 3mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
laravel:horizon:metrics-and-dashboards
jpcaparas
Operate Horizon with confidence—naming, tags, concurrency, failure handling, actionable metrics, and dashboards
azure-monitor-opentelemetry-ts
microsoft
Instrument applications with Azure Monitor and OpenTelemetry for JavaScript (@azure/monitor-opentelemetry). Use when adding distributed tracing, metrics, and logs to Node.js applications with Application Insights.
laravel-pdf
spatie
Generate PDFs from Blade views or HTML using spatie/laravel-pdf. Covers creating, formatting, saving, downloading, and testing PDFs with the Browsershot, Cloudflare, or DOMPDF driver.
laravel-specialist
Jeffallan
Use when building Laravel 10+ applications requiring Eloquent ORM, API resources, or queue systems. Invoke for Laravel models, Livewire components, Sanctum authentication, Horizon queues.
pennant-development
laravel
Manages feature flags with Laravel Pennant. Activates when creating, checking, or toggling feature flags; showing or hiding features conditionally; implementing A/B testing; working with @feature directive; or when the user mentions feature flags, feature toggles, Pennant, conditional features, rollouts, or gradually enabling features.
developing-shopper
shopperlabs
Provides coding standards and patterns for Laravel Shopper development. Use when creating or modifying Models, Actions, Enums, Livewire components, migrations, or tests in any Shopper package.