rules-php

Community

PHP rules for strict, spec-driven coding

AuthorNSObjects
Version1.0.0
Installs0

System Documentation

What problem does it solve?

PHP development lacks explicit, PHP-specific guardrails for naming, strict typing, error handling, SQL safety, and testing when only universal rules are applied, and this skill layers those expectations on top.

Core Features & Use Cases

  • Overrides naming conventions, function size, file organization, and formatting to match PSR-12, PSR-4 autoloading, and declare(strict_types=1) requirements.
  • Captures type system requirements by mandating strict types, nullable management, union and intersection types, enums, exception-based error handling, and diligent resource cleanup.
  • Covers testing with PHPUnit or Pest, SQL injection prevention through PDO or ORM use, dependency injection best practices, and a reviewer checklist that catches missing strict typing, loose comparisons, or insecure queries.
  • Use Case: Run this skill before approving a PHP pull request to ensure classes, functions, SQL, and dependencies all honor PHP's modern conventions.

Quick Start

Apply the rules-php skill to audit my PHP changes for PSR-12 naming, strict typing, and prepared statements.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: rules-php
Download link: https://github.com/NSObjects/specpowers/archive/main.zip#rules-php

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.