wp-skills 1.0.0 → 1.0.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.
package/LICENSE CHANGED
@@ -1,16 +1,15 @@
1
- Agent Skills for WordPress
2
- Copyright (C) 2026 WordPress Contributors
1
+ Duke Dev License
3
2
 
4
- This program is free software; you can redistribute it and/or modify
5
- it under the terms of the GNU General Public License as published by
6
- the Free Software Foundation; either version 2 of the License, or
7
- (at your option) any later version.
3
+ Copyright (c) 2026 Duke Dev
4
+ All rights reserved.
8
5
 
9
- This program is distributed in the hope that it will be useful,
10
- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- GNU General Public License for more details.
6
+ Permission to use, copy, modify, and distribute this software is granted only
7
+ with explicit written permission from Duke Dev.
13
8
 
14
- You should have received a copy of the GNU General Public License along
15
- with this program; if not, write to the Free Software Foundation, Inc.,
16
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11
+ FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE
12
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
13
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM,
14
+ OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
15
+ SOFTWARE.
package/README.md CHANGED
@@ -32,6 +32,10 @@ Agent Skills solve this by giving AI assistants **expert-level WordPress knowled
32
32
  | **wp-performance** | Profiling, caching, database optimization, Server-Timing |
33
33
  | **wp-phpstan** | PHPStan static analysis for WordPress projects (config, baselines, WP-specific typing) |
34
34
  | **wp-playground** | WordPress Playground for instant local environments |
35
+ | **classic-theme-dev** | Classic theme architecture, template hierarchy, URL-to-template-hook mapping, refactoring |
36
+ | **block-theme-dev** | Block theme architecture (`theme.json`, templates/parts, patterns), migration planning |
37
+ | **frontend-wp** | CSS/SCSS architecture, JS behavior, WordPress enqueue/performance patterns |
38
+ | **wp-dev-workflow** | Feature scaffolding, WordPress-focused code review, migration/backward compatibility |
35
39
  | **wpds** | WordPress Design System |
36
40
 
37
41
  ## Quick Start
@@ -154,4 +158,4 @@ node eval/harness/run.mjs
154
158
 
155
159
  ## License
156
160
 
157
- GPL-2.0-or-later
161
+ Duke Dev
@@ -13,6 +13,12 @@ This repo currently includes:
13
13
  - `wp-wpcli-and-ops`
14
14
  - `wp-performance`
15
15
  - `wp-phpstan`
16
+ - `wp-playground`
17
+ - `wpds`
18
+ - `classic-theme-dev`
19
+ - `block-theme-dev`
20
+ - `frontend-wp`
21
+ - `wp-dev-workflow`
16
22
 
17
23
  Planned next skills (not yet implemented):
18
24
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "wp-skills",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "WordPress Agent Skills installer and packager",
5
- "license": "GPL-2.0-or-later",
5
+ "license": "Duke Dev",
6
6
  "type": "module",
7
7
  "bin": {
8
8
  "wp-skills": "shared/scripts/skillpack-cli.mjs",
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: block-theme-dev
3
+ description: Use when building or migrating WordPress block themes using theme.json, templates/parts, patterns, and custom block integration.
4
+ compatibility: Targets WordPress 6.9+ (PHP 7.2.24+). Filesystem-based agent with bash + node.
5
+ ---
6
+
7
+ # Block Theme Dev
8
+
9
+ ## When to use
10
+
11
+ Use this skill for block themes and hybrid migrations when the task touches:
12
+
13
+ - `theme.json` settings/styles,
14
+ - `templates/*.html` and `parts/*.html`,
15
+ - block patterns,
16
+ - classic -> block theme migration,
17
+ - block-theme rendering/debugging in Site Editor workflows.
18
+
19
+ ## Inputs required
20
+
21
+ - Repo root.
22
+ - Target template/page type or user flow.
23
+ - Desired design/system constraints (colors, spacing, typography, layout).
24
+ - Migration scope (full block theme vs hybrid).
25
+
26
+ ## Procedure
27
+
28
+ 1. Classify and confirm block-theme context:
29
+ - `node skills/wp-project-triage/scripts/detect_wp_project.mjs`
30
+ - Confirm signals: `theme.json`, `templates/`, `parts/`, pattern registration.
31
+ 2. Audit current theme model:
32
+ - Review `theme.json` for global styles, presets, spacing/layout constraints.
33
+ - Map template and part coverage for home/single/page/archive/404/header/footer.
34
+ 3. Implement requested change in the smallest stable layer:
35
+ - Global design tokens -> `theme.json`.
36
+ - Page structure -> `templates/*.html` and `parts/*.html`.
37
+ - Reusable content sections -> patterns.
38
+ 4. For pattern work:
39
+ - Use deterministic slugs and categories.
40
+ - Prefer core blocks and minimal custom CSS hooks.
41
+ - Ensure pattern markup is editable by content teams.
42
+ 5. For classic -> block migration:
43
+ - Preserve parity first (header/footer/core layouts) before enhancement.
44
+ - Flag likely breakpoints: shortcode-dependent sections, widget areas, hard-coded template logic.
45
+ - Keep backward compatibility notes in the response.
46
+
47
+ ## Verification
48
+
49
+ - Validate changed templates/parts and `theme.json` syntax.
50
+ - Verify intended template selection for target URLs/page types.
51
+ - Run project lint/build/test commands when available.
52
+
53
+ ## Failure modes / debugging
54
+
55
+ - Styles not applying:
56
+ - check `theme.json` scope and preset references.
57
+ - Wrong template used:
58
+ - verify template hierarchy and slug naming.
59
+ - Pattern regressions:
60
+ - test insertion/editing in editor to ensure block validity.
61
+
62
+ ## Escalation
63
+
64
+ If migration scope is unclear, ask one question:
65
+
66
+ - "Do you want full block-theme migration or hybrid with classic templates kept?"
67
+
68
+ ## Do not do
69
+
70
+ - Do not remove classic templates/widgets without explicit migration approval.
71
+ - Do not hard-code environment-specific URLs/IDs in patterns/templates.
72
+ - Do not bypass validation for block markup changes.
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: classic-theme-dev
3
+ description: Use when building, refactoring, or debugging classic WordPress themes with template hierarchy, hooks, and URL-to-template mapping.
4
+ compatibility: Targets WordPress 6.9+ (PHP 7.2.24+). Filesystem-based agent with bash + node.
5
+ ---
6
+
7
+ # Classic Theme Dev
8
+
9
+ ## When to use
10
+
11
+ Use this skill for classic themes (`style.css` header + PHP templates) when the task involves:
12
+
13
+ - theme architecture analysis,
14
+ - URL -> template -> hook mapping,
15
+ - template hierarchy decisions,
16
+ - hook/filter-based UI or query customization,
17
+ - refactoring legacy `functions.php` and template logic.
18
+
19
+ ## Inputs required
20
+
21
+ - Repo root.
22
+ - Target URL or page type (home, single, archive, taxonomy, search).
23
+ - Desired change (UI, query, metadata, behavior).
24
+ - Constraints (child theme policy, backward compatibility requirements).
25
+
26
+ ## Procedure
27
+
28
+ 1. Classify project context:
29
+ - `node skills/wp-project-triage/scripts/detect_wp_project.mjs`
30
+ - Confirm classic theme signals: `style.css` theme header, PHP templates, no mandatory `templates/*.html` rendering path.
31
+ 2. Build architecture map (text output in response):
32
+ - Locate registration and bootstrap points with `rg`:
33
+ - `add_theme_support|register_nav_menus|register_sidebar|add_image_size`
34
+ - `register_post_type|register_taxonomy|add_shortcode`
35
+ - `add_action|add_filter|remove_action|remove_filter`
36
+ - Summarize: request entry -> query shaping -> template chosen -> key hooks/functions used.
37
+ 3. Map URL to template/hook path:
38
+ - Apply template hierarchy rules (`single-{post_type}.php`, `archive-{post_type}.php`, `category-{slug}.php`, etc.).
39
+ - Check custom overrides (`template_include`, `pre_get_posts`, custom query args).
40
+ - Provide exact candidate files and hook insertion points.
41
+ 4. Implement with safe theme patterns:
42
+ - Keep templates focused on rendering; move business logic to reusable functions/classes under `inc/` or `src/`.
43
+ - Prefer `get_template_part()` for repeated sections.
44
+ - Prefer hooks/filters over invasive template rewrites when possible.
45
+ 5. Produce hook map delta when editing hooks:
46
+ - Note added/changed/removed actions and filters.
47
+
48
+ ## Verification
49
+
50
+ - Run available project checks from triage output (lint/tests/build).
51
+ - Lint changed PHP files (at minimum `php -l <file>` when toolchain is absent).
52
+ - Confirm affected URL/page type resolves to intended template and no fatal error is introduced.
53
+
54
+ ## Failure modes / debugging
55
+
56
+ - Wrong template selected:
57
+ - inspect hierarchy-specific filenames and any `template_include` filters.
58
+ - Query side effects:
59
+ - verify `pre_get_posts` guards (`is_admin`, `is_main_query`, conditional checks).
60
+ - Mixed classic + block behavior:
61
+ - check whether hybrid/block templates are taking precedence.
62
+
63
+ ## Escalation
64
+
65
+ Ask one clarifying question if URL/page target is ambiguous:
66
+
67
+ - "Which exact URL and user-visible section should be changed?"
68
+
69
+ ## Do not do
70
+
71
+ - Do not modify database schema/content directly.
72
+ - Do not edit vendor/core/plugin files unless explicitly requested.
73
+ - Do not perform destructive mass replacements without dry-run and approval.
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: frontend-wp
3
+ description: Use when implementing WordPress frontend CSS/SCSS architecture, JavaScript behavior, and asset loading/performance across classic and block themes.
4
+ compatibility: Targets WordPress 6.9+ (PHP 7.2.24+). Filesystem-based agent with bash + node.
5
+ ---
6
+
7
+ # Frontend WP
8
+
9
+ ## When to use
10
+
11
+ Use this skill when building or refactoring theme frontend behavior and styling for:
12
+
13
+ - CSS/SCSS architecture,
14
+ - Gutenberg editor vs frontend styling boundaries,
15
+ - JavaScript behavior (menu, modal, accordion, tabs, lazy-load),
16
+ - WordPress enqueue strategy and performance.
17
+
18
+ ## Inputs required
19
+
20
+ - Repo root and target UI component/page.
21
+ - Existing CSS strategy (BEM, ITCSS, utility-first, custom).
22
+ - Browser/performance constraints and plugin compatibility constraints.
23
+
24
+ ## Procedure
25
+
26
+ 1. Discover stack and conventions:
27
+ - Identify existing CSS organization and naming rules.
28
+ - Identify JS build/runtime path and enqueue points (`wp_enqueue_style`, `wp_enqueue_script`).
29
+ 2. Align with one style strategy (do not mix ad hoc):
30
+ - Keep tokens/variables centralized.
31
+ - Separate base/layout/components/utilities if project supports layering.
32
+ 3. Implement styles with editor/frontend separation:
33
+ - Frontend styles for site output.
34
+ - Editor-specific styles only when necessary for parity.
35
+ 4. Implement JS behavior with WP-safe loading:
36
+ - Register/enqueue with dependencies and predictable handles.
37
+ - Avoid inline JS unless no alternative exists.
38
+ - Ensure behavior degrades safely if dependency is missing.
39
+ 5. Optimize delivery:
40
+ - Avoid duplicate bundles.
41
+ - Load only where needed.
42
+ - Minimize conflicts with plugins/page builders by scoping selectors and events.
43
+
44
+ ## Verification
45
+
46
+ - Validate no console errors on affected pages.
47
+ - Validate behavior works without breaking editor experience.
48
+ - Run available lint/build/test commands.
49
+
50
+ ## Failure modes / debugging
51
+
52
+ - Style leaks:
53
+ - tighten selector scope and component boundaries.
54
+ - Script conflicts:
55
+ - verify handle uniqueness and dependency order.
56
+ - Editor mismatch:
57
+ - check editor-only style loading and block wrapper classes.
58
+
59
+ ## Escalation
60
+
61
+ If style system is inconsistent, ask one question:
62
+
63
+ - "Should I standardize this change on the current project convention or introduce a new CSS architecture now?"
64
+
65
+ ## Do not do
66
+
67
+ - Do not add large frontend dependencies without explicit approval.
68
+ - Do not enqueue global assets for single-page-only features unless requested.
69
+ - Do not use brittle selectors tied to dynamic plugin-generated markup when stable hooks exist.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: wordpress-router
3
- description: "Use when the user asks about WordPress codebases (plugins, themes, block themes, Gutenberg blocks, WP core checkouts) and you need to quickly classify the repo and route to the correct workflow/skill (blocks, theme.json, REST API, WP-CLI, performance, security, testing, release packaging)."
3
+ description: "Use when the user asks about WordPress codebases (plugins, themes, block themes, Gutenberg blocks, WP core checkouts) and you need to quickly classify the repo and route to the correct workflow/skill (classic theme dev, block theme dev, frontend, workflow/review, blocks, REST API, WP-CLI, performance, security, testing, release packaging)."
4
4
  compatibility: "Targets WordPress 6.9+ (PHP 7.2.24+). Filesystem-based agent with bash + node. Some workflows require WP-CLI."
5
5
  ---
6
6
 
@@ -30,6 +30,11 @@ Use this skill at the start of most WordPress tasks to:
30
30
  - any version hints.
31
31
  3. Route to domain workflows based on user intent + repo kind:
32
32
  - For the decision tree, read: `skills/wordpress-router/references/decision-tree.md`.
33
+ - Prefer team-package skills when the request spans multiple concerns:
34
+ - `classic-theme-dev`
35
+ - `block-theme-dev`
36
+ - `frontend-wp`
37
+ - `wp-dev-workflow`
33
38
  4. Apply guardrails before making changes:
34
39
  - Confirm any version constraints if unclear.
35
40
  - Prefer the repo’s existing tooling and conventions for builds/tests.
@@ -30,7 +30,15 @@ Route by intent even if repo kind is broad (like `wp-site`):
30
30
  - **Blocks / block.json / registerBlockType / attributes / save serialization**
31
31
  - Route → `wp-block-development`.
32
32
  - **theme.json / Global Styles / templates/*.html / patterns/**
33
- - Route → `wp-block-themes`.
33
+ - Route → `block-theme-dev` (team package), or `wp-block-themes` for focused theme.json/template guidance.
34
+ - **Classic templates / template hierarchy / get_template_part / functions.php refactor**
35
+ - Route → `classic-theme-dev`.
36
+ - **URL to template mapping / pre_get_posts / theme hook map**
37
+ - Route → `classic-theme-dev`.
38
+ - **Frontend CSS/SCSS architecture / enqueue assets / JS behavior in themes**
39
+ - Route → `frontend-wp`.
40
+ - **Feature scaffolding / WordPress code review / migration + backward compatibility**
41
+ - Route → `wp-dev-workflow`.
34
42
  - **Plugins / hooks / activation hook / uninstall / Settings API / admin pages**
35
43
  - Route → `wp-plugin-development`.
36
44
  - **REST endpoint / register_rest_route / permission_callback**
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: wp-dev-workflow
3
+ description: Use when scaffolding WordPress features, performing WordPress-focused code review, and planning migrations with backward compatibility safeguards.
4
+ compatibility: Targets WordPress 6.9+ (PHP 7.2.24+). Filesystem-based agent with bash + node. Some workflows require WP-CLI.
5
+ ---
6
+
7
+ # WP Dev Workflow
8
+
9
+ ## When to use
10
+
11
+ Use this skill for team workflow tasks that cut across theme/plugin/block work:
12
+
13
+ - feature scaffolding and boilerplate,
14
+ - WordPress-focused code review,
15
+ - migration planning and backward compatibility checks,
16
+ - release-readiness checklists.
17
+
18
+ ## Inputs required
19
+
20
+ - Repo root.
21
+ - Task type: scaffold, review, or migration.
22
+ - Scope and constraints (deadline, risk tolerance, compatibility target versions).
23
+
24
+ ## Procedure
25
+
26
+ 1. Classify project and tooling first:
27
+ - `node skills/wp-project-triage/scripts/detect_wp_project.mjs`
28
+ 2. Choose workflow path:
29
+ - Scaffold path: generate files/hooks/entry points aligned with existing architecture.
30
+ - Review path: inspect security/perf/maintainability issues with concrete file-level findings.
31
+ - Migration path: produce checklist and rollout plan with rollback steps.
32
+ 3. Scaffold path requirements:
33
+ - Create minimal working structure with TODO markers only where needed.
34
+ - Include hook insertion points and test targets.
35
+ 4. Review path requirements:
36
+ - Security checks: nonce, capability checks, sanitization, escaping, REST permissions.
37
+ - Performance checks: query volume, cache strategy, asset load scope.
38
+ - Maintainability checks: separation of concerns, function/class size, duplicated logic.
39
+ 5. Migration path requirements:
40
+ - Track entities impacted: templates, blocks, CPT/taxonomy, metadata, shortcodes, URLs.
41
+ - Detect backward-compat traps: hard-coded IDs, legacy hooks, brittle serialized content.
42
+ - Prefer reversible changes and phased rollout.
43
+
44
+ ## Verification
45
+
46
+ - Run available lint/build/tests from project tooling.
47
+ - For migrations, provide explicit pre/post verification checklist.
48
+ - For reviews, prioritize findings by severity and include exact file references.
49
+
50
+ ## Failure modes / debugging
51
+
52
+ - Incomplete migration scope:
53
+ - re-check content dependencies (blocks/shortcodes/meta) and CLI scripts.
54
+ - Review without actionable output:
55
+ - convert general comments into concrete patch suggestions.
56
+ - Scaffold drift:
57
+ - ensure generated structure matches current repo conventions.
58
+
59
+ ## Escalation
60
+
61
+ Ask one question when scope is ambiguous:
62
+
63
+ - "Should I optimize for fastest delivery or safest migration/review depth?"
64
+
65
+ ## Do not do
66
+
67
+ - Do not run destructive DB/content operations without explicit approval.
68
+ - Do not claim migration safety without listing verified checks.
69
+ - Do not introduce new architecture patterns that conflict with existing team standards unless requested.
@@ -25,7 +25,12 @@ Use this skill to quickly understand what kind of WordPress repo you’re in and
25
25
  - PHP/Node tooling present
26
26
  - tests present
27
27
  - version hints and sources
28
- 4. If the report is missing signals you need, update the detector rather than guessing.
28
+ 4. Route to the right execution skill from classification:
29
+ - `wp-theme` -> `classic-theme-dev`
30
+ - `wp-block-theme` -> `block-theme-dev`
31
+ - frontend implementation tasks -> `frontend-wp`
32
+ - scaffolding/review/migration tasks -> `wp-dev-workflow`
33
+ 5. If the report is missing signals you need, update the detector rather than guessing.
29
34
 
30
35
  ## Verification
31
36