claude-plugin-wordpress-manager 1.9.0 → 2.1.0

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 (31) hide show
  1. package/.claude-plugin/plugin.json +7 -3
  2. package/CHANGELOG.md +30 -0
  3. package/agents/wp-cicd-engineer.md +194 -0
  4. package/agents/wp-monitoring-agent.md +184 -0
  5. package/agents/wp-performance-optimizer.md +1 -0
  6. package/agents/wp-security-auditor.md +1 -0
  7. package/agents/wp-site-manager.md +2 -0
  8. package/docs/plans/2026-02-28-cicd-v2.0.0.md +375 -0
  9. package/package.json +9 -3
  10. package/skills/wordpress-router/references/decision-tree.md +7 -3
  11. package/skills/wp-audit/SKILL.md +1 -0
  12. package/skills/wp-cicd/SKILL.md +119 -0
  13. package/skills/wp-cicd/references/bitbucket-pipelines-wordpress.md +142 -0
  14. package/skills/wp-cicd/references/deploy-strategies.md +164 -0
  15. package/skills/wp-cicd/references/github-actions-wordpress.md +183 -0
  16. package/skills/wp-cicd/references/gitlab-ci-wordpress.md +189 -0
  17. package/skills/wp-cicd/references/quality-gates.md +215 -0
  18. package/skills/wp-cicd/references/secrets-management.md +175 -0
  19. package/skills/wp-cicd/references/wp-env-ci.md +135 -0
  20. package/skills/wp-cicd/scripts/cicd_inspect.mjs +183 -0
  21. package/skills/wp-deploy/SKILL.md +4 -0
  22. package/skills/wp-e2e-testing/SKILL.md +4 -0
  23. package/skills/wp-monitoring/SKILL.md +121 -0
  24. package/skills/wp-monitoring/references/alerting-strategies.md +205 -0
  25. package/skills/wp-monitoring/references/content-integrity.md +188 -0
  26. package/skills/wp-monitoring/references/performance-baseline.md +169 -0
  27. package/skills/wp-monitoring/references/reporting-templates.md +207 -0
  28. package/skills/wp-monitoring/references/security-scanning.md +168 -0
  29. package/skills/wp-monitoring/references/uptime-checks.md +140 -0
  30. package/skills/wp-monitoring/scripts/monitoring_inspect.mjs +259 -0
  31. package/skills/wp-phpstan/SKILL.md +4 -0
@@ -0,0 +1,375 @@
1
+ # CI/CD v2.0.0 Implementation Plan
2
+
3
+ > **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
4
+
5
+ **Goal:** Add CI/CD skill, agent, and detection script for WordPress pipeline automation (GitHub Actions, GitLab CI, Bitbucket Pipelines).
6
+
7
+ **Architecture:** Skill-only release (no new MCP tools). Detection script scans for existing CI config. Skill provides 7 reference files covering 3 platforms + wp-env CI + deploy strategies + secrets + quality gates. Agent orchestrates pipeline generation and troubleshooting via Bash, Read, Write.
8
+
9
+ **Tech Stack:** Node.js (.mjs detection script), Markdown (skill + references + agent), YAML (CI pipeline templates in references)
10
+
11
+ ---
12
+
13
+ ### Task 1: Create detection script `cicd_inspect.mjs`
14
+
15
+ **Files:**
16
+ - Create: `skills/wp-cicd/scripts/cicd_inspect.mjs`
17
+
18
+ **Step 1: Create directory structure**
19
+
20
+ ```bash
21
+ mkdir -p skills/wp-cicd/scripts skills/wp-cicd/references
22
+ ```
23
+
24
+ **Step 2: Write the detection script**
25
+
26
+ Pattern: follow `multisite_inspect.mjs` structure (readFileSafe, detectors, JSON report, exit codes).
27
+
28
+ Detectors:
29
+ 1. **GitHub Actions**: scan `.github/workflows/*.yml` — extract job names, triggers, WP-specific steps
30
+ 2. **GitLab CI**: scan `.gitlab-ci.yml` — extract stages, WP-specific jobs
31
+ 3. **Bitbucket Pipelines**: scan `bitbucket-pipelines.yml` — extract pipeline steps
32
+ 4. **Quality tools**: scan for `phpstan.neon*`, `phpcs.xml*`, `.phpcs.xml*`, `playwright.config.*`, `jest.config.*`, `phpunit.xml*`
33
+ 5. **wp-env CI readiness**: check `.wp-env.json` or `.wp-env.override.json` presence
34
+
35
+ Output JSON:
36
+ ```json
37
+ {
38
+ "tool": "cicd_inspect",
39
+ "version": "1.0.0",
40
+ "timestamp": "...",
41
+ "cwd": "...",
42
+ "found": true,
43
+ "platforms": {
44
+ "github_actions": { "found": true, "workflows": [...], "has_wp_steps": true },
45
+ "gitlab_ci": { "found": false },
46
+ "bitbucket": { "found": false }
47
+ },
48
+ "quality_tools": {
49
+ "phpstan": true,
50
+ "phpcs": false,
51
+ "playwright": true,
52
+ "jest": true,
53
+ "phpunit": true
54
+ },
55
+ "wp_env_ready": true,
56
+ "recommendations": [...]
57
+ }
58
+ ```
59
+
60
+ Exit codes: 0 = CI config found, 1 = no CI config found.
61
+
62
+ **Step 3: Test the script**
63
+
64
+ ```bash
65
+ node skills/wp-cicd/scripts/cicd_inspect.mjs
66
+ ```
67
+
68
+ Expected: exit 1 (no CI config in plugin dev dir), valid JSON output.
69
+
70
+ ---
71
+
72
+ ### Task 2: Create skill `wp-cicd/SKILL.md`
73
+
74
+ **Files:**
75
+ - Create: `skills/wp-cicd/SKILL.md`
76
+
77
+ **Step 1: Write the SKILL.md**
78
+
79
+ Structure (follow `wp-multisite/SKILL.md` pattern):
80
+
81
+ ```yaml
82
+ ---
83
+ name: wp-cicd
84
+ description: |
85
+ This skill should be used when the user asks about "CI/CD", "pipeline",
86
+ "GitHub Actions", "GitLab CI", "Bitbucket Pipelines", "deploy automation",
87
+ "quality gates", "continuous integration", or WordPress CI/CD workflows.
88
+ version: 1.0.0
89
+ source: "vinmor/wordpress-manager"
90
+ ---
91
+ ```
92
+
93
+ Sections:
94
+ - **Overview**: CI/CD pipeline management for WordPress — multi-platform (GitHub Actions, GitLab CI, Bitbucket Pipelines)
95
+ - **When to Use**: CI setup, pipeline generation, quality gates, automated deploy, secrets management
96
+ - **Detection**: run `cicd_inspect.mjs`
97
+ - **CI/CD Decision Tree**:
98
+ 1. Which platform? → route to platform-specific reference
99
+ 2. What stage? → lint → test → build → deploy
100
+ 3. Quality gates? → PHPStan, PHPCS, coverage thresholds
101
+ 4. Deploy strategy? → blue-green, rolling, manual approval
102
+ - **Recommended Agent**: `wp-cicd-engineer`
103
+ - **Reference Files**: list all 7
104
+ - **Related Skills**: wp-e2e-testing (test stage), wp-deploy (deploy stage), wp-phpstan (quality gate)
105
+
106
+ ---
107
+
108
+ ### Task 3: Create 7 reference files
109
+
110
+ **Files:**
111
+ - Create: `skills/wp-cicd/references/github-actions-wordpress.md`
112
+ - Create: `skills/wp-cicd/references/gitlab-ci-wordpress.md`
113
+ - Create: `skills/wp-cicd/references/bitbucket-pipelines-wordpress.md`
114
+ - Create: `skills/wp-cicd/references/wp-env-ci.md`
115
+ - Create: `skills/wp-cicd/references/deploy-strategies.md`
116
+ - Create: `skills/wp-cicd/references/secrets-management.md`
117
+ - Create: `skills/wp-cicd/references/quality-gates.md`
118
+
119
+ **Step 1: Write all 7 reference files in parallel**
120
+
121
+ Each ~80-120 lines, actionable content with YAML/code examples.
122
+
123
+ #### github-actions-wordpress.md
124
+ - Complete workflow template for WP plugin/theme
125
+ - Matrix: PHP 7.4/8.0/8.2/8.3, WP latest/nightly
126
+ - Jobs: lint (PHPCS), static analysis (PHPStan), unit test (PHPUnit), E2E (Playwright + wp-env), deploy
127
+ - Caching: composer, npm, wp-env Docker images
128
+ - Artifact upload: test reports, screenshots
129
+
130
+ #### gitlab-ci-wordpress.md
131
+ - Multi-stage pipeline: `.pre` → lint → test → build → deploy
132
+ - Docker-in-Docker for wp-env
133
+ - Caching strategy
134
+ - Environment-based deploy (staging → production)
135
+
136
+ #### bitbucket-pipelines-wordpress.md
137
+ - Step-based pipeline with parallel steps
138
+ - Docker service for MySQL
139
+ - Deployment integration (SSH deploy pipe)
140
+ - Caching configuration
141
+
142
+ #### wp-env-ci.md
143
+ - Starting wp-env in CI (Docker-in-Docker or service)
144
+ - Port configuration and healthcheck
145
+ - Plugin/theme mounting in CI
146
+ - Parallel test execution
147
+ - Troubleshooting: Docker timeout, port conflicts
148
+
149
+ #### deploy-strategies.md
150
+ - Manual approval gate (GitHub environments)
151
+ - Blue-green: deploy to staging, verify, swap
152
+ - Rolling: deploy one server at a time
153
+ - Canary: percentage-based rollout
154
+ - WordPress-specific: maintenance mode during deploy, cache flush after
155
+
156
+ #### secrets-management.md
157
+ - GitHub Actions secrets / Dependabot secrets
158
+ - GitLab CI/CD variables (protected, masked)
159
+ - Bitbucket repository variables
160
+ - SSH key deployment (deploy keys)
161
+ - WordPress secrets: Application Password, WP_SITES_CONFIG, Hostinger API token
162
+ - .env handling: never commit, inject at runtime
163
+
164
+ #### quality-gates.md
165
+ - PHPStan: level config, baseline, fail on new errors
166
+ - PHPCS: WordPress coding standards
167
+ - Coverage thresholds: minimum %, fail if below
168
+ - Playwright: screenshot comparison, max failures
169
+ - Security scanning: composer audit, npm audit
170
+ - Merge/PR blocking: required status checks
171
+
172
+ ---
173
+
174
+ ### Task 4: Create agent `wp-cicd-engineer.md`
175
+
176
+ **Files:**
177
+ - Create: `agents/wp-cicd-engineer.md`
178
+
179
+ **Step 1: Write the agent file**
180
+
181
+ Follow `wp-test-engineer.md` pattern (frontmatter with examples, tools, procedures, safety rules).
182
+
183
+ ```yaml
184
+ ---
185
+ name: wp-cicd-engineer
186
+ color: cyan
187
+ description: |
188
+ Use this agent when the user needs to set up, configure, or troubleshoot CI/CD pipelines for WordPress projects. Handles GitHub Actions, GitLab CI, Bitbucket Pipelines, quality gates, and automated deployment workflows.
189
+
190
+ <example>
191
+ Context: User wants to set up CI for their WordPress plugin.
192
+ user: "Set up GitHub Actions for my WordPress plugin with PHPStan and Playwright"
193
+ assistant: "I'll use the wp-cicd-engineer agent to create a CI pipeline."
194
+ <commentary>CI setup requires detecting existing tools, generating workflow YAML, and configuring quality gates.</commentary>
195
+ </example>
196
+
197
+ <example>
198
+ Context: User's CI pipeline is failing.
199
+ user: "My GitHub Actions workflow fails on the Playwright step with Docker timeout"
200
+ assistant: "I'll use the wp-cicd-engineer agent to diagnose the CI failure."
201
+ <commentary>CI debugging requires understanding wp-env in Docker-in-Docker and CI-specific constraints.</commentary>
202
+ </example>
203
+
204
+ <example>
205
+ Context: User wants to add automated deployment to their pipeline.
206
+ user: "Add a deploy stage to my CI that deploys to Hostinger when I push to main"
207
+ assistant: "I'll use the wp-cicd-engineer agent to configure the deployment stage."
208
+ <commentary>Deploy automation requires secrets management, deployment strategy, and post-deploy verification.</commentary>
209
+ </example>
210
+ model: inherit
211
+ tools: Read, Grep, Glob, Bash, Write, WebFetch, WebSearch
212
+ ```
213
+
214
+ Note: this agent has **Write** tool (unlike most other agents) because it generates pipeline config files.
215
+
216
+ Procedures:
217
+ 1. **Detect existing CI** — run `cicd_inspect.mjs`, identify platform and gaps
218
+ 2. **Generate pipeline** — create workflow YAML based on detected tools and platform
219
+ 3. **Configure quality gates** — PHPStan level, PHPCS ruleset, coverage threshold
220
+ 4. **Configure secrets** — guide user through secret setup (never write actual secrets)
221
+ 5. **Configure deploy stage** — deploy strategy, environment gates, post-deploy checks
222
+ 6. **Troubleshoot** — diagnose CI failures, Docker issues, timeout, permission errors
223
+
224
+ Safety Rules:
225
+ - NEVER write actual secrets or credentials to files
226
+ - NEVER push CI config without user review
227
+ - ALWAYS validate YAML syntax before suggesting commit
228
+ - ALWAYS use `--dry-run` for search-replace operations in CI
229
+ - NEVER deploy to production without explicit user approval
230
+ - ALWAYS recommend staging deploy first
231
+
232
+ ---
233
+
234
+ ### Task 5: Update router decision-tree.md
235
+
236
+ **Files:**
237
+ - Modify: `skills/wordpress-router/references/decision-tree.md`
238
+
239
+ **Step 1: Update header to v7**
240
+
241
+ **Step 2: Add CI/CD keywords to Step 0**
242
+
243
+ In "Keywords that indicate **development**" line, append:
244
+ `CI, CD, pipeline, GitHub Actions, GitLab CI, deploy automatico, workflow, quality gate`
245
+
246
+ **Step 3: Add CI/CD route to Step 2a**
247
+
248
+ After the existing headless entry, add:
249
+ ```
250
+ - **CI / CD / pipeline / GitHub Actions / GitLab CI / Bitbucket Pipelines / quality gate / deploy automatico**
251
+ → `wp-cicd` skill + `wp-cicd-engineer` agent
252
+ ```
253
+
254
+ ---
255
+
256
+ ### Task 6: Add cross-references to 3 existing skills
257
+
258
+ **Files:**
259
+ - Modify: `skills/wp-e2e-testing/SKILL.md` (append)
260
+ - Modify: `skills/wp-deploy/SKILL.md` (append)
261
+ - Modify: `skills/wp-phpstan/SKILL.md` (append)
262
+
263
+ **Step 1: wp-e2e-testing — add CI cross-ref**
264
+
265
+ At the end of the file, after "Recommended Agent" section, add:
266
+ ```markdown
267
+
268
+ ### CI/CD Integration
269
+
270
+ For integrating WordPress tests into CI/CD pipelines (GitHub Actions, GitLab CI, Bitbucket Pipelines), see the `wp-cicd` skill and `wp-cicd-engineer` agent.
271
+ ```
272
+
273
+ **Step 2: wp-deploy — add CI cross-ref**
274
+
275
+ At the end of the file, add:
276
+ ```markdown
277
+
278
+ ### Automated Deployment
279
+
280
+ For automated deployments via CI/CD pipelines, see the `wp-cicd` skill and `wp-cicd-engineer` agent.
281
+ ```
282
+
283
+ **Step 3: wp-phpstan — add CI cross-ref**
284
+
285
+ At the end of the file, add:
286
+ ```markdown
287
+
288
+ ### CI/CD Quality Gates
289
+
290
+ For integrating PHPStan as a quality gate in CI/CD pipelines, see the `wp-cicd` skill (`references/quality-gates.md`).
291
+ ```
292
+
293
+ ---
294
+
295
+ ### Task 7: Update wp-site-manager delegation table
296
+
297
+ **Files:**
298
+ - Modify: `agents/wp-site-manager.md`
299
+
300
+ **Step 1: Add CI/CD row to delegation table**
301
+
302
+ After the "Multisite network management" row, add:
303
+ ```
304
+ | CI/CD pipeline setup and troubleshooting | `wp-cicd-engineer` | GitHub Actions, GitLab CI, Bitbucket, quality gates |
305
+ ```
306
+
307
+ ---
308
+
309
+ ### Task 8: Version bump + CHANGELOG
310
+
311
+ **Files:**
312
+ - Modify: `.claude-plugin/plugin.json` (1.9.0 → 2.0.0)
313
+ - Modify: `package.json` (1.9.0 → 2.0.0)
314
+ - Modify: `CHANGELOG.md` (add v2.0.0 entry)
315
+
316
+ **Step 1: Update plugin.json**
317
+
318
+ - Version: `1.9.0` → `2.0.0`
319
+ - Description: update to mention 10 agents, 27 skills, CI/CD
320
+ - Keywords: add `ci-cd`, `github-actions`
321
+
322
+ **Step 2: Update package.json**
323
+
324
+ - Version: `1.9.0` → `2.0.0`
325
+ - Description: update to mention CI/CD, 10 agents, 27 skills
326
+ - Keywords: add `ci-cd`, `github-actions`, `gitlab-ci`
327
+
328
+ **Step 3: Add CHANGELOG entry**
329
+
330
+ ```markdown
331
+ ## [2.0.0] - 2026-02-28
332
+
333
+ ### Added
334
+ - **CI/CD support** — new skill and agent for WordPress pipeline automation
335
+ - **New skill**: `wp-cicd` with 7 reference files (GitHub Actions, GitLab CI, Bitbucket, wp-env CI, deploy strategies, secrets, quality gates)
336
+ - **New agent**: `wp-cicd-engineer` (color: cyan) — pipeline generation, quality gates, deploy automation, CI troubleshooting
337
+ - **Detection script**: `cicd_inspect.mjs` — detects CI platforms, quality tools, wp-env readiness
338
+
339
+ ### Changed
340
+ - Router decision-tree.md upgraded to v7 with CI/CD keywords and routing
341
+ - `wp-e2e-testing`, `wp-deploy`, `wp-phpstan` skills: added CI/CD cross-references
342
+ - `wp-site-manager` agent: added CI/CD delegation row
343
+ - Plugin now has 10 agents and 27 skills
344
+ ```
345
+
346
+ ---
347
+
348
+ ## Implementation Order
349
+
350
+ ```
351
+ Phase 1 — Core (sequential):
352
+ Task 1: cicd_inspect.mjs (detection script)
353
+ Task 2: wp-cicd/SKILL.md (skill)
354
+ Task 3: 7 reference files (parallelizable)
355
+
356
+ Phase 2 — Agent:
357
+ Task 4: wp-cicd-engineer.md
358
+
359
+ Phase 3 — Integration (parallelizable):
360
+ Task 5: Router update (decision-tree.md v7)
361
+ Task 6: Cross-references (3 skills)
362
+ Task 7: wp-site-manager delegation
363
+
364
+ Phase 4 — Release:
365
+ Task 8: Version bump + CHANGELOG
366
+ ```
367
+
368
+ ## Verification
369
+
370
+ - `cicd_inspect.mjs` runs without errors (exit 1 in plugin dev dir)
371
+ - All new files have valid structure
372
+ - Router v7 routes CI/CD keywords correctly
373
+ - Cross-references are bidirectional: skill → agent, agent → skill
374
+ - Delegation table in wp-site-manager has CI/CD row
375
+ - Version 2.0.0 across plugin.json, package.json, CHANGELOG
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "claude-plugin-wordpress-manager",
3
- "version": "1.9.0",
4
- "description": "Unified WordPress management and development plugin for Claude Code. Orchestrates Hostinger MCP, WP REST API bridge (81 tools incl. 30 WooCommerce + 10 Multisite), and WordPress.com MCP with 26 skills, 9 agents, and security hooks. v1.9.0 adds WordPress Multisite network management via WP-CLI: sub-site CRUD, network plugins, Super Admin, domain mapping.",
3
+ "version": "2.1.0",
4
+ "description": "Unified WordPress management and development plugin for Claude Code. Orchestrates Hostinger MCP, WP REST API bridge (81 tools incl. 30 WooCommerce + 10 Multisite), and WordPress.com MCP with 28 skills, 11 agents, and security hooks. v2.1.0 adds site monitoring: uptime checks, performance baseline, security scanning, content integrity, alerting strategies, and reporting templates.",
5
5
  "author": {
6
6
  "name": "vinmor",
7
7
  "email": "morreale.v@gmail.com"
@@ -27,7 +27,13 @@
27
27
  "ecommerce",
28
28
  "shop",
29
29
  "multisite",
30
- "network"
30
+ "network",
31
+ "ci-cd",
32
+ "github-actions",
33
+ "gitlab-ci",
34
+ "monitoring",
35
+ "uptime",
36
+ "health-check"
31
37
  ],
32
38
  "repository": {
33
39
  "type": "git",
@@ -1,4 +1,4 @@
1
- # Router decision tree (v6 — development + local environment + operations + multisite)
1
+ # Router decision tree (v8 — development + local environment + operations + multisite + CI/CD + monitoring)
2
2
 
3
3
  This routing guide covers WordPress **development**, **local environment**, and **operations** workflows.
4
4
 
@@ -14,10 +14,10 @@ Keywords that indicate **local environment**:
14
14
  local site, Studio, LocalWP, Local by Flywheel, wp-env, local WordPress, start site, stop site, create local site, local development, symlink plugin, local database, switch PHP version, localhost, local preview, detect environment, WASM, SQLite local
15
15
 
16
16
  Keywords that indicate **operations**:
17
- deploy, push to production, audit, security check, backup, restore, migrate, move site, create post, manage content, site status, check plugins, performance check, SEO audit, WooCommerce, prodotto, ordine, coupon, negozio, catalogo, inventario, vendite, carrello, multisite, network, sub-site, sub-sito, domain mapping, super admin, network activate
17
+ deploy, push to production, audit, security check, backup, restore, migrate, move site, create post, manage content, site status, check plugins, performance check, SEO audit, WooCommerce, prodotto, ordine, coupon, negozio, catalogo, inventario, vendite, carrello, multisite, network, sub-site, sub-sito, domain mapping, super admin, network activate, monitor, uptime, health report, trend, scansione periodica, alerting, performance baseline
18
18
 
19
19
  Keywords that indicate **development**:
20
- create block, block.json, theme.json, register_rest_route, plugin development, hooks, PHPStan, build, test, scaffold, i18n, translation, accessibility, a11y, headless, decoupled, WPGraphQL
20
+ create block, block.json, theme.json, register_rest_route, plugin development, hooks, PHPStan, build, test, scaffold, i18n, translation, accessibility, a11y, headless, decoupled, WPGraphQL, CI, CD, pipeline, GitHub Actions, GitLab CI, deploy automatico, workflow, quality gate
21
21
 
22
22
  ## Step 1: classify repo kind (from triage — development only)
23
23
 
@@ -65,6 +65,8 @@ Priority: `gutenberg` > `wp-core` > `wp-site` > `wp-block-theme` > `wp-block-plu
65
65
  → `wp-accessibility` skill + `wp-accessibility-auditor` agent
66
66
  - **Headless / decoupled / WPGraphQL / Next.js / Nuxt / Astro / Gatsby / CORS / ISR / SSG / frontend integration**
67
67
  → `wp-headless`
68
+ - **CI / CD / pipeline / GitHub Actions / GitLab CI / Bitbucket Pipelines / quality gate / deploy automatico / continuous integration**
69
+ → `wp-cicd` skill + `wp-cicd-engineer` agent
68
70
 
69
71
  ## Step 2b: route by operational intent (keywords)
70
72
 
@@ -90,6 +92,8 @@ Priority: `gutenberg` > `wp-core` > `wp-site` > `wp-block-theme` > `wp-block-plu
90
92
  → `wp-woocommerce` skill + `wp-ecommerce-manager` agent
91
93
  - **Multisite / network / sub-sites / domain mapping / super admin / network activate**
92
94
  → `wp-multisite` skill + `wp-site-manager` agent
95
+ - **Monitor / uptime / health report / trend / scansione periodica / alerting / performance baseline / ongoing checks**
96
+ → `wp-monitoring` skill + `wp-monitoring-agent` agent
93
97
 
94
98
  ## Step 2c: route by local environment intent (keywords)
95
99
 
@@ -117,3 +117,4 @@ Combine findings into a unified report with:
117
117
  ## Related skills
118
118
 
119
119
  - `wp-security` — Deep security hardening, filesystem permissions, HTTP headers, incident response procedures
120
+ - `wp-monitoring` — For ongoing monitoring (uptime, performance trends, security scanning, content integrity) beyond one-time audits
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: wp-cicd
3
+ description: |
4
+ This skill should be used when the user asks about "CI/CD", "pipeline",
5
+ "GitHub Actions", "GitLab CI", "Bitbucket Pipelines", "deploy automation",
6
+ "quality gates", "continuous integration", "continuous deployment",
7
+ or any WordPress CI/CD workflow configuration.
8
+ compatibility: "Targets WordPress 6.9+ (PHP 7.2.24+). Filesystem-based agent with bash + node. Generates YAML pipeline configs."
9
+ version: 1.0.0
10
+ source: "vinmor/wordpress-manager"
11
+ ---
12
+
13
+ # WP CI/CD
14
+
15
+ ## Overview
16
+
17
+ CI/CD pipeline management for WordPress projects. Supports three platforms (GitHub Actions, GitLab CI, Bitbucket Pipelines) with WordPress-specific stages: PHP linting, static analysis, unit/E2E testing with wp-env, and automated deployment.
18
+
19
+ ## When to Use
20
+
21
+ - Setting up a CI/CD pipeline from scratch for a WordPress project
22
+ - Adding quality gates (PHPStan, PHPCS, coverage thresholds) to an existing pipeline
23
+ - Configuring automated deployment (staging, production) via CI
24
+ - Troubleshooting CI failures (Docker timeout, wp-env issues, test flakiness)
25
+ - Managing secrets for WordPress deployment (SSH keys, API tokens)
26
+ - Choosing a deployment strategy (blue-green, rolling, canary)
27
+ - Migrating CI configuration between platforms
28
+
29
+ ## Detection
30
+
31
+ Run the detection script to assess the current CI/CD setup:
32
+
33
+ ```bash
34
+ node skills/wp-cicd/scripts/cicd_inspect.mjs [--cwd=/path/to/project]
35
+ ```
36
+
37
+ The script outputs JSON with:
38
+ - `platforms` — GitHub Actions, GitLab CI, Bitbucket Pipelines detection
39
+ - `quality_tools` — PHPStan, PHPCS, Playwright, Jest, PHPUnit presence
40
+ - `wp_env_ready` — whether `.wp-env.json` exists for E2E in CI
41
+ - `recommendations` — actionable suggestions
42
+
43
+ ## CI/CD Decision Tree
44
+
45
+ ### 1. Which platform?
46
+
47
+ | Platform | Config location | Best for |
48
+ |----------|----------------|----------|
49
+ | GitHub Actions | `.github/workflows/*.yml` | Open-source plugins, GitHub-hosted repos |
50
+ | GitLab CI | `.gitlab-ci.yml` | Self-hosted, enterprise GitLab |
51
+ | Bitbucket Pipelines | `bitbucket-pipelines.yml` | Atlassian ecosystem teams |
52
+
53
+ → Read the platform-specific reference file for complete templates.
54
+
55
+ ### 2. What pipeline stages?
56
+
57
+ Standard WordPress CI pipeline:
58
+
59
+ ```
60
+ lint → static-analysis → test → build → deploy
61
+ ```
62
+
63
+ | Stage | Tool | What it checks |
64
+ |-------|------|---------------|
65
+ | Lint | PHPCS | WordPress coding standards |
66
+ | Static analysis | PHPStan | Type safety, undefined methods |
67
+ | Unit test | PHPUnit / Jest | Business logic, hooks, filters |
68
+ | E2E test | Playwright + wp-env | User flows, block interactions |
69
+ | Build | npm run build | Block assets, translations |
70
+ | Deploy | SSH / Hostinger MCP | Push to staging or production |
71
+
72
+ ### 3. Quality gates
73
+
74
+ Configure pass/fail thresholds that block merging:
75
+
76
+ - PHPStan: fail on new errors (baseline strategy)
77
+ - PHPCS: zero violations on changed files
78
+ - Coverage: minimum threshold (e.g., 80%)
79
+ - Playwright: zero failures, screenshot diff tolerance
80
+
81
+ → Read: `references/quality-gates.md`
82
+
83
+ ### 4. Deploy strategy
84
+
85
+ | Strategy | Risk | Downtime | Use when |
86
+ |----------|------|----------|----------|
87
+ | Direct push | High | Brief | Simple sites, dev/staging |
88
+ | Blue-green | Low | Zero | Production with traffic |
89
+ | Rolling | Medium | Zero | Multi-server setups |
90
+ | Manual approval | Low | Varies | Production with review gate |
91
+
92
+ → Read: `references/deploy-strategies.md`
93
+
94
+ ## Recommended Agent
95
+
96
+ For hands-on pipeline generation, troubleshooting, and deployment configuration, use the **`wp-cicd-engineer`** agent.
97
+
98
+ ## Reference Files
99
+
100
+ - **`references/github-actions-wordpress.md`** — Complete GitHub Actions workflow templates for WordPress
101
+ - **`references/gitlab-ci-wordpress.md`** — GitLab CI multi-stage pipeline for WordPress
102
+ - **`references/bitbucket-pipelines-wordpress.md`** — Bitbucket Pipelines configuration for WordPress
103
+ - **`references/wp-env-ci.md`** — Running wp-env in CI for E2E tests (Docker-in-Docker, healthchecks)
104
+ - **`references/deploy-strategies.md`** — Blue-green, rolling, canary, manual approval for WordPress
105
+ - **`references/secrets-management.md`** — SSH keys, API tokens, env vars across CI platforms
106
+ - **`references/quality-gates.md`** — PHPStan, PHPCS, coverage thresholds, merge blocking
107
+
108
+ ## Related Skills
109
+
110
+ - **`wp-e2e-testing`** — Test framework setup, Playwright/Jest/PHPUnit guides (CI test stage)
111
+ - **`wp-deploy`** — Deployment procedures for Hostinger and SSH (CI deploy stage)
112
+ - **`wp-phpstan`** — PHPStan configuration and WordPress typing (CI quality gate)
113
+ - **`wp-local-env`** — wp-env setup for local and CI test environments
114
+
115
+ ## Escalation
116
+
117
+ - For complex Docker networking in CI, consult the CI platform's Docker-in-Docker documentation
118
+ - For Hostinger-specific deploy hooks, see Hostinger API documentation
119
+ - For multi-environment orchestration (staging → canary → production), consider a dedicated deployment tool (Deployer, Capistrano)