wp-guided-tourlisted
Install: claude install-skill mralaminahamed/wp-dev-skills
# WordPress Admin Guided Tours (Driver.js)
> **Model note:** IIFE bundle setup and PHP config scaffolding are mechanical (`haiku`). JS scope detection from URL + hash, and debugging selector mismatches against live DOM, need `sonnet`.
## When to use
- "Add a guided tour to my plugin", "set up Driver.js in WordPress admin".
- "Wire up tour scopes by URL/hash", "detect which page the user is on for tour routing".
- "Track tour completion correctly", "fix tour firing on dismiss instead of Done".
- "Test tour selectors against live DOM".
**Not for:** Front-end-only SPAs or non-WordPress JS apps — requires WP admin backend context. Guided tours in themes — this skill targets plugin-owned admin pages only.
## Setup
### 1 — Vendor Driver.js
Download the Driver.js v1 IIFE build (NOT the ESM build):
- `driver.js.iife.js` → `assets/admin/js/driverjs/driver.js.iife.js`
- `driver.css` → `assets/admin/js/driverjs/driver.css`
The IIFE build exposes `window.driver.js.driver` (double namespace). Always call it as:
```js
window.driver.js.driver({ ... })
```
### 2 — Enqueue in Asset.php
```php
// Enqueue on all admin pages (is_admin() block)
$this->enqueue_script(
'shopflow_guided_tour_driverjs',
SHOPFLOW_ASSETS_URL . 'admin/js/driverjs/driver.js.iife.js',
array()
);
$this->enqueue_style(
'shopflow_guided_tour_driverjs',
SHOPFLOW_ASSETS_URL . 'admin/js/driverjs/driver.css',
array()
);
$this->enqueue_script(
'shopflow_guided_tour',
SHOPFLOW_ASSETS_URL .