Playground

by anthropicsb78ac49cdc6bNo license37K starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated today

Creates interactive HTML playgrounds — self-contained single-file explorers that let users configure something visually through controls, see a live preview, and copy out a prompt. Use when the user asks to make a playground, explorer, or interactive tool for a topic.

FeaturedInstructions onlyDesign & CreativeSoftware Development
AI-generated overview

Builds self-contained interactive HTML playgrounds with controls, live preview, and copyable prompt output.

What it does
Guides the agent in producing a single self-contained HTML file with interactive controls on one side, a live preview on the other, and a natural-language prompt output with a copy button. It supplies six templates covering design decisions, data and query building, concept mapping, document critique, diff review, and codebase architecture. The skill specifies core requirements such as inlined CSS and JS, instant preview updates, sensible defaults and presets, and a dark theme, plus a state-management and prompt-output pattern.
When to use it
Use when the user asks for an interactive playground, explorer, or visual tool for a topic, especially when the input space is large, visual, or structural and hard to express as plain text.
Requirements
Instructions only; no scripts are shipped. The agent writes an HTML file and the skill instructs running the shell command open .html to launch it in the default browser. Templates are model-readable markdown files in templates/. No external dependencies are allowed in the generated file.

Playground Builder

A playground is a self-contained HTML file with interactive controls on one side, a live preview on the other, and a prompt output at the bottom with a copy button. The user adjusts controls, explores visually, then copies the generated prompt back into Claude.

When to use this skill

When the user asks for an interactive playground, explorer, or visual tool for a topic — especially when the input space is large, visual, or structural and hard to express as plain text.

How to use this skill

  1. Identify the playground type from the user's request
  2. Load the matching template from templates/:
    • templates/design-playground.md — Visual design decisions (components, layouts, spacing, color, typography)
    • templates/data-explorer.md — Data and query building (SQL, APIs, pipelines, regex)
    • templates/concept-map.md — Learning and exploration (concept maps, knowledge gaps, scope mapping)
    • templates/document-critique.md — Document review (suggestions with approve/reject/comment workflow)
    • templates/diff-review.md — Code review (git diffs, commits, PRs with line-by-line commenting)
    • templates/code-map.md — Codebase architecture (component relationships, data flow, layer diagrams)
  3. Follow the template to build the playground. If the topic doesn't fit any template cleanly, use the one closest and adapt.
  4. Open in browser. After writing the HTML file, run open <filename>.html to launch it in the user's default browser.

Core requirements (every playground)

  • Single HTML file. Inline all CSS and JS. No external dependencies.
  • Live preview. Updates instantly on every control change. No "Apply" button.
  • Prompt output. Natural language, not a value dump. Only mentions non-default choices. Includes enough context to act on without seeing the playground. Updates live.
  • Copy button. Clipboard copy with brief "Copied!" feedback.
  • Sensible defaults + presets. Looks good on first load. Include 3-5 named presets that snap all controls to a cohesive combination.
  • Dark theme. System font for UI, monospace for code/values. Minimal chrome.

State management pattern

Keep a single state object. Every control writes to it, every render reads from it.

javascript
const state = { /* all configurable values */ };
function updateAll() {  renderPreview(); // update the visual  updatePrompt();  // rebuild the prompt text}// Every control calls updateAll() on change

Prompt output pattern

javascript
function updatePrompt() {  const parts = [];
  // Only mention non-default values  if (state.borderRadius !== DEFAULTS.borderRadius) {    parts.push(`border-radius of ${state.borderRadius}px`);  }
  // Use qualitative language alongside numbers  if (state.shadowBlur > 16) parts.push('a pronounced shadow');  else if (state.shadowBlur > 0) parts.push('a subtle shadow');
  prompt.textContent = `Update the card to use ${parts.join(', ')}.`;}

Common mistakes to avoid

  • Prompt output is just a value dump → write it as a natural instruction
  • Too many controls at once → group by concern, hide advanced in a collapsible section
  • Preview doesn't update instantly → every control change must trigger immediate re-render
  • No defaults or presets → starts empty or broken on load
  • External dependencies → if CDN is down, playground is dead
  • Prompt lacks context → include enough that it's actionable without the playground

Source and attribution

Source:anthropics/claude-plugins-officialinplugins/playground/skills/playgroundat commitb78ac49

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal

More from anthropics/claude-plugins-official

Skill Development

anthropics

Featured

Guides creation of Claude Code plugin skills, covering structure, descriptions, progressive disclosure and validation.

AI & Agents37Kupdated today

Plugin Structure

anthropics

Featured

Guides the structure, manifest, and component layout of Claude Code plugins.

AI & Agents37Kupdated today

Project Artifact

anthropics

Featured

Generate and publish a project status artifact — an opinionated, tabbed status page for a project too big for one update (overview & success criteria, the workstream sequence, next steps, plus background, plan, risks & open questions, and decisions/FAQ when they earn a tab) — published with the built-in Artifact tool to a default-private claude.ai page the user can share with teammates. Use when a piece of work spans several workstreams and you want a shareable overview kept current. Each artifact is backed by a small per-project config in the plugin data dir, so refreshing it re-gathers live state, redeploys the same URL, and reports only the delta. For software projects whose workstreams are PRs, also read swe.md (the X.Y PR-numbering convention; pulling PR state with gh/git; a per-PR detail block). Needs the built-in Artifact tool (claude.ai login). Not for single-PR changes or public docs.

Awaiting classification37Kupdated today

Command Development

anthropics

Featured

Guides creation of Claude Code slash commands, covering structure, YAML frontmatter, arguments and plugin features.

AI & Agents37Kupdated today

M5 Onboard

anthropics

Featured

Provisions M5Stack ESP32 boards by detecting them on USB, flashing UIFlow 2.0 firmware, and installing a MicroPython app bundle.

DevOps & Cloud37Kupdated today

Cardputer Buddy

anthropics

Featured

Guides iterating on a Cardputer-Adv MicroPython app bundle: adding apps, pushing files over USB-serial, tailing logs, and running REPL commands.

Software Development37Kupdated today