All skills
anthropics avatar

/playground

@4e459fb

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.

Use this Skill: https://skilld.dev/gh/anthropics/claude-plugins-official/playground

This session only. Nothing lands on disk.

templatesdata-explorer.md

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

Data Explorer Template

Use this template when the playground is about data queries, APIs, pipelines, or structured configuration: SQL builders, API designers, regex builders, pipeline visuals, cron schedules.

Layout

+-------------------+----------------------+
|                   |                      |
|  Controls         |  Formatted output    |
|  grouped by:      |  (syntax-highlighted |
|  • Source/tables  |   code, or a         |
|  • Columns/fields |   visual diagram)    |
|  • Filters        |                      |
|  • Grouping       |                      |
|  • Ordering       |                      |
|  • Limits         |                      |
|                   +----------------------+
|                   |  Prompt output       |
|                   |  [ Copy Prompt ]     |
+-------------------+----------------------+

Control types by decision

Decision Control Example
Select from available items Clickable cards/chips table names, columns, HTTP methods
Add filter/condition rows Add button → row of dropdowns + input WHERE column op value
Join type or aggregation Dropdown per row INNER/LEFT/RIGHT, COUNT/SUM/AVG
Limit/offset Slider result count 1–500
Ordering Dropdown + ASC/DESC toggle order by column
On/off features Toggle show descriptions, include header

Preview rendering

Render syntax-highlighted output using <span> tags with color classes:

function renderPreview() {
  const el = document.getElementById('preview');
  // Color-code by token type
  el.innerHTML = sql
    .replace(/\b(SELECT|FROM|WHERE|JOIN|ON|GROUP BY|ORDER BY|LIMIT)\b/g, '<span class="kw">$1</span>')
    .replace(/\b(users|orders|products)\b/g, '<span class="tbl">$1</span>')
    .replace(/'[^']*'/g, '<span class="str">$&</span>');
}

For pipeline-style playgrounds, render a horizontal or vertical flow diagram using positioned divs with arrow connectors.

Prompt output for data

Frame it as a specification of what to build, not the raw query itself:

"Write a SQL query that joins orders to users on user_id, filters for orders after 2024-01-01 with total > $50, groups by user, and returns the top 10 users by order count."

Include the schema context (table names, column types) so the prompt is self-contained.

Example topics

  • SQL query builder (tables, joins, filters, group by, order by, limit)
  • API endpoint designer (routes, methods, request/response field builder)
  • Data transformation pipeline (source → filter → map → aggregate → output)
  • Regex builder (sample strings, match groups, live highlight)
  • Cron schedule builder (visual timeline, interval, day toggles)
  • GraphQL query builder (type selection, field picker, nested resolvers)

Source: SKILL.md on GitHub

No alerts17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    The playground skill enables the creation of interactive HTML tools. It includes security considerations such as indirect prompt injection and command execution, which are integral to its functionality. The skill also employs positive security practices by avoiding external dependencies.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer7mo

    7 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

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

Last checked against GitHub yesterday.

Activeupdated 8 months ago
  • playground
  • html
  • interactive
  • visual-builder
  • prompt-generation
  • design-tools
  • data-explorer
  • code-review

README badge

README badge for anthropics/claude-plugins-official/playground

Creates self-contained HTML playgrounds with interactive controls, live preview, and generated prompts that users can copy back to Claude. Includes templates for design decisions, data exploration, concept mapping, document review, code review, and codebase architecture.

Generated from the current SKILL.md.

What is a playground in this context?
A playground is a self-contained single-file HTML explorer where users adjust interactive controls to see live preview updates and generate a copy-able prompt to feed back into Claude.
Can I use external libraries or CDN dependencies?
No. Every playground must be a single HTML file with all CSS and JavaScript inlined. External dependencies make the playground fragile.
Which template should I use if the topic doesn't fit cleanly?
Pick the template closest to your use case and adapt it. The skill provides six templates (design, data explorer, concept map, document critique, diff review, code map) covering most scenarios.
Do I need to include an 'Apply' button for changes to take effect?
No. The preview and prompt must update instantly as the user adjusts controls, without requiring an Apply or Submit action.
What should the prompt output contain?
Natural language instructions that mention only non-default choices and include enough context to be actionable without seeing the playground. It should not be a raw value dump.

Generated from the current SKILL.md. These answers refresh after source changes.