PHP Structured Edit
Edit PHP methods, parameters and expressions with named selectors, typed operations and SHA-256 guards. Supports multi-file batches, format-preserving output and optional canonical printing. Review diffs and run lint/project tests; syntax checks do not prove behavior.
Install
Pick whichever fits your project — they all reach the same skill.
-
Claude Code via this marketplace /plugin install php-structured-edit@netresearch-claude-code-marketplaceInstalls the agent instructions. The PHP editing engine is set up separately:
engine installation guideRequires PHP 8.2+, ext-json and ext-tokenizer. -
npx any Agent Skills CLI npx skills add https://github.com/netresearch/php-ast-edit-skill --skill php-structured-editInstalls the agent instructions. The PHP editing engine is set up separately:
engine installation guideRequires PHP 8.2+, ext-json and ext-tokenizer. -
composer require PHP project, as a package composer config repositories.php-ast-edit vcs https://github.com/netresearch/php-ast-edit-skill.git && composer require --dev --no-plugins --no-scripts netresearch/php-ast-edit-skill:dev-mainInstalls the PHP engine from the development branch with Composer plugins and scripts disabled. For release status and separate skill registration, see
source installation guideNo Packagist publication or plugin activation is required for this engine path. -
composer skills:add PHP project, direct source composer skills:add github:netresearch/php-ast-edit-skillRequires the Composer skill installer and registers the agent instructions. Set up the PHP engine separately:
engine installation guideThe skills:add command does not install the engine dependencies.
What you can do with it
- Edit PHP methods, parameters and expressions with named selectors, typed operations and SHA-256 guards
- Supports multi-file batches, format-preserving output and optional canonical printing
- Review diffs and run lint/project tests; syntax checks do not prove behavior
What you get back
- A guarded source edit, a measured diff, operation effects, accumulated warnings, and separate parser, lint, and project-check statuses. Inspect requests return node ancestry and the source hash; rejected requests return machine-readable errors.
What it expects in your project
- Provide the intended change and any source snapshot used to select targets.
renameaccepts a method symbol; other operations use file paths and selectors or structural refs. The engine requires a writable working tree and the local dependencies above. Project formatting and verification commands are optional configuration.