Php Guidelines From Spatie

🌐Community
by freekmurze · vlatest · Repository

Generates PHP code adhering to Spatie's coding standards and best practices for consistent, maintainable projects.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add php-guidelines-from-spatie npx -- -y @trustedskills/php-guidelines-from-spatie
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "php-guidelines-from-spatie": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/php-guidelines-from-spatie"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill provides a curated set of PHP coding guidelines authored by Freek Van der Herten, ensuring your code aligns with Spatie's internal standards. It helps AI agents generate clean, maintainable, and consistent PHP code that adheres to specific architectural preferences used in popular Laravel packages.

When to use it

  • You are building a new Laravel application and want to match the coding style of well-known open-source projects.
  • Your team needs strict enforcement of Spatie-specific conventions for consistency across multiple developers.
  • You need an AI agent to refactor legacy PHP code into a structure preferred by the Spatie community.

Key capabilities

  • Enforces specific naming conventions and file structures used in Spatie packages.
  • Promotes best practices for dependency injection and service container usage within the Laravel ecosystem.
  • Provides clear rules on how to handle common patterns like collections, events, and database queries.

Example prompts

  • "Generate a PHP model class following the Spatie guidelines from freekmurze."
  • "Refactor this controller to adhere to the coding standards defined in php-guidelines-from-spatie."
  • "Explain how to implement a repository pattern using the specific conventions outlined by Freek Van der Herten."

Tips & gotchas

Ensure your project is already set up with Laravel before applying these guidelines, as they rely heavily on Laravel's service container. Be aware that these rules are specific to Spatie's internal workflow and may differ from other popular PHP standards like PSR-12 if you do not intend to follow their exact architecture.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
freekmurze
Installs
80

🌐 Community

Passed automated security scans.