spatie/guidelines-skills
Spatie’s battle-tested coding guidelines packaged as AI skills for Laravel Boost and skills.sh. Includes skills for Laravel/PHP, JavaScript, version control, and security, helping teams apply consistent conventions and best practices.
skills.sh (CLI-based), ensuring compatibility with modern Laravel DX improvements. Avoids reinventing wheel for teams already invested in Spatie’s other packages (e.g., laravel-permission).spatie-security for compliance, spatie-version-control for GitOps). Reduces risk of over-engineering for smaller teams..boost/skills.json). Critical for teams with legacy codebases or niche requirements (e.g., custom naming conventions).whereHas() instead of join() for this query"), reducing manual review cycles by 20–40% (per Spatie’s benchmarks).| Risk Category | Assessment | Mitigation Strategy |
|---|---|---|
| Tooling Dependency | Requires Laravel Boost or skills.sh for full functionality. Boost is in early access (Laravel 12+ only), which may introduce instability or breaking changes. |
Pilot with skills.sh (more mature) before committing to Boost. Monitor Laravel Boost’s GitHub for stability updates. |
| Skill Conflicts | Predefined skills may conflict with team-specific guidelines (e.g., custom security policies, legacy naming). Overrides require manual configuration. | Audit existing conventions before adoption. Use skills.sh’s --ignore flag for conflicts. Document exceptions in CONTRIBUTING.md. |
| Performance Overhead | Real-time IDE feedback (e.g., VS Code) may introduce latency for large codebases or slow machines. CLI checks (skills.sh lint) add CI/CD overhead. |
Benchmark impact in staging. Exclude non-critical paths (e.g., node_modules) from checks. Use --parallel flag in CI for faster execution. |
| Maintenance Burden | Skills require periodic updates (e.g., composer update spatie/guidelines-skills). Outdated skills may miss new vulnerabilities or standards (e.g., PHP 8.3 features). |
Schedule quarterly updates (aligned with Spatie’s release cycle). Use boost:update to automate. Monitor Spatie’s changelog for breaking changes. |
| Adoption Resistance | Developers may resist automated enforcement, viewing it as "opinionated" or "overly strict." Cultural shift required for teams used to manual reviews. | Pilot with opt-in enforcement (e.g., --dry-run mode). Highlight productivity gains (e.g., "This saves 2 hours/week in PR reviews"). Pair with training sessions on Spatie’s guidelines. |
| Security False Positives | spatie-security may flag legitimate patterns as vulnerabilities (e.g., custom auth logic). Requires manual review for edge cases. |
Configure whitelists for known exceptions (e.g., allowed_functions: ["mysql_real_escape_string"]). Use skills.sh audit --verbose to review false positives. |
| CI/CD Integration | CLI checks (skills.sh lint) must be properly gated in pipelines to avoid flaky builds. Misconfiguration could block merges unnecessarily. |
Start with warning-only mode in CI, then enforce. Use skills.sh lint --fix to auto-correct non-critical issues. Monitor failure rates and adjust thresholds. |
Team Alignment:
Tooling Maturity:
skills.sh for stability? What’s the backup plan if Boost introduces breaking changes?Security and Compliance:
Scalability:
Long-Term Viability:
Resource Impact:
Primary Use Case: Laravel 12+ applications leveraging Laravel Boost or skills.sh for AI-driven/CLI-based developer tooling.
Secondary Use Case: PHP/JavaScript projects using Composer and seeking standardized conventions without framework lock-in.
Compatibility Matrix:
| Component | Supported Versions | Notes |
|---|---|---|
| Laravel | 12.x+ | Requires Boost for full AI integration. |
| PHP | 8.1+ | Skills include PHP 8.x features (e.g., named arguments). |
| JavaScript | ES6+ | Uses Prettier v3+ for formatting. |
| Git | Any | Enforces conventional commits and branch naming. |
| CI/CD | GitHub Actions, GitLab CI | CLI checks (skills.sh lint) can be added to any pipeline. |
| IDEs | VS Code, PhpStorm | Real-time feedback via Boost’s language server. |
Stack Exclusions:
spatie-laravel-php are Laravel-specific (e.g., whereHas() vs. join()). Use spatie-php for generic PHP.Assessment Phase (1–2 weeks):
php-cs-fixer rules).spatie-security + spatie-version-control).Pilot Phase (2–4 weeks):
skills.sh in a single repo (e.g., a microservice).
npx skills add spatie/guidelines-skills
composer require spatie/guidelines-skills --dev
php artisan boost:install
**Gradual Roll
How can I help you explore Laravel packages today?