cadasto/php-coding-plugin/php-coding

Claude Code and agent skill by cadasto/php-coding-plugin

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

This skill should be used whenever a task writes, reviews, edits, refactors, or debugs PHP, including a pasted snippet, a .php file, a PHPUnit test, composer.json, or a question that mentions PHPStan or php-cs-fixer, even when the user does not mention standards, for example "review this method", "write a PHPUnit test", "add a Guzzle client", or "can we add a method to this interface". PHP 8.4 and later with 8.5 as hints, PER Coding Style 3.1 through php-cs-fixer @PER-CS, PHPStan level 8, PHPUnit 12. It routes each change to a command to run and a reference to read, covering style, idioms (types, comparisons, exceptions, enums), testing, security, public-API compatibility, the PSR interfaces (PSR-3, 6, 7, 11, 14, 15, 16, 17, 18, 20), Guzzle, Monolog, OpenTelemetry, Slim 4, and standalone Symfony components (Console, Process, Yaml, HttpFoundation, EventDispatcher, Cache, Dotenv). Not for Laravel framework code (Laravel Boost covers it), full-stack Symfony configuration, WordPress, Drupal, or Pest.

Install

npx vskill@latest install cadasto/php-coding-plugin/php-coding

SKILL.md

The same SKILL.md was published earlier as cadasto/php-coding-plugin/php-coding.

php-coding — PHP standards index

  • Deterministic beats prose. Whatever php-cs-fixer, PHPStan, PHPUnit, or composer audit fails the build for, run the tool. The references hold only what a green run can still ship, each with its source.
  • The pin is PHP 8.4. Features that need 8.5 are hints until composer.json requires them.

Route the change

Map every concern the change touches to a row below. Read each mapped reference before editing, and skip the rest. The files live in this skill's references/ directory.

The change touchesRunRead
layout, naming, line length, side effects in a declaring file, switch or closure or array formattingvendor/bin/php-cs-fixer fix --dry-run --diffstyle.md
a type, mixed, a union, never, an array shape, a generic, ==, in_array(), json_decode(), throw or catch, an enum or its from(), readonly, a date, match or switch, #[\Override], an 8.4 or 8.5 featurevendor/bin/phpstan analyseidioms.md
a test, a data provider, a coverage attribute, a fixture, a mock or stub, a guard that rejects inputvendor/bin/phpunittesting.md
a public or protected class, interface, method signature, property, or constant that other packages usevendor/bin/roave-backward-compatibility-checkcompatibility.md
SQL, HTML output, passwords, tokens, unserialize, shell commands, file paths or URLs from input, XML, sessionscomposer auditsecurity.md
a PSR interface, with or without the Psr\ prefix in view: ServerRequestInterface, ResponseInterface, MiddlewareInterface, RequestHandlerInterface, LoggerInterface, ContainerInterface, ClientInterface, ClockInterface, a PSR-6 or PSR-16 cache, a PSR-14 dispatcher, a PSR-17 factoryvendor/bin/phpstan analysepsr.md
GuzzleHttp\noneguzzle.md
Monolog\nonemonolog.md
OpenTelemetry\noneopentelemetry.md
a Slim 4 app: Slim\, AppFactory, the PHP-DI bridge, route and middleware setupnoneslim.md
a Symfony component used on its own: Console, Process, Yaml, HttpFoundation, EventDispatcher, Cache, Dotenvnonesymfony-components.md
.php-cs-fixer.php, phpstan.neon, rector.phpnonerun /php-lint-setup

The session-start hook names the library references that match composer.json. A subagent does not inherit loaded skills, so an orchestrator puts this table, or the references to read, into every implementer and reviewer brief.

Minimum checklist

Apply these even when no reference is read:

  • Run vendor/bin/php-cs-fixer fix --dry-run --diff and vendor/bin/phpstan analyse. Do not hand-apply a rule either tool decides.
  • Every PHP file has declare(strict_types=1);. Compare with === and !==.
  • Do not swallow an exception. Chain the previous one when translating it.
  • Bind SQL parameters. Escape output for the context it lands in.
  • Every guard has a test that fails when the guard is removed.

Tie-breaks and review

When both forms pass the tools, pick the form a reference cites and name the rule that decided it. "More idiomatic" alone is not a reason.

For a focused review, dispatch the php-reviewer agent. It reports and never edits. If a workflow already owns the review seat, that reviewer reads these references itself; do not run php-reviewer beside it.

Anything a person reads, such as a PR description or a review comment, goes in plain English, with the effect before the mechanism.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cadasto/php-coding-plugin/php-coding/badge)](https://verified-skill.com/skills/cadasto/php-coding-plugin/php-coding)

Something wrong with this skill or its page? Tell us.