Communitygithub.com

라라벨 검증

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

라라벨 검증란 무엇인가요?

이 스킬은 Laravel 프로젝트를 PR 제출 전, 주요 변경 후, 배포 전에 체계적으로 검증하기 위한 완전한 파이프라인을 제공합니다. 환경 및 Composer 점검부터 린팅/정적 분석, 테스트/커버리지, 보안 감사, 데이터베이스 마이그레이션 검토, 최종적으로 큐/스케줄러 점검에 이르기까지 7단계로 구성됩니다. 각 단계는 순차적으로 실행되며, 이전 단계가 실패하면 중단되므로 오류를 조기에 발견할 수 있습니다. Pint, PHPStan, Psalm, Composer 감사, Laravel Horizon 등 다양한 Laravel 도구를 지원하며, 최소 흐름 예제와 CI 스타일 파이프라인 예제도 포함되어 있어 개발 환경에 맞게 쉽게 적용할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/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

작업이 예상된 부작용(로그 항목, 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/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

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.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

관련 스킬