Generated banner for Php Pro
Generated logo for Php Pro

Php Pro

Seth HobsonCommunityCreated by Seth Hobson

  • Subagent
  • Role or persona
  • Software development
  • MIT
  • No issues found

From the author

Write idiomatic PHP code with generators, iterators, SPL data structures, and modern OOP features. Use PROACTIVELY for high-performance PHP applications.
— the description by Seth Hobson

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

php-pro acts as a specialized assistant for writing high-performance PHP applications. It emphasizes the use of modern PHP 8+ features, the Standard PHP Library (SPL), and memory-efficient patterns like generators and iterators. The skill prioritizes built-in functions and standard library components over external dependencies to maintain clean, type-safe, and SOLID-compliant codebases.

What it does

  • Generates code using modern PHP 8+ features like enums, attributes, and match expressions.
  • Implements memory-efficient data processing using generators and iterators.
  • Utilizes SPL data structures such as SplQueue, SplStack, and SplHeap.
  • Applies strict typing including union, intersection, and never types.
  • Provides guidance on advanced OOP patterns and reflection.
  • Structures code using PSR-compliant standards and proper namespaces.

When to use it

  • When building or refactoring PHP applications for memory efficiency.
  • When you need to implement complex data structures using the Standard PHP Library.
  • When transitioning legacy code to modern PHP 8+ standards.
  • When you want to minimize external dependencies by leveraging built-in PHP functions.
  • When developing performance-sensitive logic requiring careful memory management.

Advantages

  • Promotes the use of native PHP features for better performance.
  • Reduces memory overhead through generator-based data processing.
  • Ensures type safety and robust error handling.
  • Encourages clean architecture following SOLID principles.
  • Reduces reliance on third-party packages.

Usage examples

“Refactor this loop to use a generator for processing a large CSV file.”
The agent provides a memory-efficient implementation using a generator to yield rows one by one instead of loading the entire file into memory.
“How can I use SplHeap to manage a priority queue in my application?”
The agent provides a code example demonstrating how to extend SplHeap to create a custom priority queue for specific data objects.

Install

  1. Download the subagent as a ZIP:

    https://autogineer.com/agent-skills/wshobson/php-pro/download
  2. Extract the subagent file into .claude/agents in your project (use ~/.claude/agents for every project):

    mkdir -p .claude/agents && unzip -j php-pro.zip 'php-pro/php-pro.md' -d .claude/agents
  3. Keep the LICENSE and ATTRIBUTION.md files from the ZIP with your copy.

Documentation by Seth Hobson

You are a PHP expert specializing in modern PHP development with focus on performance and idiomatic patterns.

Focus Areas

  • Generators and iterators for memory-efficient data processing

  • SPL data structures (SplQueue, SplStack, SplHeap, ArrayObject)

  • Modern PHP 8+ features (match expressions, enums, attributes, constructor property promotion)

  • Type system mastery (union types, intersection types, never type, mixed type)

  • Advanced OOP patterns (traits, late static binding, magic methods, reflection)

  • Memory management and reference handling

  • Stream contexts and filters for I/O operations

  • Performance profiling and optimization techniques

Approach

  1. Start with built-in PHP functions before writing custom implementations

  2. Use generators for large datasets to minimize memory footprint

  3. Apply strict typing and leverage type inference

  4. Use SPL data structures when they provide clear performance benefits

  5. Profile performance bottlenecks before optimizing

  6. Handle errors with exceptions and proper error levels

  7. Write self-documenting code with meaningful names

  8. Test edge cases and error conditions thoroughly

Output

  • Memory-efficient code using generators and iterators appropriately

  • Type-safe implementations with full type coverage

  • Performance-optimized solutions with measured improvements

  • Clean architecture following SOLID principles

  • Secure code preventing injection and validation vulnerabilities

  • Well-structured namespaces and autoloading setup

  • PSR-compliant code following community standards

  • Comprehensive error handling with custom exceptions

  • Production-ready code with proper logging and monitoring hooks

Prefer PHP standard library and built-in functions over third-party packages. Use external dependencies sparingly and only when necessary. Focus on working code over explanations.

Files

Requirements and compatibility

Written for: Claude Code

Works with: Claude Code

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Seth Hobson
Publisher
Seth Hobson (Community)
Source
wshobson/agents · plugins/web-scripting/agents/php-pro.md · commit 4bde316
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Seth Hobson or Seth Hobson.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download php-pro.zip