Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
e8d9852
feat: shared server environment variables
ShadowArcanist Dec 24, 2025
81009c2
fix: server env shows not found on application variables input field …
ShadowArcanist Dec 24, 2025
5ed308d
feat: predefined server variables (COOLIFY_SERVER_NAME, COOLIFY_SERVE…
ShadowArcanist Dec 24, 2025
09e14d2
fix: server env not showing for services
ShadowArcanist Dec 24, 2025
82b19e5
fix: predefined server env were not generated for existing servers
ShadowArcanist Dec 24, 2025
e3df380
fix: change value cast to encrypted for shared environment variables
andrasbacsai Jan 2, 2026
99d22ae
fix: filter available scopes based on existing variables in env var i…
andrasbacsai Jan 2, 2026
510fb22
fix: add 'is_literal' flag to shared environment variables for servers
andrasbacsai Jan 2, 2026
9cd8dff
fix: remove redundant sort call in environment variables display
andrasbacsai Jan 2, 2026
5661c13
fix: ensure authorization check for server view in mount method
andrasbacsai Jan 2, 2026
54c2871
fix: streamline migration for adding predefined server variables to e…
andrasbacsai Jan 2, 2026
e412b57
Merge branch 'next' into shadow/add-shared-server-env
ShadowArcanist Jan 14, 2026
960cedd
docs: update changelog
github-actions[bot] Feb 7, 2026
32e1fd9
feat(templates): add ElectricSQL docker compose template
matfire Feb 7, 2026
c180947
docs: update changelog
github-actions[bot] Feb 7, 2026
4045c72
Merge branch 'next' into v4.x
matfire Feb 14, 2026
346b2b8
docs: update changelog
github-actions[bot] Feb 14, 2026
a0077de
feat: add 'is_preserve_repository_enabled' option to application cont…
ahmadw13 Feb 15, 2026
53c1d5b
feat: add 'is_preserve_repository_enabled' field to shared data appli…
ahmadw13 Feb 15, 2026
20563e2
feat: add 'is_preserve_repository_enabled' field to openapi specifica…
ahmadw13 Feb 15, 2026
331493a
Merge branch 'next' into v4.x
matfire Feb 16, 2026
17f5259
docs: update changelog
github-actions[bot] Feb 16, 2026
94ad8f3
Merge branch 'coollabsio:v4.x' into v4.x
ahmadw13 Feb 16, 2026
2cd1082
Merge branch 'next' into v4.x
matfire Feb 17, 2026
7c4f8f3
docs: update changelog
github-actions[bot] Feb 17, 2026
b71ad86
feat: refresh private repository if updating
adiologydev Feb 25, 2026
e629403
Merge branch 'next' into v4.x
matfire Mar 15, 2026
7693657
docs: update changelog
github-actions[bot] Mar 15, 2026
40eff61
Merge branch 'next' into v4.x
matfire Mar 16, 2026
82b4a2b
docs: update changelog
github-actions[bot] Mar 16, 2026
0627dce
build(deps): bump phpseclib/phpseclib from 3.0.49 to 3.0.50
dependabot[bot] Mar 19, 2026
a7f07f6
build(deps): bump league/commonmark from 2.8.1 to 2.8.2
dependabot[bot] Mar 19, 2026
95351eb
fix(service): use FQDN instead of URL for Grafana GF_SERVER_DOMAIN
xidik12 Mar 22, 2026
8ef0f07
Merge branch 'next' into v4.x
matfire Mar 24, 2026
9db0644
docs: update changelog
github-actions[bot] Mar 24, 2026
e6de261
feat(sync): sync install.sh, docker-compose, and env files to GitHub
andrasbacsai Mar 25, 2026
b8b49b9
chore(docker): update container image versions
andrasbacsai Mar 25, 2026
14a7f86
fix(backup): prevent notification failures from affecting backup status
andrasbacsai Mar 25, 2026
c2c18a2
fix(backup): prevent notification failures from affecting backup stat…
andrasbacsai Mar 25, 2026
ca769ba
chore: bump version to 4.0.0-beta.471
andrasbacsai Mar 25, 2026
3034e89
feat(preview-env): add production variable fallback for docker-compose
andrasbacsai Mar 25, 2026
fbdcf0d
fix(preview-env): ensure auto-created preview env vars inherit runtim…
andrasbacsai Mar 25, 2026
9f13f25
Merge remote-tracking branch 'origin/next' into next
andrasbacsai Mar 25, 2026
69ea7df
docs(tdd): add bug fix workflow section with TDD requirements
andrasbacsai Mar 25, 2026
811ee5d
refactor(jobs): extract container resolution logic for deployment com…
andrasbacsai Mar 25, 2026
a94517f
fix(api): validate server ownership in domains endpoint and scope act…
andrasbacsai Mar 25, 2026
1bd9570
fix(api): validate server ownership in domains endpoint and scope act…
andrasbacsai Mar 25, 2026
333cc95
feat(deployment): add command_hidden flag to hide command text in logs
andrasbacsai Mar 25, 2026
9904360
fix(backup): validate MongoDB collection names in backup input
andrasbacsai Mar 25, 2026
b1de75a
fix(backup): validate MongoDB collection names in backup input (#9168)
andrasbacsai Mar 25, 2026
847166a
fix(terminal): apply authorization middleware to terminal bootstrap r…
andrasbacsai Mar 25, 2026
bc91b41
fix(terminal): apply authorization middleware to terminal bootstrap r…
andrasbacsai Mar 25, 2026
0a621bb
update laravel boost
andrasbacsai Mar 25, 2026
3470f8b
add new skills
andrasbacsai Mar 25, 2026
f0c8ff6
Update ByHetzner.php
andrasbacsai Mar 25, 2026
0fed553
fix(settings): require instance admin authorization for updates page
andrasbacsai Mar 25, 2026
d486bf0
fix(livewire): add Locked attributes and consolidate container name v…
andrasbacsai Mar 25, 2026
c8a96b6
fix(livewire): add Locked attributes and consolidate container name v…
andrasbacsai Mar 25, 2026
e2ba44d
fix(validation): allow ampersands and quotes in shell-safe command pa…
andrasbacsai Mar 25, 2026
ae31111
fix(livewire): add input validation to unmanaged container operations
andrasbacsai Mar 25, 2026
944a038
fix(livewire): add input validation to unmanaged container operations…
andrasbacsai Mar 25, 2026
4766812
feat(deployment): add command_hidden flag to hide command text in log…
andrasbacsai Mar 25, 2026
6f163dd
fix(deployment): normalize whitespace in pre/post deployment commands
andrasbacsai Mar 25, 2026
ad95d65
fix(deployment): normalize whitespace in pre/post deployment commands…
andrasbacsai Mar 25, 2026
952f324
fix(backup): use escapeshellarg for credentials in database backup co…
andrasbacsai Mar 25, 2026
3fdce06
fix(storage): consistent path validation and escaping for file volumes
andrasbacsai Mar 25, 2026
b22e470
chore(deps): bump picomatch
dependabot[bot] Mar 26, 2026
fecb80b
fix(storage): consistent path validation and escaping for file volume…
andrasbacsai Mar 26, 2026
d77e4c8
fix(backup): use escapeshellarg for credentials in backup commands (#…
andrasbacsai Mar 26, 2026
dd2c9c2
feat(jobs): implement exponential backoff for unreachable servers
andrasbacsai Mar 26, 2026
d2064dd
fix(storage): use escapeshellarg for volume names in shell commands
andrasbacsai Mar 26, 2026
f9a9dc8
fix(api): add volume name validation to storage API endpoints
andrasbacsai Mar 26, 2026
c8efbf1
fix(storage): use escapeshellarg for volume names in shell commands (…
andrasbacsai Mar 26, 2026
3e0d48f
refactor: simplify remote process chain and harden ActivityMonitor
andrasbacsai Mar 26, 2026
2729dff
refactor: simplify remote process chain and harden ActivityMonitor (#…
andrasbacsai Mar 26, 2026
0fce7fa
fix: add URL validation for GitHub source api_url and html_url fields
andrasbacsai Mar 26, 2026
5ed77f3
Add URL validation for GitHub source fields (#9190)
andrasbacsai Mar 26, 2026
25d424c
refactor: split invitation endpoint into GET (show) and POST (accept)
andrasbacsai Mar 26, 2026
e39678a
refactor: split invitation endpoint into GET/POST flow (#9192)
andrasbacsai Mar 26, 2026
103d5b6
fix: sanitize error output in server validation logs
andrasbacsai Mar 26, 2026
e1d4b46
fix: harden TrustHosts middleware and use base_url() for password res…
andrasbacsai Mar 26, 2026
f2e4879
Merge remote-tracking branch 'origin/next' into feat/refresh-repos
andrasbacsai Mar 26, 2026
9b00880
refactor(docker): migrate service startup from Artisan commands to sh…
andrasbacsai Mar 27, 2026
af3826e
feat(reset-password): add IPv6 support and header poisoning protection
andrasbacsai Mar 27, 2026
ba6f0cd
Merge remote-tracking branch 'origin/next' into fix/trust-hosts-url-g…
andrasbacsai Mar 27, 2026
638f1d3
feat(subscription): add billing interval to price preview
andrasbacsai Mar 27, 2026
c28fbab
style(docker): standardize service startup log message format
andrasbacsai Mar 27, 2026
f439660
chore(deps): bump aws/aws-sdk-php from 3.371.3 to 3.374.2
dependabot[bot] Mar 28, 2026
bd9a8ce
style(dev): standardize log message format with INFO/ERROR prefixes
andrasbacsai Mar 28, 2026
e396c70
refactor: simplify TrustHosts middleware and use APP_URL as base_url …
andrasbacsai Mar 28, 2026
25dcde6
fix: sanitize error output in server validation logs (#9197)
andrasbacsai Mar 28, 2026
98569e4
fix: use server-side config for password reset URL generation (#9193)
andrasbacsai Mar 28, 2026
564cd83
fix: add URL validation for notification webhook fields
andrasbacsai Mar 28, 2026
aea201f
refactor: move admin route into middleware group and harden authoriza…
andrasbacsai Mar 28, 2026
f493b96
refactor: use random_int() for email change verification codes
andrasbacsai Mar 28, 2026
c9922c3
fix: add input validation for install/build/start command fields
andrasbacsai Mar 28, 2026
48ba4ec
fix: harden GetLogs Livewire component with locked properties and inp…
andrasbacsai Mar 28, 2026
3d1b9f5
fix: add validation and escaping for Docker network names
andrasbacsai Mar 28, 2026
e36622f
refactor: scope server and project queries to current team
andrasbacsai Mar 28, 2026
67a4fcc
fix: add mass assignment protection to models
andrasbacsai Mar 28, 2026
ad69427
Merge remote-tracking branch 'origin/next' into fix/harden-getlogs-li…
andrasbacsai Mar 28, 2026
91ab0b3
refactor: move admin route into middleware group (#9225)
andrasbacsai Mar 28, 2026
0b8c75f
fix(webhooks): add validation to block unsafe webhook URLs
andrasbacsai Mar 28, 2026
377ce24
Add URL validation for notification webhook fields (#9224)
andrasbacsai Mar 28, 2026
3b2e6e1
refactor: use random_int() for email change verification codes (#9226)
andrasbacsai Mar 28, 2026
4213bd5
fix(langfuse): pin clickhouse version to avoid error during clickhous…
GauthierPLM Mar 28, 2026
6197558
fix(validation): add input validation for resource limit fields
ShadowArcanist Mar 28, 2026
72118d6
feat(databases): add public port timeout configuration
andrasbacsai Mar 28, 2026
407b6df
fix(validation): add IP validation for custom DNS servers input
ShadowArcanist Mar 28, 2026
105b4a9
fix(validation): add input validation for port exposes and port mappi…
ShadowArcanist Mar 28, 2026
73258c3
fix(validation): add URL validation for proxy redirect input
ShadowArcanist Mar 28, 2026
c52a199
fix(validation): add input validation for server advanced settings page
ShadowArcanist Mar 28, 2026
15a98b5
fix(validation): add input validation for server_disk_usage_check_fre…
ShadowArcanist Mar 28, 2026
1ebba7d
fix(validation): add input validation for sentinel configuration
ShadowArcanist Mar 28, 2026
791aa10
fix(validation): use int|string for Livewire numeric properties and r…
ShadowArcanist Mar 28, 2026
67f8eb9
fix(validation): add input validation for database backup timeout
ShadowArcanist Mar 28, 2026
40420e3
fix(validation): add timeout validation to database backup API endpoints
ShadowArcanist Mar 28, 2026
b98346f
fix(validation): validate cron expressions in update backup API endpoint
ShadowArcanist Mar 28, 2026
ac47040
Fixed typo in listmonk db config
mxswd Mar 29, 2026
1daff4e
fix(validation): add input validation for emails configuration
ShadowArcanist Mar 29, 2026
d33cd7c
fix(ui): keep sidebar visible on scheduled task single view
ShadowArcanist Mar 29, 2026
1f864dc
feat(ui): show task name on title for scheduled task single view
ShadowArcanist Mar 29, 2026
5037497
feat(ui): add enable/disable button for scheduled task
ShadowArcanist Mar 29, 2026
4012279
feat(ui): reorganize scheduled task single view layout
ShadowArcanist Mar 29, 2026
a1e5357
feat(ui): add helper text for frequency input on scheduled task view
ShadowArcanist Mar 29, 2026
c9f20ba
fix(validation): add input validation for database public port and pr…
ShadowArcanist Mar 29, 2026
96ae9ad
fix: add input validation for install/build/start command fields (#9227)
andrasbacsai Mar 29, 2026
3ba4553
fix(security): enforce team-scoped project/env lookups in onboarding
andrasbacsai Mar 29, 2026
3a0cfee
feat(ui): add two step confirmation to enable self registration
ShadowArcanist Mar 29, 2026
1027c73
refactor: scope server and project queries to current team (#9230)
andrasbacsai Mar 29, 2026
9e96a20
fix: add validation and escaping for Docker network names (#9228)
andrasbacsai Mar 29, 2026
a584050
fix(forms): use Alpine state for password visibility toggles
andrasbacsai Mar 29, 2026
3fde1e0
fix(application): persist redirect value in setRedirect
andrasbacsai Mar 29, 2026
b3256d4
fix(security): harden model assignment and sensitive data handling
andrasbacsai Mar 29, 2026
7b3b6fa
fix(application): persist redirect value in setRedirect (#9279)
andrasbacsai Mar 29, 2026
9f46586
refactor: define explicit fillable attributes on all Eloquent models
andrasbacsai Mar 29, 2026
a52352f
Merge remote-tracking branch 'origin/next' into refactor/sync-model-a…
andrasbacsai Mar 29, 2026
f267a28
fix: harden GetLogs Livewire component properties (#9229)
andrasbacsai Mar 29, 2026
7ad5124
Merge remote-tracking branch 'origin/next' into refactor/sync-model-a…
andrasbacsai Mar 29, 2026
7b1e75f
Merge remote-tracking branch 'origin/next' into pr-8371-v4.x
andrasbacsai Mar 29, 2026
9ccdbf6
feat(api): Add support for Preserve Repository During Deployment in A…
andrasbacsai Mar 29, 2026
4ec9b7e
fix(clone): include uuid field when cloning persistent volumes
andrasbacsai Mar 29, 2026
53b3236
fix(clone): exclude uuid when replicating persistent volumes (#9290)
andrasbacsai Mar 30, 2026
31ae8dd
fix(notification): updated cloud subscription links to valid url
ShadowArcanist Mar 30, 2026
c0c0349
refactor(models): add fillable attributes for database configuration …
andrasbacsai Mar 30, 2026
09f1c71
Merge remote-tracking branch 'origin/next' into refactor/sync-model-a…
andrasbacsai Mar 30, 2026
30c7ab7
fix(notification): updated cloud subscription links to valid url (#9296)
andrasbacsai Mar 30, 2026
7a1999c
feat(ui): add two step confirmation to enable self registration (#9277)
andrasbacsai Mar 30, 2026
e944f80
fix(service): listmonk db config env typo (#9250)
andrasbacsai Mar 30, 2026
915d2a0
fix(service): pin clickhouse version on Langfuse service to avoid err…
andrasbacsai Mar 30, 2026
47692be
fix(service): use FQDN instead of URL for Grafana GF_SERVER_DOMAIN (#…
andrasbacsai Mar 30, 2026
eb3d88a
feat(service): Add ElectricSQL (#8190)
andrasbacsai Mar 30, 2026
71cde5a
Merge remote-tracking branch 'origin/next' into refactor/sync-model-a…
andrasbacsai Mar 30, 2026
1da1f32
refactor: use forceCreate() for internal model creation
andrasbacsai Mar 30, 2026
850c37b
fix(database): auto-generate missing CA cert on SSL regeneration
andrasbacsai Mar 30, 2026
3fddc79
refactor: define explicit fillable attributes on all Eloquent models …
andrasbacsai Mar 30, 2026
61f47cc
feat(deployments): support Docker image tags for preview deployments
andrasbacsai Mar 30, 2026
9a0087f
fix(validation): add input validation for database public port and pr…
andrasbacsai Mar 30, 2026
22b267d
feat(ui): improve schedule task single view for better UX (#9266)
andrasbacsai Mar 30, 2026
1497ad3
fix(models): use snake_case for Eloquent attribute access
andrasbacsai Mar 30, 2026
f09115a
Merge remote-tracking branch 'origin/next' into feat/refresh-repos
andrasbacsai Mar 30, 2026
c52d50c
fix(validation): add input validation for emails configuration (#9259)
andrasbacsai Mar 30, 2026
b8fb29f
fix(validation): add input validation for database backup timeout (#9…
andrasbacsai Mar 30, 2026
0b9d2c9
fix(validation): add input validation for sentinel configuration (#9243)
andrasbacsai Mar 30, 2026
179770d
fix(validation): add input validation for server advanced settings pa…
andrasbacsai Mar 30, 2026
71bafa0
fix(validation): add URL validation for proxy redirect input (#9241)
andrasbacsai Mar 30, 2026
3b96215
fix(validation): add input validation for port exposes and port mappi…
andrasbacsai Mar 30, 2026
6be563a
fix(validation): add IP validation for custom DNS servers input (#9239)
andrasbacsai Mar 30, 2026
1efed14
fix(validation): add input validation for resource limit fields (#9238)
andrasbacsai Mar 30, 2026
2692496
fix(database): refresh SSL/status state and harden clone writes
andrasbacsai Mar 31, 2026
cb97a18
Merge remote-tracking branch 'origin/next' into pr-7764-shadow/add-sh…
andrasbacsai Mar 31, 2026
30751a6
fix(deployment): resolve shared env vars using main server
andrasbacsai Mar 31, 2026
25c0c88
Merge remote-tracking branch 'origin/next' into feat/refresh-repos
andrasbacsai Mar 31, 2026
7638912
fix(github): reset branch state when refreshing repositories
andrasbacsai Mar 31, 2026
047aff1
feat: refresh repos on private github app (#8621)
andrasbacsai Mar 31, 2026
1a603a1
fix(models): replace forceFill/forceCreate with fill/create and add f…
andrasbacsai Mar 31, 2026
a77e1f4
fix(models): replace forceCreate with forceFill+save pattern
andrasbacsai Mar 31, 2026
9c646b0
Merge remote-tracking branch 'origin/next' into pr-7764-shadow/add-sh…
andrasbacsai Mar 31, 2026
4f6e1f7
style(navbar): use tracking-tight instead of tracking-wide for logo
andrasbacsai Mar 31, 2026
f01953d
fix(models): add missing uuid to StandaloneDocker initialization
andrasbacsai Mar 31, 2026
466eb85
refactor(models): extract defaultStandaloneDockerAttributes method on…
andrasbacsai Mar 31, 2026
acb716c
fix(shared-variables): support direct mount params and comment field …
andrasbacsai Mar 31, 2026
47025c7
feat: Shared server environment variables (#7764)
andrasbacsai Mar 31, 2026
3961077
feat(forms): make textarea monospace opt-in and improve multiline toggle
andrasbacsai Mar 31, 2026
c6b00cd
Merge branch 'next' into dependabot/composer/aws/aws-sdk-php-3.374.2
andrasbacsai Mar 31, 2026
6fc58a0
chore(deps): bump aws/aws-sdk-php from 3.371.3 to 3.374.2 (#9222)
andrasbacsai Mar 31, 2026
7a81493
chore(deps): bump picomatch (#9178)
andrasbacsai Mar 31, 2026
b757252
build(deps): bump league/commonmark from 2.8.1 to 2.8.2 (#9047)
andrasbacsai Mar 31, 2026
bb981ed
build(deps): bump phpseclib/phpseclib from 3.0.49 to 3.0.50 (#9044)
andrasbacsai Mar 31, 2026
da5b003
Merge remote-tracking branch 'origin/next' into unreachable-server-ba…
andrasbacsai Mar 31, 2026
83caaba
feat(jobs): implement exponential backoff for unreachable servers (#9…
andrasbacsai Mar 31, 2026
2abb073
Merge remote-tracking branch 'origin/next' into 9076-investigate-pre-…
andrasbacsai Mar 31, 2026
c1d670b
fix(deployment): resolve intermittent pre-deployment command failures…
andrasbacsai Mar 31, 2026
9685085
fix(project): handle slash branches in public repo URLs
andrasbacsai Apr 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
85 changes: 85 additions & 0 deletions .agents/skills/configuring-horizon/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
name: configuring-horizon
description: "Use this skill whenever the user mentions Horizon by name in a Laravel context. Covers the full Horizon lifecycle: installing Horizon (horizon:install, Sail setup), configuring config/horizon.php (supervisor blocks, queue assignments, balancing strategies, minProcesses/maxProcesses), fixing the dashboard (authorization via Gate::define viewHorizon, blank metrics, horizon:snapshot scheduling), and troubleshooting production issues (worker crashes, timeout chain ordering, LongWaitDetected notifications, waits config). Also covers job tagging and silencing. Do not use for generic Laravel queues without Horizon, SQS or database drivers, standalone Redis setup, Linux supervisord, Telescope, or job batching."
license: MIT
metadata:
author: laravel
---

# Horizon Configuration

## Documentation

Use `search-docs` for detailed Horizon patterns and documentation covering configuration, supervisors, balancing, dashboard authorization, tags, notifications, metrics, and deployment.

For deeper guidance on specific topics, read the relevant reference file before implementing:

- `references/supervisors.md` covers supervisor blocks, balancing strategies, multi-queue setups, and auto-scaling
- `references/notifications.md` covers LongWaitDetected alerts, notification routing, and the `waits` config
- `references/tags.md` covers job tagging, dashboard filtering, and silencing noisy jobs
- `references/metrics.md` covers the blank metrics dashboard, snapshot scheduling, and retention config

## Basic Usage

### Installation

```bash
php artisan horizon:install
```

### Supervisor Configuration

Define supervisors in `config/horizon.php`. The `environments` array merges into `defaults` and does not replace the whole supervisor block:

<!-- Supervisor Config -->
```php
'defaults' => [
'supervisor-1' => [
'connection' => 'redis',
'queue' => ['default'],
'balance' => 'auto',
'minProcesses' => 1,
'maxProcesses' => 10,
'tries' => 3,
],
],

'environments' => [
'production' => [
'supervisor-1' => ['maxProcesses' => 20, 'balanceCooldown' => 3],
],
'local' => [
'supervisor-1' => ['maxProcesses' => 2],
],
],
```

### Dashboard Authorization

Restrict access in `App\Providers\HorizonServiceProvider`:

<!-- Dashboard Gate -->
```php
protected function gate(): void
{
Gate::define('viewHorizon', function (User $user) {
return $user->is_admin;
});
}
```

## Verification

1. Run `php artisan horizon` and visit `/horizon`
2. Confirm dashboard access is restricted as expected
3. Check that metrics populate after scheduling `horizon:snapshot`

## Common Pitfalls

- Horizon only works with the Redis queue driver. Other drivers such as database and SQS are not supported.
- Redis Cluster is not supported. Horizon requires a standalone Redis connection.
- Always check `config/horizon.php` before making changes to understand the current supervisor and environment configuration.
- The `environments` array overrides only the keys you specify. It merges into `defaults` and does not replace it.
- The timeout chain must be ordered: job `timeout` less than supervisor `timeout` less than `retry_after`. The wrong order can cause jobs to be retried before Horizon finishes timing them out.
- The metrics dashboard stays blank until `horizon:snapshot` is scheduled. Running `php artisan horizon` alone does not populate metrics.
- Always use `search-docs` for the latest Horizon documentation rather than relying on this skill alone.
21 changes: 21 additions & 0 deletions .agents/skills/configuring-horizon/references/metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Metrics & Snapshots

## Where to Find It

Search with `search-docs`:
- `"horizon metrics snapshot"` for the snapshot command and scheduling
- `"horizon trim snapshots"` for retention configuration

## What to Watch For

### Metrics dashboard stays blank until `horizon:snapshot` is scheduled

Running `horizon` artisan command does not populate metrics automatically. The metrics graph is built from snapshots, so `horizon:snapshot` must be scheduled to run every 5 minutes via Laravel's scheduler.

### Register the snapshot in the scheduler rather than running it manually

A single manual run populates the dashboard momentarily but will not keep it updated. Search `"horizon metrics snapshot"` for the exact scheduler registration syntax, which differs between Laravel 10 and 11+.

### `metrics.trim_snapshots` is a snapshot count, not a time duration

The `trim_snapshots.job` and `trim_snapshots.queue` values in `config/horizon.php` are counts of snapshots to keep, not minutes or hours. With the default of 24 snapshots at 5-minute intervals, that provides 2 hours of history. Increase the value to retain more history at the cost of Redis memory usage.
21 changes: 21 additions & 0 deletions .agents/skills/configuring-horizon/references/notifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Notifications & Alerts

## Where to Find It

Search with `search-docs`:
- `"horizon notifications"` for Horizon's built-in notification routing helpers
- `"horizon long wait detected"` for LongWaitDetected event details

## What to Watch For

### `waits` in `config/horizon.php` controls the LongWaitDetected threshold

The `waits` array (e.g., `'redis:default' => 60`) defines how many seconds a job can wait in a queue before Horizon fires a `LongWaitDetected` event. This value is set in the config file, not in Horizon's notification routing. If alerts are firing too often or too late, adjust `waits` rather than the routing configuration.

### Use Horizon's built-in notification routing in `HorizonServiceProvider`

Configure notifications in the `boot()` method of `App\Providers\HorizonServiceProvider` using `Horizon::routeMailNotificationsTo()`, `Horizon::routeSlackNotificationsTo()`, or `Horizon::routeSmsNotificationsTo()`. Horizon already wires `LongWaitDetected` to its notification sender, so the documented setup is notification routing rather than manual listener registration.

### Failed job alerts are separate from Horizon's documented notification routing

Horizon's 12.x documentation covers built-in long-wait notifications. Do not assume the docs provide a `JobFailed` listener example in `HorizonServiceProvider`. If a user needs failed job alerts, treat that as custom queue event handling and consult the queue documentation instead of Horizon's notification-routing API.
27 changes: 27 additions & 0 deletions .agents/skills/configuring-horizon/references/supervisors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Supervisor & Balancing Configuration

## Where to Find It

Search with `search-docs` before writing any supervisor config, as option names and defaults change between Horizon versions:
- `"horizon supervisor configuration"` for the full options list
- `"horizon balancing strategies"` for auto, simple, and false modes
- `"horizon autoscaling workers"` for autoScalingStrategy details
- `"horizon environment configuration"` for the defaults and environments merge

## What to Watch For

### The `environments` array merges into `defaults` rather than replacing it

The `defaults` array defines the complete base supervisor config. The `environments` array patches it per environment, overriding only the keys listed. There is no need to repeat every key in each environment block. A common pattern is to define `connection`, `queue`, `balance`, `autoScalingStrategy`, `tries`, and `timeout` in `defaults`, then override only `maxProcesses`, `balanceMaxShift`, and `balanceCooldown` in `production`.

### Use separate named supervisors to enforce queue priority

Horizon does not enforce queue order when using `balance: auto` on a single supervisor. The `queue` array order is ignored for load balancing. To process `notifications` before `default`, use two separately named supervisors: one for the high-priority queue with a higher `maxProcesses`, and one for the low-priority queue with a lower cap. The docs include an explicit note about this.

### Use `balance: false` to keep a fixed number of workers on a dedicated queue

Auto-balancing suits variable load, but if a queue should always have exactly N workers such as a video-processing queue limited to 2, set `balance: false` and `maxProcesses: 2`. Auto-balancing would scale it up during bursts, which may be undesirable.

### Set `balanceCooldown` to prevent rapid worker scaling under bursty load

When using `balance: auto`, the supervisor can scale up and down rapidly under bursty load. Set `balanceCooldown` to the number of seconds between scaling decisions, typically 3 to 5, to smooth this out. `balanceMaxShift` limits how many processes are added or removed per cycle.
21 changes: 21 additions & 0 deletions .agents/skills/configuring-horizon/references/tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Tags & Silencing

## Where to Find It

Search with `search-docs`:
- `"horizon tags"` for the tagging API and auto-tagging behaviour
- `"horizon silenced jobs"` for the `silenced` and `silenced_tags` config options

## What to Watch For

### Eloquent model jobs are tagged automatically without any extra code

If a job's constructor accepts Eloquent model instances, Horizon automatically tags the job with `ModelClass:id` such as `App\Models\User:42`. These tags are filterable in the dashboard without any changes to the job class. Only add a `tags()` method when custom tags beyond auto-tagging are needed.

### `silenced` hides jobs from the dashboard completed list but does not stop them from running

Adding a job class to the `silenced` array in `config/horizon.php` removes it from the completed jobs view. The job still runs normally. This is a dashboard noise-reduction tool, not a way to disable jobs.

### `silenced_tags` hides all jobs carrying a matching tag from the completed list

Any job carrying a matching tag string is hidden from the completed jobs view. This is useful for silencing a category of jobs such as all jobs tagged `notifications`, rather than silencing specific classes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
name: developing-with-fortify
description: Laravel Fortify headless authentication backend development. Activate when implementing authentication features including login, registration, password reset, email verification, two-factor authentication (2FA/TOTP), profile updates, headless auth, authentication scaffolding, or auth guards in Laravel applications.
name: fortify-development
description: 'ACTIVATE when the user works on authentication in Laravel. This includes login, registration, password reset, email verification, two-factor authentication (2FA/TOTP/QR codes/recovery codes), profile updates, password confirmation, or any auth-related routes and controllers. Activate when the user mentions Fortify, auth, authentication, login, register, signup, forgot password, verify email, 2FA, or references app/Actions/Fortify/, CreateNewUser, UpdateUserProfileInformation, FortifyServiceProvider, config/fortify.php, or auth guards. Fortify is the frontend-agnostic authentication backend for Laravel that registers all auth routes and controllers. Also activate when building SPA or headless authentication, customizing login redirects, overriding response contracts like LoginResponse, or configuring login throttling. Do NOT activate for Laravel Passport (OAuth2 API tokens), Socialite (OAuth social login), or non-auth Laravel features.'
license: MIT
metadata:
author: laravel
---

# Laravel Fortify Development
Expand Down Expand Up @@ -39,7 +42,7 @@ Enable in `config/fortify.php` features array:
```
- [ ] Add TwoFactorAuthenticatable trait to User model
- [ ] Enable feature in config/fortify.php
- [ ] Run migrations for 2FA columns
- [ ] If the `*_add_two_factor_columns_to_users_table.php` migration is missing, publish via `php artisan vendor:publish --tag=fortify-migrations` and migrate
- [ ] Set up view callbacks in FortifyServiceProvider
- [ ] Create 2FA management UI
- [ ] Test QR code and recovery codes
Expand Down Expand Up @@ -75,14 +78,26 @@ Enable in `config/fortify.php` features array:

```
- [ ] Set 'views' => false in config/fortify.php
- [ ] Install and configure Laravel Sanctum
- [ ] Use 'web' guard in fortify config
- [ ] Install and configure Laravel Sanctum for session-based SPA authentication
- [ ] Use the 'web' guard in config/fortify.php (required for session-based authentication)
- [ ] Set up CSRF token handling
- [ ] Test XHR authentication flows
```

> Use `search-docs` for integration and SPA authentication patterns.

#### Two-Factor Authentication in SPA Mode

When `views` is set to `false`, Fortify returns JSON responses instead of redirects.

If a user attempts to log in and two-factor authentication is enabled, the login request will return a JSON response indicating that a two-factor challenge is required:

```json
{
"two_factor": true
}
```

## Best Practices

### Custom Authentication Logic
Expand Down
Loading
Loading