Guides the design of a custom element's public API including attributes, properties, events, slots, CSS parts, and custom properties. Useful when planning component interfaces or naming conventions.
Ships in cem. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Guide the design of a custom element's public API, ensuring consistency with existing elements and CEM conventions.
Ask the user (if not already provided):
Read the existing elements to understand naming patterns:
cem://elements
For elements the user mentions as related or similar, read their full APIs:
cem://element/{tagName}
Also read any project-level guidelines:
cem://guidelines
Note existing patterns for:
disabled vs is-disabled)header, footer, actions patterns--element-property patternsWork through each API surface systematically:
disabled, not enabled)header, actions), not position (top, bottom)opened, closed)input, scroll)Event for type safety, rather than to ship CustomEvent--element-name-property naming convention:host attribute selectors with & -- &([attr]) inside :host {} is invalid because & substitutes :host literally, making &([attr]) parse as a function call rather than an attribute selector:host([variant="..."]) blocks flat at the top level; nesting is valid for descendants within those blocks/* WRONG: &([attr]) is invalid */
:host {
&([variant="primary"]) { ... }
}
/* RIGHT: flat :host selectors, nested descendants */
:host([variant="primary"]) {
--_color: blue;
}
:host([variant="primary"]) button {
&:hover { --_color: darkblue; }
&:active { --_color: navy; }
}
button, label, icon):state(loading), :state(empty))When presenting the designed API, show how each part should be documented in source code.
!cat ${CLAUDE_SKILL_DIR}/html-comment-syntax.md
Compare the proposed API against existing elements:
Present the designed API as a structured summary:
## `<prefix-element-name>` API Design
### Description
[One-paragraph purpose statement]
### Attributes
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `variant` | `'primary' \| 'secondary'` | `'primary'` | Visual style variant |
### Slots
| Name | Description | Content Guidelines |
|------|-------------|--------------------|
| (default) | Primary content | Text or inline elements |
### Events
| Name | Type | Description |
|------|-------------|-------------|
| `change` | `MyChangeEvent` | Fired when value changes |
### CSS Custom Properties
| Name | Default | Description |
|------|---------|-------------|
| `--prefix-element-color` | `light-dark(#000, #fff)` | Primary text color |
### CSS Parts
| Name | Description |
|------|-------------|
| `button` | The internal button element |
### CSS States
| Name | Description |
|------|-------------|
| `loading` | Applied while async content loads |
Optionally, generate a skeleton class definition or manifest snippet if the user wants to start implementing.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
12 skills in this plugin
/a11y-reviewReview custom element HTML for accessibility issues. Use when the user asks to "review accessibility", "check a11y", "audit accessibility", "find accessibility issues", or mentions "WCAG", "screen reader", "keyboard navigation", or "ARIA" in the context of custom elements.
/angularShow how to use custom elements in Angular, including required CUSTOM_ELEMENTS_SCHEMA configuration. Use when the user asks to "use in Angular", "Angular custom elements", "custom elements in Angular", "CUSTOM_ELEMENTS_SCHEMA", or mentions "Angular module", "standalone component", or "angular integration"./cem-serveSet up cem serve for custom element development. Use when the user asks to "start dev server", "set up cem serve", "preview elements", "run demos", or needs help configuring the dev server, import maps, or CSS transforms.
/cem:design-apifrom cem
npx claudepluginhub bennypowers/cem --plugin cemOther plugins' skills for the same job