Claude Bridge self-updates
Claude ↔ WordPress bridge: Tampermonkey runtime bridge, REST helper plugin, and operation recipes for AI-assisted WP/WooCommerce client work
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/mccannex/wp-claude-bridge/archive/refs/heads/main.zipShips its own WordPress updater (built-in updater), so new versions show up under Dashboard → Updates.
Readme
wp-claude-bridge
A WordPress plugin that lets Claude (via the Chrome extension) drive a logged-in WP admin session through the site's existing REST API and JS libraries — instead of clicking through the slow admin UI.
How it works
Install the plugin on a WP site. On every admin page it:
- Enqueues
walker.js— discovers what JS libraries are loaded (wp,elementor,wcSettings, etc.) and maps their API surface. - Enqueues
facades.js— exposeswindow.__claude.api,window.__claude.store, andwindow.__claude.elementorwith adry_runsafety gate on all mutations. - Bootstraps
window.__claude.rest— a fetch wrapper pre-loaded with the WP REST nonce so REST calls work from the browser console. - Assembles
window.__claude.manifest— combines the above with server-side site context (plugins, WooCommerce state, snippet plugins, capabilities).
Claude reads window.__claude.manifest as its first action, then drives the site through REST and JS.
Design principles
- Latency, not complexity, is the problem. Stop clicking through the WP admin UI; drive the underlying system directly.
- Composition over bespoke code. Operations are sequences of existing WP/WC REST calls. The plugin only fills genuine gaps.
- No arbitrary code execution against production.
- Plan → checkpoint → execute → verify → resumable. Mutating operations default to
dry_runand return a plan for human approval. - UI clicking is a fallback, not the default.
Installation
- Download or clone this repo.
- Copy
claude-bridge.phpand thebridge/folder into your WP plugins directory aswp-claude-bridge-main/. - Activate Claude Bridge in WP Admin → Plugins.
That's it — no Tampermonkey userscript, no other dependencies.
Updating
The plugin self-updates from this GitHub repo. In WP Admin:
- The toolbar Claude Bridge → Check for updates button checks the current version against the repo.
- Update now downloads and installs the latest
mainbranch zip directly. - Standard WP plugin update notifications also appear in the Plugins list when a new version is available.
After an update the page reloads automatically.
Session workflow
- Open any WP admin page on the target site.
- Open the Claude Chrome extension sidebar.
- Click Claude Bridge → Copy session prompt in the admin toolbar.
- Paste into the Claude conversation to bootstrap the session with site context and operating instructions.
- Claude can now call
window.__claude.*helpers and REST endpoints directly.
Repo layout
claude-bridge.php # WP plugin (REST endpoints, admin scripts, self-updater)
manifest.json # repo metadata
assets/
facades.js # window.__claude.api / .store / .elementor
walker.js # runtime library discovery
REST endpoints
All under /wp-json/claude-bridge/v1/. Require manage_options except /instructions.
| Method | Path | Purpose |
|---|---|---|
| GET | /instructions |
Session bootstrap doc (public) |
| GET | /context |
Full structured site snapshot |
| GET | /snippets |
List all snippets (both snippet plugins) |
| GET | /snippets/{plugin}/{id} |
Get one snippet |
| POST | /snippets/{plugin} |
Create a snippet |
| PUT | /snippets/{plugin}/{id} |
Update a snippet |
| DELETE | /snippets/{plugin}/{id} |
Delete a snippet |
| POST | /snippets/{plugin}/{id}/toggle |
Enable / disable a snippet |
| POST | /snippets/code-snippets/{id}/migrate |
Migrate snippet → WP Code Pro |
| GET | /introspect/hooks |
All registered WP hooks |
| GET | /introspect/scheduler |
Action Scheduler / wp-cron jobs |
| GET | /introspect/schema/{table} |
DB table column definitions |
Supported snippet plugins: WP Code Pro (wpcode) and Code Snippets (code-snippets).