rector-developer

Automates building Rector PHP rules that transform PHP code via PHP-Parser AST.

5|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/SanderMuller/laravel-fluent-validation-rector --skill rector-developer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rector-developer
Source: https://github.com/SanderMuller/laravel-fluent-validation-rector/tree/main/.ai/skills/rector-developer
Command: npx skills add https://github.com/SanderMuller/laravel-fluent-validation-rector --skill rector-developer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the creation and maintenance of Rector PHP rules to safely transform code using the PHP-Parser AST and Rector's abstraction layers.

Core Features & Use Cases

  • Rule skeletons and best practices for converting PHP code via AbstractRector
  • Built-in guidance for PHP version gating, configurability, and Rector registration
  • Practical examples for migrating codebases with automated refactors

Quick Start

Create a new Rector rule by extending AbstractRector, implement the required methods, and register the rule in rector.php.

Frequently Asked Questions about rector-developer

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

FAQPage Schema
How do I create a custom Rector rule to refactor PHP code?

Build a Rector rule by extending AbstractRector to transform PHP code via the PHP-Parser AST, ensuring proper rule skeleton creation, PHP version gating, and registration in rector.php for safe codebase migrations.

What is the best way to generate a Rector rule skeleton for PHP migrations?

Generate a Rector rule skeleton by extending AbstractRector to transform code via the PHP-Parser AST. This ensures consistent migrations by handling configurability, PHP version gating, and proper Rector registration.

Do I need PHP-Parser AST knowledge to write custom Rector rules?

Yes, writing Rector rules requires understanding the PHP-Parser AST to transform PHP code correctly. This approach ensures consistent migrations by handling rule skeletons, version gating, and proper registration.

How do I configure PHP version gating in a Rector refactor rule?

Configure PHP version gating in a Rector refactor rule by applying built-in guidance during rule generation. This ensures automated code transformations target the correct PHP version requirements for safe migrations.

Can I automate codebase migrations using Rector rules?

Yes, you can automate codebase migrations by generating Rector rules that transform PHP code via the PHP-Parser AST. This ensures consistent automated refactors by handling rule skeletons, configurability, and Rector registration.

Why should I use AbstractRector for PHP code refactoring?

Use AbstractRector for PHP code refactoring to safely transform code via the PHP-Parser AST. It provides the foundational structure for rule skeletons, ensuring configurability, PHP version gating, and proper Rector registration.