Communitygithub.com

laravel-verification

Verifikationsschleife für Laravel-Projekte: Umgebungsprüfungen, Linting, statische Analyse, Tests mit Coverage, Sicherheitsscans und Deployment-Bereitschaft. Verwenden Sie dies, um ein Laravel-Projekt vor Merge oder Deployment zu überprüfen – Linten, statische Analyse, Tests, Coverage, Sicherheit.

Was ist laravel-verification?

Dieses Skill bietet einen umfassenden, mehrstufigen Verifikationsablauf für Laravel-Projekte, der vor Pull-Requests, nach größeren Änderungen und vor Deployments ausgeführt werden soll. Es führt sequenziell von Umgebungsprüfungen über Linting/statische Analyse, Tests mit Coverage, Sicherheitsaudits, Migrationsüberprüfungen bis hin zu Build- und Deployment-Bereitschaft sowie Queue- und Scheduler-Checks durch. Das Skill unterstützt CI-Pipelines und lokale Entwicklungsumgebungen (mit Laravel Sail) und liefert klare Abbruchkriterien, wenn kritische Prüfungen wie Umgebungsvariablen oder Composer-Validierung fehlschlagen. Es ist für Entwickler gedacht, die eine zuverlässige, dokumentierte „Go/No-Go“-Checkliste vor dem Zusammenführen oder Ausliefern von Laravel-Code benötigen, und deckt alle gängigen Werkzeuge wie Pint, PHPStan, Psalm, Composer Audit, Laravel Horizon und Queue-Monitoring ab.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/laravel-verification

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Laravel-Verifikationsschleife

Vor Pull-Requests, nach größeren Änderungen und vor dem Deployment ausführen.

Wann verwenden

  • Vor dem Öffnen eines Pull-Requests für ein Laravel-Projekt
  • Nach größeren Refactorings oder Abhängigkeitsupgrades
  • Pre-Deployment-Verifikation für Staging oder Produktion
  • Ausführung der gesamten Lint -> Test -> Sicherheit -> Deployment-Bereitschaft-Pipeline

Funktionsweise

  • Führt Phasen sequenziell von Umgebungsprüfungen bis zur Deployment-Bereitschaft aus, sodass jede Ebene auf der vorherigen aufbaut.
  • Umgebungs- und Composer-Prüfungen sperren alles andere; sofort anhalten, wenn sie fehlschlagen.
  • Linting/statische Analyse sollten sauber sein, bevor vollständige Tests und Coverage ausgeführt werden.
  • Sicherheits- und Migrationsüberprüfungen erfolgen nach den Tests, damit Sie das Verhalten vor Daten- oder Release-Schritten verifizieren.
  • Build-/Deployment-Bereitschaft und Queue-/Scheduler-Prüfungen sind die letzten Tore; jeder Fehler blockiert das Release.

Phase 1: Umgebungsprüfungen

php -v
composer --version
php artisan --version
  • Überprüfen, ob .env vorhanden ist und erforderliche Schlüssel existieren
  • Bestätigen, dass APP_DEBUG=false für Produktionsumgebungen
  • Bestätigen, dass APP_ENV dem Ziel-Deployment (production, staging) entspricht

Wenn lokal Laravel Sail verwendet wird:

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

Phase 1.5: Composer und Autoload

composer validate
composer dump-autoload -o

Phase 2: Linting und statische Analyse

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

Wenn Ihr Projekt Psalm anstelle von PHPStan verwendet:

vendor/bin/psalm

Phase 3: Tests und Coverage

php artisan test

Coverage (CI):

XDEBUG_MODE=coverage php artisan test --coverage

CI-Beispiel (Format -> statische Analyse -> Tests):

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

Phase 4: Sicherheits- und Abhängigkeitsprüfungen

composer audit

Phase 5: Datenbank und Migrationen

php artisan migrate --pretend
php artisan migrate:status
  • Destruktive Migrationen sorgfältig prüfen
  • Sicherstellen, dass Migrationsdateinamen dem Schema Y_m_d_His_* folgen (z. B. 2025_03_14_154210_create_orders_table.php) und die Änderung klar beschreiben
  • Sicherstellen, dass Rollbacks möglich sind
  • down()-Methoden überprüfen und irreversiblen Datenverlust ohne explizite Backups vermeiden

Phase 6: Build- und Deployment-Bereitschaft

php artisan optimize:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache
  • Sicherstellen, dass Cache-Warmups in der Produktionskonfiguration erfolgreich sind
  • Überprüfen, ob Queue-Worker und Scheduler konfiguriert sind
  • Bestätigen, dass storage/ und bootstrap/cache/ in der Zielumgebung beschreibbar sind

Phase 7: Queue- und Scheduler-Prüfungen

php artisan schedule:list
php artisan queue:failed

Wenn Horizon verwendet wird:

php artisan horizon:status

Wenn queue:monitor verfügbar ist, damit den Rückstau prüfen, ohne Jobs zu verarbeiten:

php artisan queue:monitor default --max=100

Aktive Verifikation (nur Staging): Einen No-Op-Job in eine dedizierte Queue senden und einen einzelnen Worker ausführen, um ihn zu verarbeiten (stellen Sie sicher, dass eine Nicht-sync-Queue-Verbindung konfiguriert ist).

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

Überprüfen, ob der Job den erwarteten Nebeneffekt erzeugt hat (Logeintrag, Tabellenzeile im Healthcheck oder Metrik).

Dies nur in Nicht-Produktionsumgebungen ausführen, in denen die Verarbeitung eines Test-Jobs sicher ist.

Beispiele

Minimaler Ablauf:

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-ähnliche 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

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

Verwandte Skills