Guide · Agent skill
How to use the PHP Pro agent skill: setup and examples
Updated · written with AI from the project's own documentation and checked against our catalogue data
PHP Pro is an agent skill: a folder of instructions and reference notes that an AI coding agent loads when your request matches its description. It is written for building PHP 8.3+ applications with Laravel or Symfony, covering typed code, DTOs, dependency injection, tests and static analysis. This guide shows you how to install it, trigger it with natural requests, and what your project needs before the agent's output is useful.
Quick start
- 1Download the ZIP. Download the php-pro skill ZIP from the skill page on this site.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ in your project.
- 3Or upload in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the skill.
- 4Confirm your project has PHP 8.3+ and Composer. Make sure PHP 8.3 or newer and Composer are available, with dependencies installed.
- 5Install PHPStan and PHPUnit or Pest. Ensure PHPStan and either PHPUnit or Pest are in the project, since the agent calls vendor/bin/phpstan and vendor/bin/phpunit or vendor/bin/pest.
- 6Ask with a specific request. Describe the framework, the feature and the output you want, such as a Laravel service with a PHPUnit test.
- 7Run the checks and review. Run PHPStan at level 9 and your test suite yourself, and have a person review security-sensitive code.
What the php-pro skill makes the agent do
When installed, the agent follows a senior PHP developer playbook. It favours strict typing, readonly value objects and DTOs, dependency injection and PSR coding standards. For a typical feature it produces models, service classes, controllers, and PHPUnit or Pest tests.
The skill tells the agent to run PHPStan at level 9 and to enforce 80% or higher test coverage before delivering. It also loads reference notes on modern PHP features, Laravel, Symfony, async PHP (Swoole, ReactPHP) and testing when the task calls for them.
- Typed code with declare(strict_types=1) and type hints on properties, parameters and returns
- Readonly DTOs and value objects, and enums for fixed sets of values
- Constructor dependency injection and repository or service classes
- Controllers, middleware, migrations and REST or GraphQL endpoint scaffolding
- PHPUnit or Pest tests
Install the php-pro skill
Download the php-pro ZIP from the skill page on this site. Unzip it into one of two locations: ~/.claude/skills/ to make it available across your projects, or a project's .claude/skills/ folder to limit it to that project.
If you use the Claude apps instead, upload the skill under Settings → Capabilities → Skills.
- Personal install: unzip into ~/.claude/skills/
- Project install: unzip into .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload
Trigger the skill with natural requests
You do not need a special command. The skill is meant to load when your request matches its description, which mentions PHP 8.3+, Laravel, Symfony, Eloquent, Doctrine, Composer, PHPStan, PSR and PHP API work. Name the framework and the artefact you want to be specific.
Good prompts state the goal, the framework and the output. For example: a Laravel service that creates users from a typed DTO, with PHPUnit tests. The agent will then deliver its output in a fixed order: domain models, services or repositories, controllers or endpoints, tests, and a short explanation of architecture decisions.
- Create a Laravel controller and form request for user registration with typed validation
- Write a Symfony service with constructor injection and a PHPUnit test for it
- Generate a migration and Eloquent model for an orders table
- Add a readonly DTO and value object for a payment amount, then test it with Pest
- Scaffold a REST endpoint with typed DTOs for a product catalogue
Check your project before you rely on the output
The skill does not run checks itself. It instructs the agent to run commands such as vendor/bin/phpstan analyse --level=9 and vendor/bin/phpunit or vendor/bin/pest. That only works in a PHP project with Composer dependencies installed and PHPStan plus PHPUnit or Pest available in the project.
Run the verification yourself as well. The agent's instructions say to fix all PHPStan errors and to deliver only when both static analysis and tests pass.
- PHP 8.3 or newer and Composer
- PHPStan, and PHPUnit or Pest, installed in the project
- A Laravel or Symfony project for framework-specific guidance
vendor/bin/phpstan analyse --level=9
vendor/bin/phpunitSafety notes: scripts, network and security review
The php-pro skill runs no scripts and uses no network access, according to its files. Its behaviour comes from instructions and reference documents the agent reads. The commands it asks the agent to run are the ones you would run in your own project, so review them before approving.
The skill asserts security practices such as hashing passwords with bcrypt or argon2 and avoiding SQL injection. Those assertions do not replace review. Treat authentication, payments and other security-critical code as needing expert human review before it ships.
- Runs scripts: no
- Uses network: no
- Review all generated authentication, validation and database code by a person
Tips for better results
Give the agent the real project context: the framework version, existing folder layout and the test runner you use. The skill's guidance is framework-specific, so a clear framework name helps it load the right reference notes.
Ask for one feature at a time. Smaller requests make it easier to review the models, services and tests the agent produces, and easier to fix any PHPStan errors it reports.
- Name the framework (Laravel or Symfony) and PHP version in each request
- Say whether you use PHPUnit or Pest
- Ask for tests alongside the code, not afterwards
- Keep the php-pro folder in .claude/skills/ if the team shares one repository
What people use it for
- Building a Laravel service layer with typed DTOs and constructor injection
- Scaffolding a Symfony feature with services, commands or voters and PHPUnit tests
- Adding a Doctrine or Eloquent model with a migration and typed value objects
- Creating REST or GraphQL endpoints in PHP with typed request and response DTOs
- Writing Pest or PHPUnit tests for an existing PHP service class
Frequently asked questions
How do I install the php-pro agent skill?
Download the ZIP from the skill page on this site and unzip it into ~/.claude/skills/ for personal use or into .claude/skills/ in a project. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.
What do I need to use the php-pro skill?
You need PHP 8.3 or newer and Composer, plus PHPStan and either PHPUnit or Pest installed in your project. The guidance is aimed at Laravel or Symfony projects, and the skill itself runs no scripts.
Is the php-pro skill free?
The skill is licensed under MIT, as stated on its source page. Check the licence file in the repository for the full terms.
Does php-pro work with non-PHP projects?
No. The guidance is specific to PHP frameworks and tooling, so it is not suited to non-PHP projects.
Why does the agent say to run phpstan and phpunit but nothing happens?
The skill only tells the agent to run commands like vendor/bin/phpstan and vendor/bin/phpunit. Those commands fail if the project lacks Composer dependencies or the tools are not installed, so install them and run the checks yourself.
Can I trust the security code the skill generates?
Not without review. The skill asserts practices such as hashing passwords with bcrypt or argon2 and avoiding SQL injection, but its output still needs expert human review, especially for security-critical code.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use php-pro if you build or maintain Laravel or Symfony applications and want an AI assistant that follows strict typing, PHPStan level 9 and PHPUnit or Pest discipline. Pick something else if your project is not PHP, or if you expect the skill to run checks or produce security-critical code that needs no review.
Download the skill