Php rules

From softspark/ai-toolkit · View interactive version

Php rules is an AI agent skill from the GitHub repository softspark/ai-toolkit. PHP coding rules: style, patterns, security, testing. Triggers: .php, composer.json, Laravel, Symfony, PHPUnit, PSR-12, Composer.

How to use this skill

Skill file

PHP Rules

These rules come from app/rules/php/ in ai-toolkit. They cover

the project's standards for coding style, frameworks, patterns,

security, and testing in PHP. Apply them when writing or

reviewing PHP code.

PHP Coding Style

Standards

Naming

Type System

Functions

Imports and Namespaces

Error Handling

Configuration

PHP Frameworks

Laravel

Eloquent ORM

Symfony

Doctrine ORM

Symfony Serializer

API Platform

Livewire (Laravel)

Queues and Workers

PHP Patterns

Error Handling

Enums and Value Objects

Repository Pattern

Service Layer

Collections and Iterators

Async Patterns

Event-Driven

Anti-Patterns

PHP Security

SQL Injection

XSS Prevention

CSRF Protection

Authentication

Authorization

File Upload

Mass Assignment

Secrets and Configuration

PHP Testing

Framework

File Naming

Structure (PHPUnit)

Structure (Pest)

Assertions

Mocking (Mockery)

Laravel Testing

Best Practices

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.