bylonsdale201· 59 skills
Compose better-data DTOs with the better-route library — use BetterRouteBridge::{get, post, put, patch, delete} to register a REST route that hydrates the request into a DTO, validates, calls the handler with (DataObject, mixed $request), and presents returned DataObject values through Presenter with PresentationContext::rest(). Contract — the bridge is method-name based (duck-types Router / RouteBuilder) so better-data takes no hard Composer dependency on better-route. URL-owned fields go into routeFields option — those are merged from URL params AND rejected from JSON / body / query buckets via RequestParamCollisionException; this is the route-side equivalent of RequestSource::noCollision. Use when wiring DTO-backed REST endpoints, feeding DTO schemas into better-route's OpenAPI exporter, or moving request data from a route handler into a better-data DataObject. Triggers on BetterRouteBridge::get/post/put/patch/delete, routeFields, RequestParamCollisionException, OpenAPI / OpenApi DTO schema in better-data.
$npx -y skills add lonsdale201/wp-agent-skills --skill bd-better-route-bridgeInstalls into the current project.
Run `npx skills use "https://github.com/lonsdale201/wp-agent-skills" --skill "lonsdale201/wp-agent-skills/bd-better-route-bridge"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/lonsdale201/wp-agent-skills" that are relevant to the current task. Run `npx skills add "https://github.com/lonsdale201/wp-agent-skills"` and select the relevant skills, then follow their instructions.