Agent skill

PHP Pro

by Jeffallan in Jeffallan/claude-skills

Writes strictly typed modern PHP 8.3+ for Laravel, Symfony and plain projects, with PHPStan level 9, PHPUnit or Pest tests, typed DTOs and secure defaults.

MITAuto-check: notesBackend & APIs

Install PHP Pro

skills CLI
$ npx skills add Jeffallan/claude-skills --skill php-pro -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Jeffallan/claude-skills php-pro --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/php-pro .claude/skills/php-pro && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
php-pro
GitHub stars
12k
Token cost
~1.6k tokens
SKILL.md length
326 words
Files
6 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

Writes strictly typed modern PHP 8.3+ for Laravel, Symfony and plain projects, with PHPStan level 9, PHPUnit or Pest tests, typed DTOs and secure defaults.

  • Works in 5 steps: Analyze architecture — Review framework,… → Design models — Create typed domain… → Implement — Write strict-typed code with… → …
  • Writing strictly typed PHP 8.3 services, DTOs and value objects
  • SKILL.md covers Core Workflow, Reference Guide, Constraints and Code Patterns, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The agent reviews the framework, PHP version and dependencies, designs typed domain models, value objects and DTOs, implements with strict types, PSR compliance, dependency injection and repositories, and adds validation, authentication and protection against XSS and SQL injection. Verification runs PHPStan at level 9 and fixes every error, then PHPUnit or Pest with coverage of 80% or more. Work is delivered only when both pass clean.

The rules require declare(strict_types=1), type hints everywhere, PSR-12, readonly properties and dependency injection over global state. They forbid mixed types, plain-text passwords, injectable SQL, business logic in controllers and var_dump in production. Reference files cover modern PHP features, Laravel and Symfony patterns, async PHP with Swoole, ReactPHP and fibers, and testing tools. Each complete change delivers a typed entity or DTO, a service class and a test.

When your agent uses it

  • Writing strictly typed PHP 8.3 services, DTOs and value objects
  • Adding PHPStan level 9 and fixing the errors it reports
  • Building Laravel or Symfony features with dependency injection
  • Writing PHPUnit or Pest tests with coverage goals
  • Experimenting with async PHP using Swoole or ReactPHP

Example prompts

  • “Create a readonly OrderDto and a typed service that builds it from the request payload.”
  • “Run PHPStan at level 9 on src/ and fix everything it reports.”
  • “Add a Symfony voter for editing posts and a PHPUnit test that covers it.”
  • “Rewrite this global-state config helper to use constructor injection.”

Requirements

  • PHP 8.3 or later with Composer
  • PHPStan and PHPUnit or Pest

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Analyze architecture — Review framework, PHP version, dependencies, and patterns
  2. Design models — Create typed domain models, value objects, DTOs
  3. Implement — Write strict-typed code with PSR compliance, DI, repositories
  4. Secure — Add validation, authentication, XSS/SQL injection protection
  5. Verify — Run vendor/bin/phpstan analyse --level=9; fix all errors before proceeding. Run vendor/bin/phpunit or vendor/bin/pest; enforce…

What it can do on your machine

Read from SKILL.md and the folder at commit 1be15d8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are php).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • synergetic.solutions
    • jeffallan.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

PHP Pro loads about 1.6k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 121 tokens; SKILL.md has 326 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~121
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:58
    - Hardcode configuration (use .env)

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Jeffallan/claude-skills at commit 1be15d8, republished under its MIT licence (© Jeffallan). 326 words, ~1,560 tokens.

Download SKILL.mdSave it as .claude/skills/php-pro/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
php-pro
description
Use when building PHP applications with modern PHP 8.3+ features, Laravel, or Symfony frameworks. Invokes strict typing, PHPStan level 9, async patterns with Swoole, and PSR standards. Creates controllers, configures middleware, generates migrations, writes PHPUnit/Pest tests, defines typed DTOs and value objects, sets up dependency injection, and scaffolds REST/GraphQL APIs. Use when working with Eloquent, Doctrine, Composer, Psalm, ReactPHP, or any PHP API development.
license
MIT
metadata.author
https://github.com/Jeffallan
metadata.company
https://synergetic.solutions
metadata.version
1.1.0
metadata.domain
language
metadata.triggers
PHP, Laravel, Symfony, Composer, PHPStan, PSR, PHP API, Eloquent, Doctrine
metadata.role
specialist
metadata.scope
implementation
metadata.output-format
code
metadata.related-skills
fullstack-guardian, fastapi-expert

PHP Pro

Senior PHP developer with deep expertise in PHP 8.3+, Laravel, Symfony, and modern PHP patterns with strict typing and enterprise architecture.

Core Workflow

  1. Analyze architecture — Review framework, PHP version, dependencies, and patterns
  2. Design models — Create typed domain models, value objects, DTOs
  3. Implement — Write strict-typed code with PSR compliance, DI, repositories
  4. Secure — Add validation, authentication, XSS/SQL injection protection
  5. Verify — Run vendor/bin/phpstan analyse --level=9; fix all errors before proceeding. Run vendor/bin/phpunit or vendor/bin/pest; enforce 80%+ coverage. Only deliver when both pass clean.

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Modern PHPreferences/modern-php-features.mdReadonly, enums, attributes, fibers, types
Laravelreferences/laravel-patterns.mdServices, repositories, resources, jobs
Symfonyreferences/symfony-patterns.mdDI, events, commands, voters
Async PHPreferences/async-patterns.mdSwoole, ReactPHP, fibers, streams
Testingreferences/testing-quality.mdPHPUnit, PHPStan, Pest, mocking

Constraints

MUST DO
  • Declare strict types (declare(strict_types=1))
  • Use type hints for all properties, parameters, returns
  • Follow PSR-12 coding standard
  • Run PHPStan level 9 before delivery
  • Use readonly properties where applicable
  • Write PHPDoc blocks for complex logic
  • Validate all user input with typed requests
  • Use dependency injection over global state
MUST NOT DO
  • Skip type declarations (no mixed types)
  • Store passwords in plain text (use bcrypt/argon2)
  • Write SQL queries vulnerable to injection
  • Mix business logic with controllers
  • Hardcode configuration (use .env)
  • Deploy without running tests and static analysis
  • Use var_dump in production code

Code Patterns

Every complete implementation delivers: a typed entity/DTO, a service class, and a test. Use these as the baseline structure.

Readonly DTO / Value Object
php
<?php

declare(strict_types=1);

namespace App\DTO;

final readonly class CreateUserDTO
{
    public function __construct(
        public string $name,
        public string $email,
        public string $password,
    ) {}

    public static function fromArray(array $data): self
    {
        return new self(
            name: $data['name'],
            email: $data['email'],
            password: $data['password'],
        );
    }
}
Typed Service with Constructor DI
php
<?php

declare(strict_types=1);

namespace App\Services;

use App\DTO\CreateUserDTO;
use App\Models\User;
use App\Repositories\UserRepositoryInterface;
use Illuminate\Support\Facades\Hash;

final class UserService
{
    public function __construct(
        private readonly UserRepositoryInterface $users,
    ) {}

    public function create(CreateUserDTO $dto): User
    {
        return $this->users->create([
            'name'     => $dto->name,
            'email'    => $dto->email,
            'password' => Hash::make($dto->password),
        ]);
    }
}
PHPUnit Test Structure
php
<?php

declare(strict_types=1);

namespace Tests\Unit\Services;

use App\DTO\CreateUserDTO;
use App\Models\User;
use App\Repositories\UserRepositoryInterface;
use App\Services\UserService;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

final class UserServiceTest extends TestCase
{
    private UserRepositoryInterface&MockObject $users;
    private UserService $service;

    protected function setUp(): void
    {
        parent::setUp();
        $this->users   = $this->createMock(UserRepositoryInterface::class);
        $this->service = new UserService($this->users);
    }

    public function testCreateHashesPassword(): void
    {
        $dto  = new CreateUserDTO('Alice', 'alice@example.com', 'secret');
        $user = new User(['name' => 'Alice', 'email' => 'alice@example.com']);

        $this->users
            ->expects($this->once())
            ->method('create')
            ->willReturn($user);

        $result = $this->service->create($dto);

        $this->assertSame('Alice', $result->name);
    }
}
Enum (PHP 8.1+)
php
<?php

declare(strict_types=1);

namespace App\Enums;

enum UserStatus: string
{
    case Active   = 'active';
    case Inactive = 'inactive';
    case Banned   = 'banned';

    public function label(): string
    {
        return match($this) {
            self::Active   => 'Active',
            self::Inactive => 'Inactive',
            self::Banned   => 'Banned',
        };
    }
}

Output Templates

When implementing a feature, deliver in this order:

  1. Domain models (entities, value objects, enums)
  2. Service/repository classes
  3. Controller/API endpoints
  4. Test files (PHPUnit/Pest)
  5. Brief explanation of architecture decisions

Knowledge Reference

PHP 8.3+, Laravel 11, Symfony 7, Composer, PHPStan, Psalm, PHPUnit, Pest, Eloquent ORM, Doctrine, PSR standards, Swoole, ReactPHP, Redis, MySQL/PostgreSQL, REST/GraphQL APIs

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

© Jeffallan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/php-pro of Jeffallan/claude-skills.

  • SKILL.md
  • references/async-patterns.md
  • references/laravel-patterns.md
  • references/modern-php-features.md
  • references/symfony-patterns.md
  • references/testing-quality.md

Open the folder on GitHubat commit 1be15d8

Compare with similar skills

PHP Pro next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PHP Pro compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PHP Pro this skillJeffallan/claude-skills12k—~1.6kAutomated safety check: NotesMIT
Laravel Clean ArchitectureHoangNguyen0403/agent-skills-standard571—~913Automated safety check: PassMIT
Sentry Php SDKgetsentry/sentry-for-ai268—~3.7kAutomated safety check: NotesApache-2.0
Php ProAratKruglik/claude-laravel155—~984Automated safety check: NotesNone
Php Rulessoftspark/ai-toolkit179—~3.8kAutomated safety check: NotesApache-2.0
Php Framework Auditwgpsec/AboutSecurity1.8k—~767Automated safety check: NotesNone

Similar skills

  • Laravel Clean Architecture

    HoangNguyen0403/agent-skills-standard

    Implement Domain-Driven Design with typed DTOs, repository interfaces, and single-responsibility Action classes in Laravel.

    571 GitHub stars~913 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Sentry Php SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for PHP. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~3.7k tokensUpdated yesterday
    Backend & APIsAuto-check: notes
  • Php Pro

    AratKruglik/claude-laravel

    A skill your agent uses when building PHP applications with modern PHP 8.3+ features, Laravel, or Symfony frameworks.

    155 GitHub stars~984 tokensUpdated 5 mo ago
    Backend & APIsAuto-check: notes
  • Php Rules

    softspark/ai-toolkit

    PHP coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~3.8k tokensUpdated yesterday
    Backend & APIsAuto-check: notes
  • Php Framework Audit

    wgpsec/AboutSecurity

    PHP 框架特定安全审计。当在 PHP 白盒审计中已识别目标使用特定框架、 需要检查框架特有安全机制和常见配置缺陷时触发。

    1.8k GitHub stars~767 tokensUpdated 4 days ago
    Backend & APIsAuto-check: notes
  • Pest Testing

    liberusoftware/real-estate-laravel

    A skill your agent uses for Pest PHP testing in Laravel projects only.

    112 GitHub starsUsed in 1 repo~1.8k tokens
    Testing & QAAuto-check passed

More from Jeffallan/claude-skills

All 58 skills in this repo
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Auto-check passed
  • CLI Developer

    Jeffallan/claude-skills

    Walks through designing, building and polishing a command-line tool: user workflow and command hierarchy, implementation in commander, click, typer or cobra, completions and cross-platform testing.

    12k GitHub starsUsed in 2 repos~1.2k tokens
    Auto-check passed
  • Fine-Tuning Expert

    Jeffallan/claude-skills

    Guides LLM fine-tuning with LoRA and QLoRA through Hugging Face PEFT, from dataset validation and training checks to adapter merging, quantization and deployment.

    12k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • GraphQL Architect

    Jeffallan/claude-skills

    Designs GraphQL schemas and Apollo Federation graphs, with DataLoader resolvers, subscriptions, query complexity limits and caching.

    12k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Kubernetes Specialist

    Jeffallan/claude-skills

    Creates and checks Kubernetes manifests, Helm charts, RBAC and network policies, and helps debug pod problems, with kubectl checks and rollback steps.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Laravel Specialist

    Jeffallan/claude-skills

    Builds Laravel 10+ applications with Eloquent models, Sanctum authentication, Horizon queues, API resources and Livewire components, tested with Pest or PHPUnit.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed

Questions about PHP Pro

What does PHP Pro do?

Writes strictly typed modern PHP 8.3+ for Laravel, Symfony and plain projects, with PHPStan level 9, PHPUnit or Pest tests, typed DTOs and secure defaults. The agent reviews the framework, PHP version and dependencies, designs typed domain models, value objects and DTOs, implements with strict types, PSR compliance, dependency injection and repositories, and adds validation, authentication and protection against XSS and SQL injection. Verification runs PHPStan at level 9 and fixes every error, then PHPUnit or Pest with coverage of 80% or more.

When should I use PHP Pro?

PHP Pro fits situations like: writing strictly typed PHP 8.3 services, DTOs and value objects; adding PHPStan level 9 and fixing the errors it reports; building Laravel or Symfony features with dependency injection; writing PHPUnit or Pest tests with coverage goals.

How do I install PHP Pro in Claude Code?

Run `npx skills add Jeffallan/claude-skills --skill php-pro -a claude-code`. Or copy the skill folder (skills/php-pro in Jeffallan/claude-skills) into .claude/skills/php-pro in your project. Claude Code loads it when a task matches its description.

How do I install PHP Pro in Codex?

Run `npx skills add Jeffallan/claude-skills --skill php-pro -a codex`. Or copy the skill folder (skills/php-pro in Jeffallan/claude-skills) into .agents/skills/php-pro in your project. Codex loads it when a task matches its description.

Can I use PHP Pro in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Jeffallan/claude-skills --skill php-pro -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/php-pro, .gemini/skills/php-pro, .github/skills/php-pro and .opencode/skills/php-pro in your project.

What does PHP Pro need to run?

SKILL.md names no scripts, command-line tools or credentials: PHP Pro is instructions for the agent only. Our summary lists: PHP 8.3 or later with Composer; PHPStan and PHPUnit or Pest.

Does PHP Pro access the network?

SKILL.md names 3 domains. As links in the text: github.com, synergetic.solutions and jeffallan.github.io. This is read from the text; nothing was executed.

Is PHP Pro safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does PHP Pro use?

PHP Pro is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PHP Pro use?

About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to PHP Pro?

Skills that share tags, products or a category with PHP Pro: Laravel Clean Architecture (HoangNguyen0403/agent-skills-standard, 571 stars), Sentry Php SDK (getsentry/sentry-for-ai, 268 stars), Php Pro (AratKruglik/claude-laravel, 155 stars) and Php Rules (softspark/ai-toolkit, 179 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PHP Pro?

Jeffallan (a GitHub user) maintains it in Jeffallan/claude-skills, which has 11,767 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 3, 2026.

Source: Jeffallan/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.