php-guidelines-from-spatie

Enforce Spatie PHP and Laravel guidelines with typed properties and PSR compliance.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/rokkay/dotfiles-macos --skill php-guidelines-from-spatie-rokkay
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-guidelines-from-spatie
Source: https://github.com/rokkay/dotfiles-macos/tree/main/config/claude/skills/php-guidelines-from-spatie
Command: npx skills add https://github.com/rokkay/dotfiles-macos --skill php-guidelines-from-spatie-rokkay

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This set of guidelines helps developers write cleaner, more maintainable PHP and Laravel code by following Spatie's recommended practices.

Core Features & Use Cases

  • Enforces typed properties, explicit return types, and PSR compliance.
  • Promotes consistent naming, docblocks where needed, and Laravel conventions.
  • Use case: when starting a new Laravel project, apply these rules to ensure readable, high-quality code from the outset.

Quick Start

Apply Spatie PHP and Laravel guidelines to produce clean, maintainable PHP code.

Frequently Asked Questions about php-guidelines-from-spatie

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce typed properties and return types in a Laravel project?

To enforce typed properties and return types in a Laravel project, apply Spatie PHP and Laravel guidelines. This enforces strict typing rules and PSR-12 compliance to ensure consistent, high-quality code across your application.

What are the best practices for maintaining code quality in general PHP codebases?

Best practices for maintaining code quality in PHP codebases include enforcing PSR-1 and PSR-12 compliance, applying typed properties, and adhering to Laravel conventions. Spatie guidelines automate these standards for maintainable code.

Can I use Spatie Laravel guidelines for general PHP codebases outside of Laravel applications?

Yes, you can use Spatie Laravel guidelines for general PHP codebases. The guidelines apply to both Laravel applications and general PHP projects that require consistent style, robust typing, and best practices.

What is the best way to start a new Laravel project with clean code conventions?

The best way to start a new Laravel project with clean code is to apply Spatie PHP and Laravel guidelines from the outset. This enforces naming consistency, docblocks, and explicit return types for readable, maintainable code.

Does following Spatie PHP guidelines require PSR-12 compliance?

Yes, following Spatie PHP guidelines requires PSR-12 compliance. The guidelines specifically enforce PSR-1, PSR-2, and PSR-12 standards alongside Laravel conventions to produce clean, maintainable PHP code.