SkillAgentSearch skills...

design-api

The standards-based Web Components multitool. Generate Custom Elements Manifests, Dev Server, LSP, and MCP for your app or design system

Install / Use

npx skills add bennypowers/cem --skill design-api

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

79/100

Category

Design

Supported Platforms

Universal

Our assessment of design-api

design-api scores 79/100 on our quality scale, 229th of 267 Design skills we index.

Its SKILL.md is 6.4 KB long, well organised into 25 sections with 5 code examples: a thorough specification that gives an agent plenty to work with.

It has no GitHub stars yet, so there is no community track record; judge it on its content.

Substance
29/30
Structure
20/20
Description
15/15
Adoption
0/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 3 days ago, so design-api is actively maintained.
  • Our last check on 2026-09-26 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 80/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

design-api compared with similar skills

All 4 of these similar skills score higher than design-api; compare them before choosing.

SkillScoreStarsUpdatedFormat
design-api (this skill)by bennypowers7903d agoSKILL.md
taste-skillby Leonxlnx100110.6ktodayCLAUDE.md
Agent-Reachby Panniantong100109.2ktodayCLAUDE.md
headroomby headroomlabs-ai10078.9ktodayCLAUDE.md
CowAgentby zhayujie10047.8ktodayCLAUDE.md

Frequently asked questions

How do I install design-api?
Run npx skills add bennypowers/cem --skill design-api. The install tabs above show the steps for each supported agent.
Which AI agents does design-api work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is design-api safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 80/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is design-api still maintained?
The repository was last updated 3 days ago, so design-api is actively maintained.

name: design-api description: > Design a custom element's public API e.g. attributes, properties, events, slots, CSS parts and custom properties. Use when the user asks to "design an element", "plan a component API", "create element API", "design component interface", or discusses naming conventions, API surface, or element architecture. tools: Read

Element API Design

Guide the design of a custom element's public API, ensuring consistency with existing elements and CEM conventions.

Workflow

Phase 1: Understand the Element

Ask the user (if not already provided):

  1. What is the element's purpose?
  2. What content does it render or contain?
  3. What interactions does it support?
  4. Are there existing elements it should be consistent with?

Phase 2: Survey Existing Conventions

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:

  • Tag naming: prefix conventions, naming style
  • Attribute naming: kebab-case patterns, boolean naming (e.g. disabled vs is-disabled)
  • Event naming: prefix patterns, past tense vs present
  • Slot naming: header, footer, actions patterns
  • CSS part naming: conventions for internal structure
  • CSS custom property naming: --element-property patterns

Phase 3: Design the API

Work through each API surface systematically:

Tag Name

  • Follow the project's tag prefix convention
  • Name should describe what the element is, not what it does
  • Avoid overly generic names

Attributes & Properties

  • Use kebab-case for attribute names
  • Use camelCase for corresponding property names
  • Boolean attributes should be positive (disabled, not enabled)
  • Enum attributes should list all valid values
  • Consider which attributes reflect to properties and vice versa
  • Provide sensible defaults
  • Document type constraints
  • Prefer CSS states to reflected state attributes

Slots

  • Use the default slot for primary content
  • Name slots by their semantic role (header, actions), not position (top, bottom)
  • Write content guidelines for each slot
  • Consider what content types are appropriate

Events

  • Name events in past tense for state changes (opened, closed)
  • Name events in present tense for ongoing actions (input, scroll)
  • Use the element prefix if events could conflict with native events
  • Design event detail types with the minimum necessary data
  • Document what triggers each event
  • Prefer to subclass Event for type safety, rather than to ship CustomEvent

CSS Custom Properties

  • Follow --element-name-property naming convention
  • Provide defaults that work in both light and dark themes
  • Group related properties (color, spacing, typography)
  • Consider which properties consumers will most likely want to override
  • Prefer to use existing design tokens rather than to add element-specific props

CSS Nesting

  • Use native CSS nesting for descendant selectors within shadow DOM
  • Don't nest :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
  • Keep :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; }
}

CSS Parts

  • Name parts after the internal element they expose (button, label, icon)
  • Only expose parts that consumers need to style
  • Don't expose implementation details that may change

CSS States

  • Use custom states for element-specific states (:state(loading), :state(empty))
  • Map to existing CSS pseudo-classes where appropriate
  • Document state transitions

Phase 4: Source Documentation

When presenting the designed API, show how each part should be documented in source code.

!cat ${CLAUDE_SKILL_DIR}/html-comment-syntax.md

Phase 5: Consistency Check

Compare the proposed API against existing elements:

  • Are similar concepts named the same way?
  • Do shared attribute names have compatible types?
  • Are event patterns consistent?
  • Do CSS property names follow the same scheme?

Phase 6: Output

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.

Design Principles

  • Minimal API surface: Don't add attributes "just in case" — each should serve a clear purpose
  • Consistency over novelty: Match existing patterns in the project, even if you'd name things differently in isolation
  • Attributes for HTML, properties for JS: Attributes should be serializable; complex data goes through properties only
  • Slots over attributes for rich content: If content could be more than a plain string, use a slot
  • CSS custom properties for theming, parts for structure: Properties for colors/spacing, parts for layout overrides
  • Clarify: If an API can't be clearly and succinctly described in plain English, that likely indicates a design flaw.

Related Skills

View on GitHub
GitHub Stars0
CategoryDesign
Updated3d ago
Forks0

Trust signals

80/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium1 low