Laravel Verification Loop

VerifiedCaution

Complete verification workflow for Laravel projects: environment checks, linting, static analysis, test coverage, security audit, and deployment readiness.

Sby Skills Guide Bot
DevOpsIntermediate
8/29/2026
Claude CodeCursorWindsurfCopilotCodex
#laravel#php#static-analysis#ci-cd#pre-deploy

Recommended for

Automated summary

Describes a sequential verification loop for a Laravel project, running from environment and Composer checks through linting, static analysis, tests and security audit to deployment readiness.

Strengths

  • Phases are ordered with an explicit rationale (environment → Composer → lint/PHPStan → tests → audit → migrations → caches → queues), halting immediately when environment checks fail
  • Concrete, copy-pasteable commands with variants for Sail, Psalm, Horizon and queue:monitor
  • Covers easily overlooked items: destructive migrations, down() methods, config/route/view caching, queue backlog and the scheduler
  • Includes an active queue health check (no-op job on a dedicated queue) explicitly restricted to non-production environments

Limitations

  • Ships no ready-made script or full CI configuration; the commands must be assembled by hand
  • Assumes Pint, PHPStan, Xdebug and Horizon are already installed and configured, without explaining setup
  • Mentions test coverage without defining any threshold or failure criterion
When to use it

Use it before opening a pull request, after a major refactor or dependency upgrade, or right before deploying a Laravel project to staging or production.

When not to use it

Not useful for non-Laravel projects, or during fast prototyping where linting, static analysis and tests are deliberately skipped.

Security analysis

Caution
Quality score92/100

The skill uses legitimate Laravel verification commands, none of which are destructive or exfiltrating. However, it involves execution of shell commands that alter local project state and includes a tinker-based active verification step, so it warrants caution rather than a fully safe rating.

Findings
  • •Skill instructs execution of shell commands (composer, artisan, vendor/bin tools) which can modify project state such as cache clearing, autoload regeneration, and queue worker processing.
  • •Includes `php artisan tinker --execute` to dispatch a job; while restricted to a healthcheck job on staging, tinker is a powerful tool that could be misused if the skill is adapted.
How this analysis is made

Examples

Pre-PR verification
Run the full Laravel verification loop on this project before I open the PR: php/composer/artisan version checks, composer validate, Pint --test, PHPStan, php artisan test with coverage, composer audit, and migrate --pretend.
Production deploy readiness
We deploy to production tomorrow — walk through the Laravel pre-deploy checklist: verify APP_ENV and APP_DEBUG, review pending migrations for destructive changes, warm config/route/view caches, and confirm storage and bootstrap/cache are writable.
Queue and scheduler check on staging
Check the queue and scheduler setup on staging: run schedule:list and queue:failed, show horizon:status if Horizon is used, then dispatch a healthcheck job to a dedicated queue and process it with a single worker to confirm it works.

name: laravel-verification description: "Verification loop for Laravel projects: env checks, linting, static analysis, tests with coverage, security scans, and deployment readiness. Use when verifying a Laravel project before merge or deploy — lint, static analysis, tests, coverage, security." metadata: origin: ECC

Laravel Verification Loop

Run before PRs, after major changes, and pre-deploy.

When to Use

  • Before opening a pull request for a Laravel project
  • After major refactors or dependency upgrades
  • Pre-deployment verification for staging or production
  • Running full lint -> test -> security -> deploy readiness pipeline

How It Works

  • Run phases sequentially from environment checks through deployment readiness so each layer builds on the last.
  • Environment and Composer checks gate everything else; stop immediately if they fail.
  • Linting/static analysis should be clean before running full tests and coverage.
  • Security and migration reviews happen after tests so you verify behavior before data or release steps.
  • Build/deploy readiness and queue/scheduler checks are final gates; any failure blocks release.

Phase 1: Environment Checks

php -v
composer --version
php artisan --version
  • Verify .env is present and required keys exist
  • Confirm APP_DEBUG=false for production environments
  • Confirm APP_ENV matches the target deployment (production, staging)

If using Laravel Sail locally:

./vendor/bin/sail php -v
./vendor/bin/sail artisan --version

Phase 1.5: Composer and Autoload

composer validate
composer dump-autoload -o

Phase 2: Linting and Static Analysis

vendor/bin/pint --test
vendor/bin/phpstan analyse

If your project uses Psalm instead of PHPStan:

vendor/bin/psalm

Phase 3: Tests and Coverage

php artisan test

Coverage (CI):

XDEBUG_MODE=coverage php artisan test --coverage

CI example (format -> static analysis -> tests):

vendor/bin/pint --test
vendor/bin/phpstan analyse
XDEBUG_MODE=coverage php artisan test --coverage

Phase 4: Security and Dependency Checks

composer audit

Phase 5: Database and Migrations

php artisan migrate --pretend
php artisan migrate:status
  • Review destructive migrations carefully
  • Ensure migration filenames follow Y_m_d_His_* (e.g., 2025_03_14_154210_create_orders_table.php) and describe the change clearly
  • Ensure rollbacks are possible
  • Verify down() methods and avoid irreversible data loss without explicit backups

Phase 6: Build and Deployment Readiness

php artisan optimize:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache
  • Ensure cache warmups succeed in production configuration
  • Verify queue workers and scheduler are configured
  • Confirm storage/ and bootstrap/cache/ are writable in the target environment

Phase 7: Queue and Scheduler Checks

php artisan schedule:list
php artisan queue:failed

If Horizon is used:

php artisan horizon:status

If queue:monitor is available, use it to check backlog without processing jobs:

php artisan queue:monitor default --max=100

Active verification (staging only): dispatch a no-op job to a dedicated queue and run a single worker to process it (ensure a non-sync queue connection is configured).

php artisan tinker --execute="dispatch((new App\\Jobs\\QueueHealthcheck())->onQueue('healthcheck'))"
php artisan queue:work --once --queue=healthcheck

Verify the job produced the expected side effect (log entry, healthcheck table row, or metric).

Only run this on non-production environments where processing a test job is safe.

Examples

Minimal flow:

php -v
composer --version
php artisan --version
composer validate
vendor/bin/pint --test
vendor/bin/phpstan analyse
php artisan test
composer audit
php artisan migrate --pretend
php artisan config:cache
php artisan queue:failed

CI-style pipeline:

composer validate
composer dump-autoload -o
vendor/bin/pint --test
vendor/bin/phpstan analyse
XDEBUG_MODE=coverage php artisan test --coverage
composer audit
php artisan migrate --pretend
php artisan optimize:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan schedule:list

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/laravel-verification-loop-mte1lkmg/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/laravel-verification-loop-mte1lkmg' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/laravel-verification-loop-mte1lkmg/download' --output '.skill-downloads/laravel-verification-loop-mte1lkmg/SKILL.md.part' && mv '.skill-downloads/laravel-verification-loop-mte1lkmg/SKILL.md.part' '.skill-downloads/laravel-verification-loop-mte1lkmg/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/laravel-verification-loop-mte1lkmg/SKILL.md' && test -s '.skill-downloads/laravel-verification-loop-mte1lkmg/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/laravel-verification' && cp -R '.skill-downloads/laravel-verification-loop-mte1lkmg' '.claude/skills/laravel-verification'

Cursor
test -f '.skill-downloads/laravel-verification-loop-mte1lkmg/SKILL.md' && test -s '.skill-downloads/laravel-verification-loop-mte1lkmg/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/laravel-verification' && cp -R '.skill-downloads/laravel-verification-loop-mte1lkmg' '.cursor/skills/laravel-verification'

Codex
test -f '.skill-downloads/laravel-verification-loop-mte1lkmg/SKILL.md' && test -s '.skill-downloads/laravel-verification-loop-mte1lkmg/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/laravel-verification' && cp -R '.skill-downloads/laravel-verification-loop-mte1lkmg' '.agents/skills/laravel-verification'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/laravel-verification-loop-mte1lkmg'

openskills read 'laravel-verification-loop-mte1lkmg'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/laravel-verification-loop-mte1lkmg/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills