Php Pro
Seth HobsonCommunityCreated by Seth Hobson
- Subagent
- Role or persona
- Software development
- MIT
- No issues found
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
Download the subagent as a ZIP:
https://mp-staging.autogineer.com/agent-skills/wshobson/php-pro/downloadExtract 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/agentsKeep 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
Start with built-in PHP functions before writing custom implementations
Use generators for large datasets to minimize memory footprint
Apply strict typing and leverage type inference
Use SPL data structures when they provide clear performance benefits
Profile performance bottlenecks before optimizing
Handle errors with exceptions and proper error levels
Write self-documenting code with meaningful names
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
- ATTRIBUTION.mdAdded by AutoGineer953 B
- LICENSELicence file added by AutoGineer1.0 KiB
- php-pro.md2.0 KiB
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.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download php-pro.zip