Communitygithub.com

laravel-verification

Laravel 프로젝트를 위한 검증 루프: 환경 확인, 린팅, 정적 분석, 커버리지 테스트, 보안 스캔, 배포 준비 상태 확인. 머지 또는 배포 전에 Laravel 프로젝트를 검증할 때 사용하세요 — 린트, 정적 분석, 테스트, 커버리지, 보안.

laravel-verification란 무엇인가요?

Laravel Verification Loop는 Laravel 프로젝트의 PR 병합 전, 주요 변경 후, 배포 전에 전체적인 품질 검증을 수행하는 AI 에이전트 스킬입니다. 환경 검사, Composer 유효성 검사, 린팅(Pint), 정적 분석(PHPStan/Psalm), 테스트(PHPUnit) 및 코드 커버리지, 보안 감사(Composer Audit), 데이터베이스 마이그레이션 검토, 캐시 최적화, 큐 및 스케줄러 확인 등 7단계로 구성된 파이프라인을 순차적으로 실행합니다. 각 단계는 이전 단계의 성공에 의존하며, 실패 시 즉시 중단되어 안전한 배포를 보장합니다. Claude Code, Cursor, Codex 등 모든 AI 에이전트 플랫폼에서 사용할 수 있으며, 최소 실행 명령어 예시와 CI 스타일 파이프라인 예시도 제공합니다.

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

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Laravel 검증 루프

PR 전, 주요 변경 후, 배포 전에 실행하세요.

사용 시기

  • Laravel 프로젝트의 풀 리퀘스트를 열기 전
  • 대규모 리팩토링 또는 의존성 업그레이드 후
  • 스테이징 또는 프로덕션 배포 전 검증
  • 전체 린트 -> 테스트 -> 보안 -> 배포 준비 파이프라인 실행

작동 방식

  • 환경 검사부터 배포 준비까지 단계를 순차적으로 실행하여 각 계층이 이전 계층을 기반으로 구축됩니다.
  • 환경 및 Composer 검사는 다른 모든 작업의 게이트 역할을 하며, 실패 시 즉시 중단됩니다.
  • 린팅/정적 분석은 전체 테스트 및 커버리지를 실행하기 전에 깨끗해야 합니다.
  • 보안 및 마이그레이션 검토는 테스트 후에 수행하여 데이터 또는 릴리스 단계 전에 동작을 검증합니다.
  • 빌드/배포 준비 상태 및 큐/스케줄러 확인은 최종 게이트이며, 실패 시 릴리스를 차단합니다.

1단계: 환경 검사

php -v
composer --version
php artisan --version
  • .env 파일이 존재하고 필수 키가 있는지 확인
  • 프로덕션 환경에서 APP_DEBUG=false 확인
  • APP_ENV가 대상 배포 환경(production, staging)과 일치하는지 확인

로컬에서 Laravel Sail을 사용하는 경우:

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

1.5단계: Composer 및 오토로드

composer validate
composer dump-autoload -o

2단계: 린팅 및 정적 분석

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

프로젝트에서 PHPStan 대신 Psalm을 사용하는 경우:

vendor/bin/psalm

3단계: 테스트 및 커버리지

php artisan test

커버리지 (CI):

XDEBUG_MODE=coverage php artisan test --coverage

CI 예제 (포맷 -> 정적 분석 -> 테스트):

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

4단계: 보안 및 의존성 검사

composer audit

5단계: 데이터베이스 및 마이그레이션

php artisan migrate --pretend
php artisan migrate:status
  • 파괴적인 마이그레이션을 주의 깊게 검토하세요.
  • 마이그레이션 파일 이름이 Y_m_d_His_* 형식(예: 2025_03_14_154210_create_orders_table.php)을 따르고 변경 사항을 명확히 설명하는지 확인하세요.
  • 롤백이 가능한지 확인하세요.
  • down() 메서드를 확인하고 명시적인 백업 없이 되돌릴 수 없는 데이터 손실을 방지하세요.

6단계: 빌드 및 배포 준비

php artisan optimize:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache
  • 프로덕션 구성에서 캐시 웜업이 성공하는지 확인하세요.
  • 큐 워커와 스케줄러가 구성되었는지 확인하세요.
  • 대상 환경에서 storage/와 bootstrap/cache/ 디렉토리에 쓰기 가능한지 확인하세요.

7단계: 큐 및 스케줄러 확인

php artisan schedule:list
php artisan queue:failed

Horizon을 사용하는 경우:

php artisan horizon:status

queue:monitor를 사용할 수 있다면, 작업을 처리하지 않고 백로그를 확인하는 데 사용하세요:

php artisan queue:monitor default --max=100

능동적 확인 (스테이징 전용): 전용 큐에 no-op 작업을 디스패치하고 단일 워커를 실행하여 처리합니다 (sync가 아닌 큐 연결이 구성되어 있는지 확인).

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

작업이 예상된 부작용(로그 항목, 헬스체크 테이블 행 또는 메트릭)을 생성했는지 확인하세요.

테스트 작업을 처리해도 안전한 프로덕션이 아닌 환경에서만 실행하세요.

예제

최소 흐름:

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 스타일 파이프라인:

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.

관련 스킬