wordpress-agent-kit 0.3.2 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/.agents/skills/blueprint/SKILL.md +418 -0
  2. package/.agents/skills/wordpress-router/SKILL.md +52 -0
  3. package/.agents/skills/wordpress-router/references/decision-tree.md +55 -0
  4. package/.agents/skills/wp-abilities-api/SKILL.md +108 -0
  5. package/.agents/skills/wp-abilities-api/references/delegate-helper-pattern.md +241 -0
  6. package/.agents/skills/wp-abilities-api/references/domain-vs-projection.md +113 -0
  7. package/.agents/skills/wp-abilities-api/references/error-code-vocabulary.md +123 -0
  8. package/.agents/skills/wp-abilities-api/references/grouping-heuristic.md +89 -0
  9. package/.agents/skills/wp-abilities-api/references/input-schema-gotchas.md +265 -0
  10. package/.agents/skills/wp-abilities-api/references/php-registration.md +94 -0
  11. package/.agents/skills/wp-abilities-api/references/plugin-family-patterns.md +233 -0
  12. package/.agents/skills/wp-abilities-api/references/rest-api.md +13 -0
  13. package/.agents/skills/wp-abilities-api/references/shared-core-service.md +184 -0
  14. package/.agents/skills/wp-abilities-audit/SKILL.md +199 -0
  15. package/.agents/skills/wp-abilities-audit/references/audit-schema.md +300 -0
  16. package/.agents/skills/wp-abilities-audit/references/capability-gate-tracing.md +197 -0
  17. package/.agents/skills/wp-abilities-audit/references/controller-enumeration.md +116 -0
  18. package/.agents/skills/wp-abilities-verify/SKILL.md +215 -0
  19. package/.agents/skills/wp-abilities-verify/references/annotation-correctness.md +154 -0
  20. package/.agents/skills/wp-abilities-verify/references/audit-schema-validation.md +131 -0
  21. package/.agents/skills/wp-abilities-verify/references/permission-roundtrip.md +190 -0
  22. package/.agents/skills/wp-abilities-verify/references/runtime-harness.md +462 -0
  23. package/.agents/skills/wp-abilities-verify/references/schema-lints.md +118 -0
  24. package/.agents/skills/wp-abilities-verify/references/static-enumeration.md +126 -0
  25. package/.agents/skills/wp-block-development/SKILL.md +175 -0
  26. package/.agents/skills/wp-block-development/references/attributes-and-serialization.md +22 -0
  27. package/.agents/skills/wp-block-development/references/block-json.md +49 -0
  28. package/.agents/skills/wp-block-development/references/creating-new-blocks.md +46 -0
  29. package/.agents/skills/wp-block-development/references/debugging.md +36 -0
  30. package/.agents/skills/wp-block-development/references/deprecations.md +24 -0
  31. package/.agents/skills/wp-block-development/references/dynamic-rendering.md +23 -0
  32. package/.agents/skills/wp-block-development/references/inner-blocks.md +25 -0
  33. package/.agents/skills/wp-block-development/references/registration.md +30 -0
  34. package/.agents/skills/wp-block-development/references/supports-and-wrappers.md +18 -0
  35. package/.agents/skills/wp-block-development/references/tooling-and-testing.md +21 -0
  36. package/.agents/skills/wp-block-development/scripts/list_blocks.mjs +121 -0
  37. package/.agents/skills/wp-block-themes/SKILL.md +117 -0
  38. package/.agents/skills/wp-block-themes/references/creating-new-block-theme.md +37 -0
  39. package/.agents/skills/wp-block-themes/references/debugging.md +24 -0
  40. package/.agents/skills/wp-block-themes/references/patterns.md +18 -0
  41. package/.agents/skills/wp-block-themes/references/style-variations.md +14 -0
  42. package/.agents/skills/wp-block-themes/references/templates-and-parts.md +16 -0
  43. package/.agents/skills/wp-block-themes/references/theme-json.md +59 -0
  44. package/.agents/skills/wp-block-themes/scripts/detect_block_themes.mjs +117 -0
  45. package/.agents/skills/wp-interactivity-api/SKILL.md +180 -0
  46. package/.agents/skills/wp-interactivity-api/references/debugging.md +29 -0
  47. package/.agents/skills/wp-interactivity-api/references/directives-quickref.md +30 -0
  48. package/.agents/skills/wp-interactivity-api/references/server-side-rendering.md +310 -0
  49. package/.agents/skills/wp-performance/SKILL.md +147 -0
  50. package/.agents/skills/wp-performance/references/autoload-options.md +24 -0
  51. package/.agents/skills/wp-performance/references/cron.md +20 -0
  52. package/.agents/skills/wp-performance/references/database.md +20 -0
  53. package/.agents/skills/wp-performance/references/http-api.md +15 -0
  54. package/.agents/skills/wp-performance/references/measurement.md +21 -0
  55. package/.agents/skills/wp-performance/references/object-cache.md +24 -0
  56. package/.agents/skills/wp-performance/references/query-monitor-headless.md +38 -0
  57. package/.agents/skills/wp-performance/references/server-timing.md +22 -0
  58. package/.agents/skills/wp-performance/references/wp-cli-doctor.md +24 -0
  59. package/.agents/skills/wp-performance/references/wp-cli-profile.md +32 -0
  60. package/.agents/skills/wp-performance/scripts/perf_inspect.mjs +128 -0
  61. package/.agents/skills/wp-phpstan/SKILL.md +98 -0
  62. package/.agents/skills/wp-phpstan/references/configuration.md +52 -0
  63. package/.agents/skills/wp-phpstan/references/third-party-classes.md +76 -0
  64. package/.agents/skills/wp-phpstan/references/wordpress-annotations.md +124 -0
  65. package/.agents/skills/wp-phpstan/scripts/phpstan_inspect.mjs +263 -0
  66. package/.agents/skills/wp-playground/SKILL.md +233 -0
  67. package/.agents/skills/wp-playground/references/blueprints.md +36 -0
  68. package/.agents/skills/wp-playground/references/cli-commands.md +39 -0
  69. package/.agents/skills/wp-playground/references/debugging.md +16 -0
  70. package/.agents/skills/wp-playground/references/e2e-playwright.md +115 -0
  71. package/.agents/skills/wp-plugin-development/SKILL.md +113 -0
  72. package/.agents/skills/wp-plugin-development/references/data-and-cron.md +19 -0
  73. package/.agents/skills/wp-plugin-development/references/debugging.md +19 -0
  74. package/.agents/skills/wp-plugin-development/references/lifecycle.md +33 -0
  75. package/.agents/skills/wp-plugin-development/references/security.md +29 -0
  76. package/.agents/skills/wp-plugin-development/references/settings-api.md +22 -0
  77. package/.agents/skills/wp-plugin-development/references/structure.md +16 -0
  78. package/.agents/skills/wp-plugin-development/scripts/detect_plugins.mjs +122 -0
  79. package/.agents/skills/wp-plugin-directory-guidelines/SKILL.md +133 -0
  80. package/.agents/skills/wp-plugin-directory-guidelines/references/gpl-compliance.md +217 -0
  81. package/.agents/skills/wp-plugin-directory-guidelines/references/guideline-review-checklist.md +592 -0
  82. package/.agents/skills/wp-plugin-directory-guidelines/references/naming-rules.md +121 -0
  83. package/.agents/skills/wp-project-triage/SKILL.md +39 -0
  84. package/.agents/skills/wp-project-triage/references/triage.schema.json +143 -0
  85. package/.agents/skills/wp-project-triage/scripts/detect_wp_project.mjs +610 -0
  86. package/.agents/skills/wp-rest-api/SKILL.md +115 -0
  87. package/.agents/skills/wp-rest-api/references/authentication.md +18 -0
  88. package/.agents/skills/wp-rest-api/references/custom-content-types.md +20 -0
  89. package/.agents/skills/wp-rest-api/references/discovery-and-params.md +20 -0
  90. package/.agents/skills/wp-rest-api/references/responses-and-fields.md +30 -0
  91. package/.agents/skills/wp-rest-api/references/routes-and-endpoints.md +36 -0
  92. package/.agents/skills/wp-rest-api/references/schema.md +22 -0
  93. package/.agents/skills/wp-wpcli-and-ops/SKILL.md +126 -0
  94. package/.agents/skills/wp-wpcli-and-ops/references/automation.md +30 -0
  95. package/.agents/skills/wp-wpcli-and-ops/references/cron-and-cache.md +23 -0
  96. package/.agents/skills/wp-wpcli-and-ops/references/debugging.md +17 -0
  97. package/.agents/skills/wp-wpcli-and-ops/references/multisite.md +22 -0
  98. package/.agents/skills/wp-wpcli-and-ops/references/packages-and-updates.md +22 -0
  99. package/.agents/skills/wp-wpcli-and-ops/references/safety.md +30 -0
  100. package/.agents/skills/wp-wpcli-and-ops/references/search-replace.md +40 -0
  101. package/.agents/skills/wp-wpcli-and-ops/scripts/wpcli_inspect.mjs +90 -0
  102. package/.agents/skills/wp-wpengine/SKILL.md +398 -0
  103. package/.agents/skills/wp-wpengine/references/ci-gate.md +469 -0
  104. package/.agents/skills/wp-wpengine/references/github-actions-deploy.md +736 -0
  105. package/.agents/skills/wp-wpengine/scripts/ci-gate.sh +118 -0
  106. package/.agents/skills/wp-wpengine/scripts/wpe-check.sh +89 -0
  107. package/.agents/skills/wp-wpengine/scripts/wpe-preflight.sh +104 -0
  108. package/.agents/skills/wpds/SKILL.md +59 -0
  109. package/.github/agents/wp-architect.agent.md +1 -2
  110. package/.github/copilot-instructions.md +1 -1
  111. package/.github/instructions/wordpress-workflow.instructions.md +3 -3
  112. package/.github/skills/wp-playground/SKILL.md +132 -1
  113. package/.github/skills/wp-playground/references/e2e-playwright.md +115 -0
  114. package/.github/skills/wp-wpengine/SKILL.md +127 -0
  115. package/AGENTS.md +22 -10
  116. package/AGENTS.template.md +20 -10
  117. package/README.md +93 -86
  118. package/dist/cli.js +5 -1
  119. package/dist/commands/clean-skills.js +64 -0
  120. package/dist/commands/setup.js +6 -2
  121. package/dist/commands/sync-skills.js +3 -0
  122. package/dist/lib/api.js +176 -4
  123. package/dist/lib/installer.js +166 -2
  124. package/extensions/wp-agent-kit/index.ts +185 -10
  125. package/package.json +10 -14
  126. package/skills-custom/wp-wpengine/SKILL.md +398 -0
  127. package/skills-custom/wp-wpengine/references/ci-gate.md +469 -0
  128. package/skills-custom/wp-wpengine/references/github-actions-deploy.md +736 -0
  129. package/skills-custom/wp-wpengine/scripts/ci-gate.sh +118 -0
  130. package/skills-custom/wp-wpengine/scripts/wpe-check.sh +89 -0
  131. package/skills-custom/wp-wpengine/scripts/wpe-preflight.sh +104 -0
  132. package/.github/workflows/ci.yml +0 -44
  133. package/.husky/pre-commit +0 -7
  134. package/CLI_REVIEW.md +0 -250
  135. package/biome.json +0 -39
@@ -0,0 +1,398 @@
1
+ ---
2
+ name: wp-wpengine
3
+ description: "Optional: Use for WP Engine hosting workflows — SSH-based git push, remote WP-CLI via SSH gateway, GitHub Actions CI/CD with safety-gated deploys to dev/staging/production, managing installs/domains/cache/backups via the wpe-labs Claude Code skills, and WP Engine API access. Requires SSH key setup and WPE_USERNAME/WPE_PASSWORD env vars for API operations."
4
+ license: GPL-2.0-or-later
5
+ optional: true
6
+ ---
7
+
8
+ # WP Engine
9
+
10
+ ## When to use
11
+
12
+ - Deploy WordPress code to a WP Engine environment via `git push` or GitHub Actions.
13
+ - Set up a branch-gated CI/CD pipeline: `develop` → dev, `staging` → staging, `main` → production.
14
+ - Run WP-CLI commands remotely on a WP Engine install (plugin updates, cache flush, DB ops, search-replace).
15
+ - Manage WP Engine installs, domains, cache, backups, or users through natural language.
16
+ - Generate monthly usage/bandwidth reports across WP Engine accounts.
17
+ - Manage LargeFS media offload configuration.
18
+
19
+ ## Prerequisites
20
+
21
+ - SSH key stored in 1Password (`Employee` vault, item `wpengine_ed25519`).
22
+ > **Key type note:** RSA 4096-bit is the historically proven key type for WP Engine git push.
23
+ > Ed25519 is more modern and works on current WP Engine infrastructure, but if you're
24
+ > setting up a new key, RSA 4096 is the safest choice: `ssh-keygen -t rsa -b 4096 -f ~/.ssh/wpengine_rsa`
25
+ - SSH key registered in the WP Engine portal — both under **Git Push** and **SSH Keys** (two separate registrations, same key).
26
+ - WP Engine API credentials in 1Password (`Employee` vault, item `WP Engine API`).
27
+ - `op` CLI authenticated (`op whoami` works).
28
+ - SSH gateway access requires a **Professional plan or higher**.
29
+ - The `wpe-labs` Claude Code skills installed (`~/.claude/skills/wpe-labs:*`) for natural language management.
30
+
31
+ ---
32
+
33
+ ## Procedure
34
+
35
+ ### 1) First-time SSH setup on a new machine
36
+
37
+ Pull the private key from 1Password and configure SSH:
38
+
39
+ ```bash
40
+ op read "op://Employee/wpengine_ed25519/private key" > ~/.ssh/wpengine_ed25519
41
+ chmod 600 ~/.ssh/wpengine_ed25519
42
+
43
+ # Trust WP Engine git push host (RSA — what WP Engine's git.wpengine.com serves)
44
+ ssh-keyscan -t rsa git.wpengine.com >> ~/.ssh/known_hosts
45
+ # Trust WP Engine SSH gateway
46
+ ssh-keyscan -H ssh.wpengine.net >> ~/.ssh/known_hosts
47
+ ```
48
+
49
+ Add to `~/.ssh/config` (before any `Host *` block):
50
+
51
+ ```
52
+ # WP Engine git push
53
+ Host git.wpengine.com
54
+ User git
55
+ IdentityFile ~/.ssh/wpengine_ed25519
56
+ IdentitiesOnly yes
57
+
58
+ # WP Engine SSH gateway (WP-CLI + direct access)
59
+ Host *.ssh.wpengine.net
60
+ IdentityFile ~/.ssh/wpengine_ed25519
61
+ IdentitiesOnly yes
62
+ ControlMaster auto
63
+ ControlPath ~/.ssh/wpe-%r@%h:%p
64
+ ControlPersist 10m
65
+ ```
66
+
67
+ > **ControlMaster / ControlPersist**: multiplexes SSH connections so subsequent commands over the same gateway reuse the existing connection. Cuts per-command latency from ~2 s to ~100 ms for repeated WP-CLI invocations.
68
+
69
+ Verify git push access:
70
+
71
+ ```bash
72
+ ssh git@git.wpengine.com info
73
+ # Expected: hello <username> / R W <install-name>
74
+ ```
75
+
76
+ Verify SSH gateway access (replace `<install>` with the WP Engine install slug):
77
+
78
+ ```bash
79
+ ssh <install>@<install>.ssh.wpengine.net wp --info
80
+ # Expected: WP-CLI version + paths
81
+ ```
82
+
83
+ ---
84
+
85
+ ### 2) Deploy via git push
86
+
87
+ **Always get the exact remote URL from the WP Engine portal** — it includes the environment prefix:
88
+ `https://my.wpengine.com/installs/<ENV>/git_push`
89
+
90
+ The URL format is: `git@git.wpengine.com:<environment>/<install-name>.git`
91
+ where `<environment>` is `production`, `staging`, or `development`.
92
+
93
+ ```bash
94
+ # Production (copy exact URL from portal)
95
+ git remote add wpengine-prod git@git.wpengine.com:production/<install-name>.git
96
+
97
+ # Staging
98
+ git remote add wpengine-staging git@git.wpengine.com:staging/<install-name>stg.git
99
+
100
+ # Development
101
+ git remote add wpengine-dev git@git.wpengine.com:development/<install-name>dev.git
102
+ ```
103
+
104
+ Deploy:
105
+ ```bash
106
+ git push wpengine-prod main
107
+ # WP Engine expects the branch name 'main' on its remote
108
+ git push wpengine-staging staging:main
109
+ ```
110
+
111
+ - WP Engine deploys the pushed branch automatically.
112
+ - Only WordPress files are pushed — not `node_modules`, build artifacts, or `.git/`.
113
+ - After push, allow 1–2 min for propagation.
114
+
115
+ > **Verify the remote URL**: `git remote -v` should show `git@git.wpengine.com:production/<install>.git`.
116
+ > If it shows `git@git.wpengine.com:<install>.git` (no environment prefix), update it — that is an older format that may no longer work.
117
+
118
+ ---
119
+
120
+ ### 3) WP-CLI via SSH gateway
121
+
122
+ WP Engine's SSH gateway host is `{install}.ssh.wpengine.net` with username `{install}`.
123
+ The WordPress root on the server is `/home/wpe-user/sites/{install}`.
124
+
125
+ #### Method A — Direct SSH command (simplest)
126
+
127
+ ```bash
128
+ ssh <install>@<install>.ssh.wpengine.net wp <command>
129
+ ```
130
+
131
+ WP-CLI on WP Engine already knows the WordPress path, so `--path` is usually not required. If needed:
132
+
133
+ ```bash
134
+ ssh <install>@<install>.ssh.wpengine.net wp plugin list --path=/home/wpe-user/sites/<install>
135
+ ```
136
+
137
+ Always use `--skip-plugins --skip-themes` on production for safety:
138
+
139
+ ```bash
140
+ ssh <install>@<install>.ssh.wpengine.net \
141
+ wp cache flush --skip-plugins --skip-themes
142
+ ```
143
+
144
+ #### Method B — WP-CLI `--ssh` flag
145
+
146
+ WP-CLI's native `--ssh` flag runs any command against a remote install without logging in first:
147
+
148
+ ```bash
149
+ # Format: --ssh=user@host/path
150
+ wp --ssh=<install>@<install>.ssh.wpengine.net:/home/wpe-user/sites/<install> plugin list
151
+
152
+ # Shorthand — omit path if WP-CLI finds WP at the SSH user's home:
153
+ wp --ssh=<install>@<install>.ssh.wpengine.net cache flush
154
+ ```
155
+
156
+ #### Method C — `wp-cli.yml` aliases (best for repeated use)
157
+
158
+ Create or update `wp-cli.yml` in your local repo root:
159
+
160
+ ```yaml
161
+ # wp-cli.yml
162
+ @production:
163
+ ssh: <install>@<install>.ssh.wpengine.net
164
+ path: /home/wpe-user/sites/<install>
165
+
166
+ @staging:
167
+ ssh: <install>stg@<install>stg.ssh.wpengine.net
168
+ path: /home/wpe-user/sites/<install>stg
169
+ ```
170
+
171
+ Then use the alias for any command:
172
+
173
+ ```bash
174
+ wp @production plugin list --format=json
175
+ wp @staging cache flush
176
+ wp @production db export - > backup-$(date +%F).sql
177
+ wp @production search-replace 'old-domain.com' 'new-domain.com' --dry-run
178
+ ```
179
+
180
+ > Commit `wp-cli.yml` to the repo so all team members and CI pipelines share the same remote aliases.
181
+
182
+ ---
183
+
184
+ ### 4) Common remote WP-CLI operations
185
+
186
+ Always run `--dry-run` or a read-only check first. All examples use Method C aliases.
187
+
188
+ #### Inspect the environment
189
+
190
+ ```bash
191
+ wp @production cli info
192
+ wp @production option get siteurl
193
+ wp @production option get home
194
+ wp @production core version
195
+ ```
196
+
197
+ #### Plugin and theme management
198
+
199
+ ```bash
200
+ # List all plugins with status
201
+ wp @production plugin list --format=json
202
+
203
+ # Update a specific plugin
204
+ wp @production plugin update woocommerce
205
+
206
+ # Update all plugins (preview first)
207
+ wp @production plugin update --all --dry-run
208
+ wp @production plugin update --all
209
+
210
+ # Activate/deactivate
211
+ wp @production plugin activate <slug>
212
+ wp @production plugin deactivate <slug> --skip-plugins --skip-themes
213
+ ```
214
+
215
+ #### Cache flush (always safe post-deploy)
216
+
217
+ ```bash
218
+ wp @production cache flush
219
+ wp @production rewrite flush
220
+ wp @production transient delete --all
221
+ ```
222
+
223
+ #### Database operations
224
+
225
+ ```bash
226
+ # Export to local file (streams via SSH)
227
+ wp @production db export - > backup-$(date +%F-%H%M).sql
228
+
229
+ # Check DB size
230
+ wp @production db size --tables --format=table
231
+
232
+ # Run a specific query
233
+ wp @production db query "SELECT option_name, option_value FROM wp_options WHERE autoload='yes' LIMIT 20"
234
+ ```
235
+
236
+ #### Search and replace (migration / domain change)
237
+
238
+ ```bash
239
+ # Always dry-run first
240
+ wp @production search-replace 'http://old-domain.com' 'https://new-domain.com' \
241
+ --dry-run --report-changed-only
242
+
243
+ # Then apply (--precise handles serialized data safely)
244
+ wp @production search-replace 'http://old-domain.com' 'https://new-domain.com' \
245
+ --precise --report-changed-only
246
+
247
+ # Flush after replace
248
+ wp @production cache flush && wp @production rewrite flush
249
+ ```
250
+
251
+ See `wp-wpcli-and-ops` skill → `references/search-replace.md` for full search-replace patterns.
252
+
253
+ #### User management
254
+
255
+ ```bash
256
+ # List admin users
257
+ wp @production user list --role=administrator --format=table
258
+
259
+ # Create a temporary admin (disable after)
260
+ wp @production user create tempagent temp@example.com --role=administrator --user_pass=<strong-pass>
261
+ # ... do work ...
262
+ wp @production user delete tempagent --reassign=1
263
+ ```
264
+
265
+ #### Cron inspection and triggering
266
+
267
+ ```bash
268
+ wp @production cron event list --format=table
269
+ wp @production cron event run --due-now
270
+ wp @production cron event run <hook-name>
271
+ ```
272
+
273
+ ---
274
+
275
+ ### 7) GitHub Actions CI/CD pipeline
276
+
277
+ For full branch-gated deploys with safety guards, pre-deploy backups, smoke tests, and auto-rollback:
278
+
279
+ Read: `references/github-actions-deploy.md`
280
+
281
+ **CI gate policy — no `--no-verify`:**
282
+ - All lint, typecheck, tests, and build checks must pass before any push reaches a deploy branch.
283
+ - `--no-verify` is explicitly forbidden. Hooks exist to surface problems early — bypass them and you own the breakage.
284
+ - The CI gate runs two parallel jobs (`php-gate` + `js-gate`) for every push to a protected branch. Required status check.
285
+ - Every deploy workflow runs a `verify` job as its first dependency — deploys never start without it passing.
286
+
287
+ Read: `references/ci-gate.md`
288
+
289
+ **Agent-runnable scripts:**
290
+
291
+ | Script | Purpose | When to use |
292
+ |--------|---------|-------------|
293
+ | `scripts/ci-gate.sh` | Run the full local CI gate (PHP + JS/TS) | Before any push to a deploy branch |
294
+ | `scripts/wpe-preflight.sh` | Pre-deploy sanity checks (SSH, WP, HTTP) | Before triggering a deploy |
295
+ | `scripts/wpe-check.sh` | SSH connectivity to all configured installs | After machine setup or debugging SSH |
296
+
297
+ Run CI gate locally:
298
+ ```bash
299
+ bash {baseDir}/scripts/ci-gate.sh
300
+ ```
301
+
302
+ Run pre-deploy preflight:
303
+ ```bash
304
+ INSTALL=mysite bash {baseDir}/scripts/wpe-preflight.sh production
305
+ ```
306
+
307
+ Check all SSH connections:
308
+ ```bash
309
+ bash {baseDir}/scripts/wpe-check.sh
310
+ ```
311
+
312
+ ---
313
+
314
+ ### 8) wpe-labs skills (natural language management)
315
+
316
+ Load API credentials, then use any `/wpe-labs:*` skill:
317
+
318
+ ```bash
319
+ # Load credentials from 1Password for the session
320
+ eval $(op run --env-file ~/.config/op-ssh/.env.1pass -- env | grep ^WPE | sed 's/^/export /')
321
+ ```
322
+
323
+ | Skill | What it does | Risk |
324
+ |---|---|---|
325
+ | `/wpe-labs:account-usage` | Bandwidth, visits, storage across accounts | 🟢 Read-only |
326
+ | `/wpe-labs:monthly-report` | Client-ready monthly usage report | 🟢 Read-only |
327
+ | `/wpe-labs:backups` | On-demand backups + progress monitoring | 🟡 Write |
328
+ | `/wpe-labs:cache` | Purge object/page/CDN cache | 🟡 Write |
329
+ | `/wpe-labs:users` | List, invite, update roles, remove users | 🟡/🔴 |
330
+ | `/wpe-labs:domains` | Manage domains, DNS, SSL | 🟡/🔴 |
331
+ | `/wpe-labs:installs` | List, create, copy WordPress installs | 🟡/🔴 |
332
+ | `/wpe-labs:offload` | LargeFS media offload config | 🟡 Write |
333
+
334
+ Example prompts:
335
+
336
+ ```
337
+ /wpe-labs:account-usage which accounts are closest to their bandwidth limit?
338
+ /wpe-labs:cache purge all cache for uofdev production
339
+ /wpe-labs:backups back up uofdev production before deployment
340
+ /wpe-labs:installs copy uofdev production to staging
341
+ /wpe-labs:monthly-report last month
342
+ ```
343
+
344
+ ### 9) Re-installing wpe-labs skills
345
+
346
+ ```bash
347
+ curl -fsSL https://raw.githubusercontent.com/wpengine/wpe-labs-platform-skills/main/install.sh | bash
348
+ ```
349
+
350
+ ---
351
+
352
+ ## Verification
353
+
354
+ | Check | Command |
355
+ |---|---|
356
+ | Git push SSH | `ssh git@git.wpengine.com info` → `hello <user> / R W <install>` |
357
+ | SSH gateway | `ssh <install>@<install>.ssh.wpengine.net wp --info` |
358
+ | WP-CLI alias | `wp @production core version` |
359
+ | API credentials | `op run --env-file ~/.config/op-ssh/.env.1pass -- bash -c 'curl -s -u "$WPE_USERNAME:$WPE_PASSWORD" https://api.wpengineapi.com/v1/user | jq .email'` |
360
+
361
+ ---
362
+
363
+ ## Safety guardrails for remote operations
364
+
365
+ - **Always `--dry-run` first** for any search-replace or destructive DB operation.
366
+ - **Always export a DB backup** before schema changes or large search-replaces.
367
+ - **Use `--skip-plugins --skip-themes`** on production for cache flush, deactivations, and anything where a broken plugin might short-circuit the operation.
368
+ - **Prefer staging** for testing WP-CLI commands before running on production.
369
+ - **ControlMaster is safe** — it reuses an existing authenticated session; no new credentials are stored.
370
+ - **wpe-labs write operations** (`backups`, `cache`, `installs`, `users`, `domains`) should be confirmed before execution.
371
+
372
+ ---
373
+
374
+ ## Failure modes
375
+
376
+ | Symptom | Fix |
377
+ |---|---|
378
+ | `Host key verification failed` (git) | `ssh-keyscan git.wpengine.com >> ~/.ssh/known_hosts` |
379
+ | `Host key verification failed` (gateway) | `ssh-keyscan -H ssh.wpengine.net >> ~/.ssh/known_hosts` |
380
+ | `Permission denied` | Confirm key at `~/.ssh/wpengine_ed25519`, `chmod 600`. Check the key is registered under **SSH Keys** in the WP Engine portal (separate from git push keys). |
381
+ | `git push rejected` | Verify remote URL includes environment prefix (`production/<install>.git`). Get the exact URL from the portal: `https://my.wpengine.com/installs/<ENV>/git_push` |
382
+ | SSH gateway hangs | Kill stale ControlMaster socket: `ssh -O stop <install>@<install>.ssh.wpengine.net` |
383
+ | `wp: command not found` on gateway | WP Engine's WP-CLI path: try `php /usr/local/bin/wp` or contact WP Engine support |
384
+ | WP-CLI returns wrong site | Add `--path=/home/wpe-user/sites/<install>` explicitly |
385
+ | `401 Unauthorized` (wpe-labs) | Regenerate API credentials at `https://my.wpengine.com/api_access`, update 1Password item |
386
+ | `storage shows zero` (wpe-labs) | Ask to "refresh storage" (async recalculation, ~30–60 s) |
387
+
388
+ ---
389
+
390
+ ## References
391
+
392
+ - WP Engine SSH gateway docs: `https://wpengine.com/support/ssh-gateway/`
393
+ - WP Engine git push portal: `https://my.wpengine.com/installs/<ENV>/git_push`
394
+ - WP Engine SSH Keys portal: `https://my.wpengine.com/ssh_keys`
395
+ - WP Engine API access: `https://my.wpengine.com/api_access`
396
+ - WP-CLI `--ssh` docs: `https://make.wordpress.org/cli/handbook/guides/running-commands-remotely/`
397
+ - wpe-labs skills source: `https://github.com/wpengine/wpe-labs-platform-skills`
398
+ - SSH setup log (first machine): gist `602d6a16ddfea438c0611a8e5cc31d5e`