Guidance for writing efficient, type-safe, and modern PHP code using language best practices.

Install

mkdir -p .claude/skills/php-pro && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1434" && unzip -o skill.zip -d .claude/skills/php-pro && rm skill.zip

Installs to .claude/skills/php-pro

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Write idiomatic PHP code with generators, iterators, SPL data
61 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Implement memory-efficient data processing with generators
  • Utilize SPL data structures like SplQueue and SplHeap
  • Apply PHP 8+ features including match expressions and enums
  • Enforce strict typing with union and intersection types
  • Design architecture using traits and reflection

How it works

The skill applies PHP standard library functions and modern language features to refactor code for memory efficiency and type safety. It prioritizes built-in functions over external dependencies to maintain clean architecture.

Inputs & outputs

You give it
Problematic or unoptimized PHP code
You get back
Performance-optimized and PSR-compliant PHP code

When to use php-pro

  • Optimizing memory usage
  • Implementing iterators
  • Applying modern PHP 8 features
  • Refactoring legacy code

About this skill

Use this skill when

  • Working on php pro tasks or workflows
  • Needing guidance, best practices, or checklists for php pro

Do not use this skill when

  • The task is unrelated to php pro
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

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.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

When not to use it

  • Tasks unrelated to PHP development
  • Situations requiring tools outside the PHP domain

Limitations

  • Requires clear task scope definition
  • Does not replace manual testing or environment-specific validation
  • Requires explicit input and success criteria

How it compares

It provides a structured approach to performance profiling and idiomatic pattern application rather than relying on manual trial-and-error refactoring.

Compared to similar skills

php-pro side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
php-pro (this skill)134moNo flagsIntermediate
php-best-practices151moNo flagsBeginner
php-guidelines-from-spatie66moNo flagsBeginner
code-refactor-php-mediawiki02moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

mobile-design

sickn33

Mobile-first design and engineering doctrine for iOS and Android apps. Covers touch interaction, performance, platform conventions, offline behavior, and mobile-specific decision-making. Teaches principles and constraints, not fixed layouts. Use for React Native, Flutter, or native mobile apps.

149231

unity-developer

sickn33

Build Unity games with optimized C# scripts, efficient rendering, and proper asset management. Masters Unity 6 LTS, URP/HDRP pipelines, and cross-platform deployment. Handles gameplay systems, UI implementation, and platform optimization. Use PROACTIVELY for Unity performance issues, game mechanics, or cross-platform builds.

142357

architect-review

sickn33

Master software architect specializing in modern architecture patterns, clean architecture, microservices, event-driven systems, and DDD. Reviews system designs and code changes for architectural integrity, scalability, and maintainability. Use PROACTIVELY for architectural decisions.

109320

angular

sickn33

Modern Angular (v20+) expert with deep knowledge of Signals, Standalone Components, Zoneless applications, SSR/Hydration, and reactive patterns. Use PROACTIVELY for Angular development, component architecture, state management, performance optimization, and migration to modern patterns.

100129

frontend-slides

sickn33

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

95195

minecraft-bukkit-pro

sickn33

Master Minecraft server plugin development with Bukkit, Spigot, and Paper APIs. Specializes in event-driven architecture, command systems, world manipulation, player management, and performance optimization. Use PROACTIVELY for plugin architecture, gameplay mechanics, server-side features, or cross-version compatibility.

9078

Search skills

Search the agent skills registry