npx claudepluginhub codigodoleo/superpowers-sage --plugin superpowers-sageThis skill uses the workspace's default tool permissions.
- Setting up or modifying a Lando-based WordPress development environment
references/acf-composer.mdreferences/blade-templates.mdreferences/frontend-stack.mdreferences/lando-command-reference.mdreferences/lando-setup.mdreferences/routing-and-cpts.mdreferences/service-providers.mdreferences/testing.mdreferences/troubleshooting.mdreferences/wordpress-composer.mdscripts/check-stack.shscripts/lando-status.shDebugs PHP errors, Blade rendering issues, Livewire mount failures, Eloquent queries, Acorn boot errors, queue jobs, middleware, WP hooks in Sage/Acorn/Lando projects using lando logs, Xdebug, Query Monitor, WP_DEBUG.
Develops WordPress themes using Sage framework: create from scratch, set up Blade templates/components, configure Vite/Bud builds, handle template hierarchy, integrate ACF fields, manage assets.
Develops and debugs WordPress block themes: edits theme.json settings/styles, manages templates/parts/patterns/style variations, troubleshoots Site Editor (hierarchy, overrides, caching).
Share bugs, ideas, or general feedback.
.lando.yml and root composer.json)composer.json and app/ directory)Determine the task domain:
references/lando-setup.md, then go to step 1references/acf-composer.md, then go to step 2references/blade-templates.md, then go to step 3references/frontend-stack.md, then go to step 4references/service-providers.md, then go to step 5references/routing-and-cpts.md, then go to step 6references/testing.md, then go to step 7references/troubleshooting.md, then go to step 8references/wordpress-composer.md, then go to step 9Confirm the project follows this layout:
project-root/
├── .lando.yml # Lando config — recipe: wordpress
├── .env # WP_HOME, DB credentials
├── composer.json # Root: roots/wordpress, WP core + plugins
├── wp/ # WordPress core (managed by Composer)
├── content/
│ ├── plugins/ # WordPress plugins
│ └── themes/
│ └── {theme}/
│ ├── composer.json # Theme: roots/acorn, log1x/* packages
│ ├── package.json # Theme: vite, tailwind, etc.
│ ├── vite.config.js
│ ├── app/
│ │ ├── Providers/
│ │ │ └── ThemeServiceProvider.php
│ │ ├── Services/ # Business logic classes
│ │ ├── View/
│ │ │ ├── Composers/ # View composers (auto-discovered)
│ │ │ └── Components/ # Blade components
│ │ ├── Blocks/ # ACF Gutenberg blocks
│ │ ├── Fields/ # ACF field groups
│ │ │ └── Partials/ # Reusable field partials
│ │ ├── Options/ # ACF options pages
│ │ ├── Console/
│ │ │ └── Commands/ # Custom Acorn CLI commands
│ │ ├── setup.php # Theme support, nav menus, sidebars
│ │ ├── actions.php # Global add_action calls
│ │ ├── filters.php # Global add_filter calls
│ │ └── helpers.php # Global helper functions
│ ├── config/
│ │ └── poet.php # CPTs, taxonomies, block categories
│ ├── stubs/ # Custom generator stubs (auto-detected)
│ └── resources/
│ ├── views/ # Blade templates (.blade.php)
│ │ ├── layouts/ # Layout templates (app.blade.php)
│ │ ├── partials/ # Shared partials
│ │ ├── sections/ # Page sections
│ │ ├── components/ # Component views
│ │ └── blocks/ # ACF block views
│ ├── css/
│ ├── js/
│ └── fonts/
Critical: Two separate composer.json files exist. Root manages WordPress core and plugins; theme manages PHP dependencies (Acorn, ACF Composer, etc.). Always use lando theme-composer for theme packages.
| Criteria | View Composer | Blade Component | ACF Block |
|---|---|---|---|
| Purpose | Inject data into existing WP templates | Reusable UI piece with props/slots | Editor-managed content block |
| Who controls content? | Developer (code) | Developer (props in templates) | Content editor (Gutenberg UI) |
| Tied to WP template hierarchy? | Yes (front-page, single-post) | No — used anywhere via <x-name> | No — placed in editor |
| Has its own view file? | No — attaches to existing views | Yes — resources/views/components/ | Yes — resources/views/blocks/ |
| Has ACF fields? | No | No | Yes — defines editor UI |
| When to use | Page-specific data (hero content on homepage) | Repeated UI (cards, buttons, sections) | Content editors need to add/arrange it |
| Type of logic | Where it goes | Why |
|---|---|---|
| Theme support, menus, sidebars | setup.php | WordPress bootstrap, runs once |
Simple add_action / add_filter | actions.php / filters.php | Global hooks, no dependencies |
| Business logic (API calls, data processing) | Services/ class, bound in provider | Testable, injectable, reusable |
| Hooks that depend on services | ThemeServiceProvider::boot() | Container is ready, dependencies resolve |
| Data for a specific template | View Composer | Auto-discovered, clean separation |
| CPTs, taxonomies | config/poet.php | Declarative, no boilerplate |
| Complex CPT registration (REST fields, meta) | Service Provider | When Poet's config isn't enough |
setup.php vs actions.php vs filters.php vs ServiceProvidersetup.php — after_setup_theme hook only: add_theme_support(), register_nav_menus(), image sizes, content width. No business logic.actions.php — Simple, self-contained add_action() calls that don't need injected services. If a hook needs a service, move it to a provider.filters.php — Same as above but for add_filter(). Query modifications, excerpt length, etc.boot() — Any hook that depends on container-bound services, or complex logic that benefits from dependency injection.Never create class files or view files manually. Acorn and ACF Composer provide generators that scaffold the correct stub with proper namespace, base class, and paired view.
make:*)lando acorn make:component {Name} — class + view in app/View/Components/ + resources/views/components/lando acorn make:composer {Name} — view composer in app/View/Composers/lando acorn make:provider {Name} — service provider in app/Providers/lando acorn make:command {Name} — console command in app/Console/Commands/Pass Category/Name for nested directories. Use --inline, --view, --path on make:component.
acf:*)lando acorn acf:block {Name} — block class + view (interactive prompts)lando acorn acf:field {Name} — field group classlando acorn acf:partial {Name} — reusable field partiallando acorn acf:options {Name} — options page classlando acorn acf:widget {Name} — widget class + viewAll accept --force. acf:block --localize for i18n stub. Bootstrap stubs: lando acorn acf:stubs.
For full generator details and custom stubs, see references/acf-composer.md.
| Command | Purpose |
|---|---|
lando start | Start environment |
lando acorn view:clear | Clear compiled Blade cache |
lando acorn optimize | Cache config/routes |
lando acorn optimize:clear | Clear all caches |
lando acorn route:list | List registered routes |
lando acorn acf:sync | Sync ACF field groups from code to DB |
lando theme-composer require vendor/pkg | Add theme PHP package |
lando theme-yarn add pkg | Add theme JS package |
lando vite | Start HMR dev server |
lando vite-build | Build production assets |
lando pint | Fix PHP code style |
Read the relevant reference file before generating code in that domain:
| File | When to read |
|---|---|
references/lando-setup.md | Setting up or modifying the Lando environment, .env, server configs |
references/frontend-stack.md | Vite configuration, Tailwind v4, HMR, asset compilation, CSS/JS structure |
references/acf-composer.md | Creating blocks, field groups, partials, options pages, Builder API |
references/service-providers.md | Container bindings, services, facades, dependency injection |
references/blade-templates.md | Composers, components, Sage directives, template hierarchy, layouts |
references/routing-and-cpts.md | Custom post types, taxonomies (Poet), navigation menus (Navi) |
references/testing.md | Setting up Pest, writing tests, mocking WordPress functions |
references/troubleshooting.md | Debugging common issues with Blade, ACF, Vite, Lando, autoloading |
references/wordpress-composer.md | Installing WordPress plugins via Composer from wp-packages.org and local .zip packages |
SageServiceProvider, not ServiceProvider)boot(), not register()lando theme-composer, not lando composerlando acorn view:clear run after Blade template changes if views appear stalelando pint run to fix code styleServiceProvider directlyServiceProvider instead of the Sage-aware oneSageServiceProvider in all theme service providersregister() instead of boot()add_action / add_filter calls to boot(). The container is not ready during register().lando composer require at project root for a theme dependency, or vice versacomposer.json manages WP core + plugins. Theme composer.json manages Acorn, ACF Composer, etc. Use lando theme-composer for theme packages.wp acorn fails inside Lando--path=/app/wp flagwp acorn in Landoacf_add_local_field_group() directlyLog1x\AcfComposer\Builder via ACF Composer classes generated with acf:block, acf:field, etc.Composers/ or vice versaView/Components/, composers go in View/Composers/actions.php, filters.php, or setup.phpServices/ class, bind it in a provider, and call it from hooks in boot()register_post_type() or register_taxonomy()log1x/poet via config/poet.php. Only use a Service Provider for complex registrations that exceed Poet's capabilities.make:component, acf:block, acf:field). They scaffold both class and view with correct namespace and base class.tailwind.config.js@theme directive in CSS files, not a JS config.composer.json is independent. Never cross-install.actions.php/filters.php