superpowers-sage:acorn-routes

Defines and manages Acorn routes in WordPress Sage projects.

13|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/codigodoleo/superpowers-sage --skill superpowers-sage-acorn-routes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: superpowers-sage:acorn-routes
Source: https://github.com/codigodoleo/superpowers-sage/tree/main/skills/acorn-routes
Command: npx skills add https://github.com/codigodoleo/superpowers-sage --skill superpowers-sage-acorn-routes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lando, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Simplifies building and managing Acorn routes inside WordPress Sage projects, ensuring routing logic is organized, isolated from WordPress content, and easy to scaffold.

Core Features & Use Cases

  • Route definitions in routes/web.php and routes/api.php with clear grouping, prefixing, and middleware usage.
  • CLI-assisted scaffolding for controllers (Resource, API, and Invokable) via the provided script.
  • RouteServiceProvider setup guidance and WordPress coexistence patterns to prevent conflicts with WP permalinks.
  • Reusable templates for common controllers and API resources, plus utilities for quick testing and debugging.

Quick Start

Generate a new controller with the provided script and wire it into routes/web.php to enable Acorn routing.

Frequently Asked Questions about superpowers-sage:acorn-routes

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

FAQPage Schema
How do I define Acorn routes in a WordPress Sage theme?

To define Acorn routes in a WordPress Sage theme, you structure route definitions within routes/web.php and routes/api.php, utilizing route groups and prefixes to isolate logic from standard WordPress content and prevent permalink conflicts.

How do I set up middleware for Acorn routes in Sage?

Middleware for Acorn routes in Sage is applied through the RouteServiceProvider, allowing you to assign middleware to route groups defined in routes/web.php and routes/api.php for structured request handling.

Can I scaffold Laravel-style controllers for Acorn routes?

Yes, you can scaffold Laravel-style controllers for Acorn routes using the provided CLI script, which generates Resource, API, and Invokable controllers to quickly wire up web and API endpoints.

What is a RouteServiceProvider and why do I need it for Sage Acorn?

A RouteServiceProvider is required for Sage Acorn to register route files, load definitions from routes/web.php and routes/api.php, and apply middleware, ensuring your custom routing coexists safely with WordPress.

How do I prevent Acorn routes from conflicting with WordPress permalinks?

Prevent Acorn route conflicts with WordPress permalinks by using route prefixes, which isolate your custom endpoints from core WordPress content routing and ensure requests map correctly to your Sage controllers.

Does Acorn routing work with Lando for local Sage development?

Acorn routing requires an Acorn-enabled WordPress Sage environment and supports local development through Lando, providing a sandbox to test route definitions, middleware, and scaffolded controllers.