All skills
paulrberg avatar

/html-playground

@23d7851
by Paul Bergpaulrberg/agent-skills94 stars
7

Use to build interactive single-file HTML playgrounds, explorers, or tools with visual controls, live preview, and prompt copy-out.

Use this Skill: https://skilld.dev/gh/paulrberg/agent-skills/html-playground

This session only. Nothing lands on disk.

templatesdesign-playground.md

≈774 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Design Playground Template

Use this template when the playground is about visual design decisions: components, layouts, spacing, color, typography, animation, or responsive behavior when explicitly requested.

Layout

+-------------------+----------------------+
|                   |                      |
|  Controls         |  Live component/     |
|  grouped by:      |  layout preview      |
|  • Spacing        |  (renders in a       |
|  • Color          |   mock page or       |
|  • Typography     |   isolated card)     |
|  • Shadow/Border  |                      |
|  • Interaction    |                      |
|                   +----------------------+
|                   |  Prompt output       |
|                   |  [ Copy Prompt ]     |
+-------------------+----------------------+

Control types by decision

Decision Control Example
Sizes, spacing, radius Slider border-radius 0–24px
On/off features Toggle show border, hover effect
Choosing from a set Dropdown font-family, easing curve
Colors Hue + saturation + lightness sliders shadow color, accent
Layout structure Clickable cards sidebar-left / top-nav / no-nav
Desktop layout Width or density slider compare a fixed desktop canvas

Preview rendering

Apply state values directly to a preview element's inline styles:

function renderPreview() {
  const el = document.getElementById("preview");
  el.style.borderRadius = state.radius + "px";
  el.style.padding = state.padding + "px";
  el.style.boxShadow = state.shadow
    ? `0 ${state.shadowY}px ${state.shadowBlur}px rgba(0,0,0,${state.shadowOpacity})`
    : "none";
}

Show the preview on both light and dark backgrounds if relevant. Include a context toggle.

Prompt output for design

Frame it as a direction to a developer, not a spec sheet:

"Update the card to feel soft and elevated: 12px border-radius, 24px horizontal padding, a medium box-shadow (0 4px 12px rgba(0,0,0,0.1)). On hover, lift it with translateY(-1px) and deepen the shadow slightly."

If the user is working in Tailwind, suggest Tailwind classes. If raw CSS, use CSS properties.

Example topics

  • Button style explorer (radius, padding, weight, hover/active states)
  • Card component (shadow depth, radius, content layout, image)
  • Layout builder (sidebar width, content max-width, header height, grid)
  • Typography scale (base size, ratio, line heights across h1-body-caption)
  • Color palette generator (primary hue, derive secondary/accent/surface)
  • Dashboard density (airy → compact slider that scales everything proportionally)
  • Modal/dialog (width, overlay opacity, entry animation, corner radius)

Source: SKILL.md on GitHub

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill facilitates the creation of interactive HTML tools that process user-provided data, such as code snippets and comments. This creates a surface for indirect prompt injection if the generated output is used in subsequent agent interactions. It also dynamically generates and executes HTML and JavaScript files.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 23d7851. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month

README badge

README badge for paulrberg/agent-skills/html-playground