mcpbeat Sign in

Php Agent Skill

PHP development: code quality, PSR standards, testing with PHPUnit.

6k tokens
context cost
the whole folder, loaded on every use
7
files
instructions only
0
copies elsewhere
how many repositories repackaged it
413
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/notque/vexjoy-agent --skill php

The instruction itself

8 sections, as written by the author

PHP Skill

PHP code quality and testing: strict types, PSR-12 compliance, modern language features, framework idioms, static analysis tooling, and PHPUnit testing patterns.

Reference Loading Table

| Signal | Reference | Size |

|--------|-----------|------|

| union types, intersection types, DNF, enums, readonly, named arguments, match expression, null-safe operator, PHP 8.0, PHP 8.1, PHP 8.2 | references/modern-php-features.md | ~160 lines |

| Laravel, Eloquent, Collections, Service Container, Symfony, DI attributes, Event Dispatcher, framework | references/framework-idioms.md | ~70 lines |

| PHP-CS-Fixer, PHPStan, Psalm, Rector, static analysis, CI, linting, code style, taint analysis | references/quality-tools.md | ~60 lines |

| PHPUnit tests, data providers, mocks, stubs, database testing, HTTP testing, coverage | references/testing-patterns.md | ~120 lines |

| quality review process, phases, PSR-12 enforcement | references/php-quality.md | ~60 lines |

| test writing process, test doubles, Prophecy, database fixtures | references/php-testing.md | ~50 lines |

Loading rule. Read the references whose signals match the task before responding.


Core Rules (Always Apply)

Strict Types Declaration

Every PHP file must begin with declare(strict_types=1). This enforces scalar type coercion rules, catching type errors at call time instead of silently converting values. Omitting it is a code quality defect.

PSR-12 Coding Standard

PSR-12 extends PSR-1 and PSR-2 as the accepted PHP coding style:

  • 4-space indentation, no trailing whitespace
  • One class per file
  • use statements after namespace with a blank line before and after
  • Visibility required on all properties, methods, and constants
  • Opening braces on same line for control structures
  • Opening braces on next line for classes and methods

Phase 1: ASSESS

Determine what kind of PHP work is needed:

| Request type | Load references | Action |

|-------------|----------------|--------|

| Code review | quality refs + quality-tools | Full quality pass |

| Type system question | modern-php-features | Feature-specific guidance |

| Framework patterns | framework-idioms | Idiomatic pattern review |

| Tooling setup | quality-tools | Config and CI guidance |

| Write tests | testing-patterns + php-testing | PHPUnit test authoring |

| Test review | testing-patterns | Test quality review |

Gate: Request classified and relevant references loaded.


Phase 2: EXECUTE

Apply loaded reference knowledge to the user's code or question.

For quality reviews, check:

  • declare(strict_types=1) present
  • PSR-12 compliance
  • Modern PHP features used where appropriate
  • Framework idioms followed (if applicable)
  • Quality tooling configured (if applicable)

For testing work:

  • Use PHPUnit TestCase with test prefix or @test annotation
  • Use @dataProvider for table-driven cases
  • Use createStub() for return values, createMock() for interaction assertions
  • Use DatabaseTransactions (Laravel) or KernelTestCase (Symfony) for database tests
  • Call parent::setUp() first in every setUp() method

Gate: Specific, reference-backed feedback or code provided.


Phase 3: VERIFY

Run the test suite and confirm:

./vendor/bin/phpunit
# For coverage enforcement:
XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-text --coverage-min=80

Gate: All tests pass. Coverage threshold met if configured.

Other skills for the same job

different authors, same section of the catalogue
Performance Testing Review AI Review
by ComeOnOliver
×2

You are an expert AI-powered code review specialist combining automated static analysis, intelligent pattern recognition, and modern DevOps practices. Leverage AI tools (GitHub Copilot, Qodo, GPT-5, C

6k tokens
Ruby Pro
by ComeOnOliver
×2

Write idiomatic Ruby code with metaprogramming, Rails patterns, and performance optimization. Specializes in Ruby on Rails, gem development, and testing frameworks. Use PROACTIVELY for Ruby refactoring, optimization, or complex Ruby features.

3k tokens
Tdd Workflows Tdd Refactor
by ComeOnOliver
×2

Use when working with tdd workflows tdd refactor

4k tokens
Setup Pre Commit
by aiskillstore
×1

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.

7k tokens
Pair Programming
by Microck
×1

AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing. Supports TDD, debugging, refactoring, and learning sessions. Features automatic role switching, continuous code review, security scanning, and performance optimization with truth-score verification.

6k tokens
Audit Prep Assistant
by christophacham
×1

Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes dead code, ensures accessibility, and generates documentation (flowcharts, user stories, inline comments).

2k tokens
Component Refactoring
by ComeOnOliver
×1

Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component --json` shows complexity > 50 or lineCount > 300, when the user asks for code splitting, hook extraction, or complexity reduction, or when `pnpm analyze-component` warns to refactor before testing; avoid for simple/well-structured components, third-party wrappers, or when the user explicitly wants testing without refactoring.

20k tokens
Csharp Pro
by ComeOnOliver
×1

Write modern C# code with advanced features like records, pattern matching, and async/await. Optimizes .NET applications, implements enterprise patterns, and ensures comprehensive testing. Use PROACTIVELY for C# refactoring, performance optimization, or complex .NET solutions.

3k tokens

How to use it

Copy the folder

Take notque/php from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.