php-patterns

Identify and apply PHP design patterns for Laravel, Symfony, and plain PHP projects.

7|1|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/skeletorflet/opencode-kit --skill php-patterns-skeletorflet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-patterns
Source: https://github.com/skeletorflet/opencode-kit/tree/main/.opencode/skills/php-patterns
Command: npx skills add https://github.com/skeletorflet/opencode-kit --skill php-patterns-skeletorflet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides developers to adopt modern PHP patterns and decision-making practices to write maintainable, scalable code, avoiding common anti-patterns and copy-paste errors.

Core Features & Use Cases

  • Decision guidance for framework selection (Laravel, Symfony, or vanilla PHP) and when to apply patterns.
  • Coverage of PHP 8.3 features (attributes, readonly properties, constructor property promotion).
  • Real-world example: refactoring a monolithic module into modular components using PSR standards.

Quick Start

Apply these PHP patterns to an existing Laravel or Symfony project to illustrate best practices.

Frequently Asked Questions about php-patterns

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

FAQPage Schema
How do I apply PHP design patterns to refactor a monolithic module into scalable components?

To apply PHP design patterns for refactoring a monolithic module, you break it into modular components using PSR standards and modern PHP 8.3 features like constructor property promotion. This approach ensures maintainable architecture and clean code separation.

When do I need PHP 8.3 features like readonly properties and attributes for clean code?

You need PHP 8.3 features like readonly properties and attributes when enforcing coding standards and reducing boilerplate in scalable applications. They enforce immutability and declarative metadata mapping, which are core to modern PHP patterns.

Does this approach to PHP patterns work with both Laravel and Symfony frameworks?

Yes, these PHP patterns apply directly to Laravel, Symfony, and plain PHP projects. The decision guidance helps you select the correct framework and apply matching architectural patterns for your specific project requirements.

What is the best way to avoid common anti-patterns and copy-paste errors in PHP development?

The best way to avoid common PHP anti-patterns and copy-paste errors is by adopting modern design patterns and decision-making practices. This ensures your codebase remains maintainable, scalable, and compliant with PSR standards.

How do I enforce PSR standards while implementing modern PHP patterns?

You enforce PSR standards while implementing modern PHP patterns by applying them during the refactoring of monolithic modules into modular components. This integration ensures your architecture remains clean, maintainable, and structurally sound.