refactor-entry-point-to-action — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited refactor-entry-point-to-action (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill runs in one of two modes, selected by the caller via MODE (default apply):
Class::method, the orchestration that should move out, the target app/Actions/<Domain>/<ActionName> and Data Validator, and the rule reference. The CR folds these into its Refactoring (DRY / tech debt) section (in-scope) or Refactoring proposals section (out-of-scope). Execution steps 3–11 below apply to MODE=apply only.@rules/refactoring/general.mdc — incremental migration only, never a big-bang rewrite. The Test Coverage Contract in that rule is binding: 100% coverage of the target lines must exist in a dedicated test(scope): cover <area> before refactor commit before the entry-point change lands, and the assertion logic of those tests must remain unchanged through the refactor commit.@rules/php/core-standards.mdc.@rules/laravel/laravel.mdc, @rules/laravel/architecture.mdc, @rules/laravel/filament.mdc, and @rules/laravel/livewire.mdcMODE=apply only), run an internal architecture-first review and fix important findings immediately. In MODE=cr there are no changes — emit the Action-extraction proposal and stop.Always include:
Class::method)Example input:
Refactor entry point <Class::method> in <path> to Action pattern.Keep behavior and response contract unchanged.Create or reuse Action in app/Actions/<Domain>/<ActionName>.php and delegate from the entry point.Respect @rules/laravel/architecture.mdc.$action(...).app/Actions/<Domain>/.final readonly.__invoke(...) with an explicit return type.response() / response()->json() / redirect() / back() / view() and any Response / JsonResponse / RedirectResponse construction in the entry point — the controller stays the owner of client↔server communication. The Action's __invoke() returns a Model / DTO / Collection / scalar / void, and the controller builds the HTTP response from it. This is part of preserving the response contract.instanceof / null / range / amount checks that reject or skip input via throw, return, or continue, plus throw_if() / throw_unless() calls — into a dedicated Data Validator (default location app/DataValidators/<Domain>/, but follow the project's existing convention; Pekral\Arch\DataValidation\DataValidator trait when the package is installed). Data Validators must use validation rules from reusable traits in app/Concerns/.buildPayload() helper) must be extracted into a Data Builder (Pekral\Arch\DataBuilder\DataBuilder trait when the package is installed) that the Action calls.DB:: calls inside the Action.Pekral\Arch\Repository\Mysql\BaseRepository) and writes/updates/deletes in model managers (Pekral\Arch\ModelManager\Mysql\BaseModelManager) / services according to project architecture.batchUpdate, batchInsert) and bulk delete/read patterns (whereIn(...)->delete(), findBy{Attribute}In(...) keyed in memory) over per-row queries (see @rules/sql/optimalize.mdc "Batch over per-row operations"). Per-row queries inside the Action are allowed only when iterations have an unavoidable side-effect dependency that must be justified in a code comment.resources/views/livewire/<...>.blade.php). Walk it against the triggers in @rules/laravel/livewire.mdc HTML / Blade Layout Splitting (repeated markup, >150 Blade lines, self-contained wire:* cluster, self-contained data shape, cross-page reuse, independent loading / empty / error state, distinct named UI concern). For every match, propose the extraction in the refactor plan: name the extracted concern, pick the correct component type per the rule's Component-type decision (Livewire only for stateful / lifecycle / server-interactive blocks; Blade for stateless presentation — never a Livewire wrapper around a pure presentational block), and place the new component under the concern's domain folder (app/Livewire/<Domain>/ or resources/views/components/<domain>/). The extracted children must satisfy the Reusability contract in the rule (typed input, one concern, no business logic, events not parent reach-through, independently renderable, concern-based name). Apply-mode requirement: the extractions must land in a dedicated refactor(scope): split <view> into reusable components commit that follows the Action-extraction commit and respects the Test Coverage Contract in @rules/refactoring/general.mdc in spirit — every rendered branch of the touched view is covered by a Livewire / Blade feature test committed before the layout refactor, and those feature tests stay green through the refactor commit unchanged. PHP --coverage-clover does not measure .blade.php line-by-line, so the binding gate is feature-test parity, not a numeric coverage percentage on the view file. CR-mode requirement: the proposals must be emitted as markdown findings (file:line, concern name, Livewire-vs-Blade choice, target folder, rule reference) and the skill stops without modifying code.`MODE=cr`: perform Read and Map read-only to ground the extraction proposal in the real code; Verify is the read-only audit. Do not modify code.
Reading, mapping, and verifying come first; refactoring comes last. This pre-flight is blocking — do not edit a single line of production code until all three steps pass, and never act on an assumption you have not confirmed by reading the code.
app/Concerns/ traits to reuse instead of reinventing.Only after Read, Map, and Verify are complete may the Test Coverage Gate and the extraction proceed.
`MODE=cr`: run steps 1–2 read-only, then emit the Action-extraction proposal described under Modes and stop — do not run steps 3–12 (they author tests, create files, run fixers, and chain reviews).
@rules/php/core-standards.mdc Testing section). Every line, branch, and condition must already be at 100%. If coverage is below 100% on the target lines, stop and write the missing tests first via @skills/create-test/SKILL.md, then commit them in a dedicated test(scope): cover <area> before refactor commit per @rules/git/general.mdc Allowed Types. The pre-refactor coverage commit and the refactor commit are always two separate commits. Only after the gate is green may the refactor proceed.__invoke(...).app/Concerns/) if needed.$action(...) and keep its public contract unchanged.test(scope): … commit after the refactor. After the refactor commit, re-run the coverage tooling scoped to the changed files and confirm coverage stayed 100% with the pre-existing assertions passing unchanged — a refactored line that is no longer covered signals an untested path to fix, never a number to restore by editing the pre-refactor tests (step 4 of the Test Coverage Contract in @rules/refactoring/general.mdc).build.xml/phing.xml; fall back to Composer scripts in composer.json). Run fixers first, then checkers/analyzers on all changed files. Resolve all reported issues.@skills/code-review/SKILL.md directly in this skill's context, passing the refactor commit range plus the instruction to return Critical / Moderate / Minor findings with their reproducer fields. Do not dispatch the review as a subagent — run it sequentially in the current context.@skills/process-code-review/SKILL.md inline (per its own contract) and fix critical or medium findings before finishing.app/Actions/**.instanceof / null / amount skip-guards and throw_if() / throw_unless()) — extract into a Data Validator.feat(scope): … commit and a separate issue. Apply the Simplicity First rule from @skills/class-refactoring/SKILL.md Refactoring Guidelines and the YAGNI rules in @rules/php/core-standards.mdc Design Principles.`MODE=apply`:
app/Concerns/) when applicable.test(scope): … commit after the refactor.`MODE=cr`: the Action-extraction proposal was emitted as markdown for every qualifying entry point in the diff (entry-point Class::method, orchestration to move out, target Action / Data Validator, rule reference) and no files were created or modified.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.