- How do I install Spatie’s coding guidelines for Laravel Boost?
- Run `composer require spatie/guidelines-skills --dev` and then execute `php artisan boost:install`. During setup, select Spatie’s guidelines from the list to integrate them into your Laravel 12+ project. This works seamlessly with Boost’s IDE tooling like PHPStan and Pest.
- Can I use these guidelines without Laravel Boost?
- Yes, via `npx skills add spatie/guidelines-skills`. This installs the same rules as a standalone CLI tool for teams not using Laravel Boost. The package supports both workflows but requires Boost for IDE-level enforcement.
- Which Laravel versions support spatie/guidelines-skills?
- The package is designed for Laravel 12+ due to its dependency on Laravel Boost. For CLI-only use via skills.sh, no Laravel version is required, but the guidelines are optimized for modern Laravel/PHP projects using PHP 8.1+.
- Will this replace my existing linters like php-cs-fixer or ESLint?
- No, it complements them. The package enforces Spatie’s conventions (e.g., PSR standards, security rules) via AI-driven tools, while your existing linters handle syntax/formatting. Configure Boost or skills.sh to run alongside them for layered validation.
- How do I customize the guidelines for my team’s specific needs?
- Override defaults by editing the skill configurations in your project’s `boost/` or `skills/` directories. For example, adjust commit message patterns in `spatie-version-control` or modify security rules in `spatie-security`. Document deviations in your team’s onboarding docs.
- Are these guidelines compatible with legacy Laravel projects?
- Partial compatibility. The package enforces modern conventions (e.g., camelCase naming, PSR-12), which may conflict with older codebases. Audit your project first via `php artisan boost:audit` or manually review the [full guidelines](https://spatie.be/guidelines) to identify gaps.
- How do I update the guidelines to the latest version?
- For Laravel Boost, run `composer update spatie/guidelines-skills` followed by `php artisan boost:update`. For skills.sh, use `npx skills add spatie/guidelines-skills` to pull the latest rules. Always back up your project before updating.
- What if the AI guidelines flag false positives in my code?
- Boost and skills.sh allow manual overrides. For Boost, use the IDE’s feedback panel to dismiss warnings or configure exceptions in `boost.json`. For skills.sh, run `npx skills override` to exclude specific files/rules temporarily.
- Does this package work with non-Laravel PHP projects (e.g., Symfony)?
- No, it’s tailored for Laravel’s ecosystem. The `spatie-laravel-php` skill includes Laravel-specific conventions (e.g., Eloquent naming, route handling). For Symfony, consider alternatives like `symfony/flex` or custom PSR-12 rules.
- How do I enforce these guidelines in CI/CD pipelines?
- Add a step to run `php artisan boost:check` (for Boost) or `npx skills check` (for skills.sh) in your pipeline. Configure it to fail builds on violations. Example for GitHub Actions: `php artisan boost:check --fail-on-violations`. Pair with your existing linters for comprehensive validation.