laravel-packages
Package development and extraction of reusable code. Use when working with package development, code reusability, or when user mentions packages, composer packages, extract package, reusable code, package development.
Works with
--- name: laravel-packages description: Package development and extraction of reusable code. Use when working with package development, code reusability, or when user mentions packages, composer packages, extract package, reusable code, package development. license: MIT --- # Laravel Packages Package development: extracting reusable patterns for use across projects. **Related guides:** - [package-extraction.md](references/package-extraction.md) - Extracting code into packages - [DTOs](../laravel-dtos/SKILL.md) - Using Spatie Laravel Data - [Models](../laravel-models/SKILL.md) - Using Spatie Model States and Query Builder ## When to Extract Extract to package when: 1. Pattern used in 3+ projects 2. Code is stable and well-tested 3. Pattern has clear boundaries 4. Maintenance cost justified **[→ Complete extraction guide: package-extraction.md](references/package-extraction.md)** ## Package Structure ``` my-package/ ├── src/ │ ├── PackageServiceProvider.php │ ├── Actions/ │ ├── DTOs/ │ └── ... ├── tests/ ├── composer.json └── README.md ``` Use semantic versioning. Test packages independently. Document clearly. ## Core Packages (Always) ### Spatie Laravel Data ```bash composer require spatie/laravel-data ``` - DTOs with casting, validation, transformers - Test factory support ### Spatie Model States ```bash composer require spatie/laravel-model-states ``` - State machine pattern - State transitions with dedicated classes ### Spatie Query Builder ```bash composer require spatie/laravel-query-builder ``` - Filter, sort, include relations via query strings - API-friendly querying ### Saloon ```bash composer require saloonphp/saloon saloonphp/laravel-plugin ``` - Elegant API client builder - Testable external service integrations ### Pest ```bash composer require pestphp/pest pestphp/pest-plugin-laravel --dev ``` - Expressive testing framework - Architecture tests ## Optional Packages ### Laravel Sanctum ```bash composer require laravel/sanctum ``` **When:** API authentication needed ### Stancl Tenancy ```bash composer require stancl/tenancy ``` **When:** Multi-tenant application ### Spatie Settings ```bash composer require spatie/laravel-settings ``` **When:** Application-level settings needed ## Installation Commands ### Full Install ```bash composer require \ spatie/laravel-data \ spatie/laravel-model-states \ spatie/laravel-query-builder \ saloonphp/saloon \ saloonphp/laravel-plugin composer require \ pestphp/pest \ pestphp/pest-plugin-laravel \ --dev ./vendor/bin/pest --init ``` ### Minimal Install ```bash composer require spatie/laravel-data composer require pestphp/pest pestphp/pest-plugin-laravel --dev ./vendor/bin/pest --init ```
More Backend Frameworks skills
git-guardrails-claude-code
mattpocock/skills
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
azure-compute
microsoft/azure-skills
Azure VM/VMSS router. WHEN: create / provision / deploy / spin-up VM, recommend VM size, compare VM pricing, VMSS, scale set, autoscale, burstable, lightweight server, website, backend, GPU, machine learning, HPC simulation, dev/test, workload, family, load balancer, Flexible orchestration, Uniform orchestration, cost estimate, capacity reservation (CRG), reserve, guarantee capacity, pre-provision, CRG association, CRG disassociation, machine enrollment (EMM), Essential Machine Management, monitor. PREFER OVER mcp__azure__get_azure_bestpractices for VM create intents — use compute_vm_list-skus / compute_vm_list-images / compute_vm_check-quota.
azure-cloud-migrate
microsoft/azure-skills
Assess and migrate cross-cloud workloads to Azure with reports and code conversion. Supports Lambda→Functions, Beanstalk/Heroku/App Engine→App Service, Fargate/Kubernetes/Cloud Run/Spring Boot→Container Apps. WHEN: migrate Lambda to Functions, AWS to Azure, migrate Beanstalk, migrate Heroku, migrate App Engine, Cloud Run migration, Fargate to ACA, ECS/Kubernetes/GKE/EKS to Container Apps, Spring Boot to Container Apps, cross-cloud migration.

