Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By lufox-digital Verified Orgv2.0.2(MIT AND CC-BY-SA-4.0)In 1 marketplace
Structured PHP edits for coding agents: named selectors, hash-guarded batches, format preservation and explicit validation results.
Claude loads one when your task matches it, or you run it by name.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Select a PHP symbol, apply a typed change, and review the resulting diff. php-ast-edit supports guarded, multi-file transactions, preserves existing formatting by default, and reports the checks it actually ran.
| Name | What it is |
|---|---|
netresearch/php-ast-edit-skill | This repository and Composer package |
php-ast-edit | The PHP command-line editor |
php-structured-edit | Agent instructions and a wrapper for that editor |
In an experimental resolver, AST and verification workflow, a six-file rename in a public PHP project used 90.2% fewer tokens than text edits with a separate checking step — median 12,212 against 124,133.5, counting cache use. The project's 17 existing tests executed on every final result. One tool call instead of 16, two model rounds instead of 13, 16.4 seconds instead of 37.8. All thirty attempts across the three arms produced correct code. This measures that workflow; it does not establish the same savings for the installed skill or the engine's newer project rename implementation.
That figure is two effects, and both are worth knowing separately:
| Editing by symbol instead of by text | −75.5% |
| Letting the tool run the project's checks and report the verdict | −59.9% on top |
What the number is, exactly. Medians of one task, ten repetitions per arm. Combined tokens including cache reads, which are neither priced nor processed like fresh input — the native list price fell 66.4%, not 90.2%. Fresh uncached input barely moved: 92.6% of the difference is cached context the model no longer had to be handed again.
Where it does not hold. At fifty files, plain Phpactor refactoring beat the composed route on tokens, time and cost. A small local rename on Haiku cost 66.6% more. The arithmetic above recomputes in the test suite from the report's own tables, and the raw runs and evidence archive ship with checksums. Every result, including the ones that went the other way, is in Does this save tokens, calls, or time below.
The source checkout below follows development main. Release archives are versioned
snapshots; changes listed as Unreleased require a source checkout until published.
Requirements: PHP 8.2+ with JSON and tokenizer, Composer 2.2+, and Git. The executable example also uses Bash and jq. Installation needs network access; local editing does not.
git clone https://github.com/netresearch/php-ast-edit-skill.git
cd php-ast-edit-skill
composer install --no-interaction
bin/php-ast-edit help
bash docs/quickstart.sh
The example creates a temporary PHP class through the CLI, adds a method using a named selector, checks the return value at runtime, and displays the diff. It removes its temporary files afterwards. No repository-wide formatting setup is required.
Use bin/php-ast-edit inside a source checkout. Use vendor/bin/php-ast-edit when installed into another project through Composer. Installing agent instructions alone does not necessarily install the executable. See installation for Composer VCS, release archives, and skill setup.
Available on development main:
bin/php-ast-edit rename --method 'App\Checkout::submit' --to placeOrder
The command discovers the declaration and submits one guarded transaction. Non-private
methods resolve their hierarchy and callers through the configured Phpactor resolver,
including public methods in final classes. Project checks run through the existing
write pipeline. The default compact report carries the diff, check verdicts and unresolved mentions;
use --report agent when an inline diff is unnecessary.
Use one positional project root as an alias for --path, or use --path explicitly;
do not provide both. --file narrows declaration discovery, and --dry-run previews.
--file does not limit which resolved callers change.
Ambiguous declarations, stale hashes and unresolved reference types are refused.
Private methods retain the lexical scope and its reported limitations. See the
command contract
for options, mocks and verification semantics.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
php-structured-edit@netresearch-claude-code-marketplace is listed by netresearch/claude-code-marketplace — review the source before installing
npx claudepluginhub netresearch/claude-code-marketplace --plugin php-structured-editPlugins from other owners that cover similar ground