php-code-review

Applies PHP/Laravel-aware checks to changed files and PRs for code review.

2|Updated Nov 16, 2024
One-click install
npx skills add https://github.com/onairmarc/dotfiles --skill php-code-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: php-code-review
Source: https://github.com/onairmarc/dotfiles/tree/main/.agents/skills/code-review-php
Command: npx skills add https://github.com/onairmarc/dotfiles --skill php-code-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PHP/Laravel projects often suffer from missed framework-specific issues during code reviews. This skill extends the base code-review workflow to PHP/Laravel contexts, enabling targeted checks for Laravel patterns, test coverage gaps, and potential breaking changes.

Core Features & Use Cases

  • Laravel-aware checks identify framework-specific conventions and potential BC breaks in PHP code.
  • Layered review steps add PHP/Laravel-specific rules, cross-file consistency checks, and compatibility with common testing tools.
  • Use Case: Apply this review to a PR containing Laravel code to surface issues that would degrade maintainability or cause runtime errors.

Quick Start

Run the PHP/Laravel code review on the changed PHP files in the current branch.

Frequently Asked Questions about php-code-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate a PHP code review for Laravel repositories?

Automating a PHP code review for Laravel repositories involves applying framework-aware checks to changed files to identify convention violations and potential breaking changes early. This process targets Laravel-specific patterns, cross-file consistency, and test coverage gaps to surface maintainability issues.

How does static analysis with PHPStan integrate into a Laravel code review?

Static analysis with PHPStan integrates into a Laravel code review by adding layered rules that evaluate PHP code against strict type constraints. This mechanism detects runtime errors and quality gaps across changed files before merging, ensuring framework compatibility and structural consistency.

Can I use this to check Laravel test coverage gaps in pull requests?

Yes, you can check Laravel test coverage gaps in pull requests by running framework-aware review steps across changed files. The review evaluates testing tool compatibility and cross-file consistency to surface untested code paths and potential breaking changes.

What is the best way to detect potential breaking changes in PHP code?

The best way to detect potential breaking changes in PHP code is to apply framework-aware checks that analyze cross-file consistency and Laravel conventions. This approach overrides base review steps with specific rules to surface compatibility issues and quality gaps.

Does the Laravel code review work on existing PHP repositories?

The Laravel code review works on existing PHP repositories by detecting Laravel projects and applying targeted review rules to changed files. It evaluates framework conventions, test coverage, and compatibility to provide actionable prompts without requiring manual configuration.

Why does my Laravel code review miss framework-specific convention violations?

A Laravel code review misses framework-specific convention violations when base workflows lack PHP and Laravel-specific rules. Overriding base steps with targeted framework-aware checks identifies these patterns, cross-file inconsistencies, and test coverage gaps to surface breaking changes.