|
| 1 | +--- |
| 2 | +name: wpds |
| 3 | +description: "Use when building UIs leveraging the WordPress Design System (WPDS) and its components, tokens, patterns, etc." |
| 4 | +compatibility: "Requires WPDS MCP server configured and running. Targets WordPress 6.9+ (PHP 7.2.24+)." |
| 5 | +--- |
| 6 | + |
| 7 | +# WordPress Design System (WPDS) |
| 8 | + |
| 9 | +## Prerequisites |
| 10 | + |
| 11 | +This skill works best with the **WPDS MCP server** installed. The MCP provides access to WordPress Design System documentation and resources, such as components and DS token lists. |
| 12 | + |
| 13 | +The following terms should be treated as synonyms: |
| 14 | +- "WordPress" and "WP"; |
| 15 | +- "Design System" and "DS"; |
| 16 | +- "WordPress Design System" and "WPDS". |
| 17 | + |
| 18 | +## When to use |
| 19 | + |
| 20 | +Use this skill when the user mentions: |
| 21 | + |
| 22 | +- building and/or reviewing any UI in a WordPress-related context (for example, Gutenberg, WooCommerce, WordPress.com, Jetpack, etc etc); |
| 23 | +- WordPress Design System, WPDS, Design System; |
| 24 | +- UI components, Design tokens, color primitives, spacing scales, typography variables and presets; |
| 25 | +- Specific component packages such as @wordpress/components or @wordpress/ui; |
| 26 | + |
| 27 | +## Rules |
| 28 | + |
| 29 | +### Use the WPDS MCP server to access WPDS-related documentation |
| 30 | + |
| 31 | +- Use the WPDS MCP server to retrieve the canonical, authoritative documentation: |
| 32 | + - reference site (`wpds://pages`) |
| 33 | + - list of available components (`wpds://components`) and specific component information (`wpds://components/:name`) |
| 34 | + - list of available tokens (`wpds://tokens`) |
| 35 | + |
| 36 | +### Required documentation |
| 37 | + |
| 38 | +Before working on any WPDS-related tasks, make sure you read relevant documentation on the reference site. This documentation should take the absolute precedence when evaluating the best course of action for any given tasks. |
| 39 | + |
| 40 | +### Boundaries |
| 41 | + |
| 42 | +- Don't spend too much time on non-UI related aspects of an answer (for example, fetching data from stores, or localizing strings of text). |
| 43 | +- Focus on building UI that adheres as much as possible to the WPDS best practices, uses the most fitting WPDS components/tokens/patterns. |
| 44 | + |
| 45 | +### Tech stack |
| 46 | + |
| 47 | +- Unless you are told otherwise (or gathered specific information from the local context of the request), assume the following tech stack: TypeScript, React, CSS. |
| 48 | + |
| 49 | +### Validation |
| 50 | + |
| 51 | +- If the local context in which a task is running provide lint scripts, use them to validate the proposed code output when possible. |
| 52 | + |
| 53 | +## Output |
| 54 | + |
| 55 | +- Provide a clear and concise explanation of what the solution does, and add context to why each decision was made. |
| 56 | +- Be explicit about the boundaries, ie. what was explicitly left out of the task because not relevant (eg non-ui related). |
| 57 | +- Provide working code snippets |
0 commit comments