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.

templatesconcept-map.md

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

Concept Map Template

Use this template when the playground is about learning, exploration, or mapping relationships: concept maps, knowledge gap identification, scope mapping, task decomposition with dependencies.

Layout

+--------------------------------------+
|  Canvas (draggable nodes, edges)     |
|  with tooltip on hover               |
+-------------------------+------------+
|                         |            |
|  Sidebar:               | Prompt     |
|  • Knowledge levels     | output     |
|  • Connection types     |            |
|  • Node list            | [Copy]     |
|  • Actions              |            |
+-------------------------+------------+

Canvas-based playgrounds differ from the two-panel split. The interactive visual IS the control — users drag nodes and draw connections rather than adjusting sliders. The sidebar supplements with toggles and list controls.

Control types for concept maps

Decision Control Example
Knowledge level per node Click-to-cycle button in sidebar list Know → Fuzzy → Unknown
Connection type Selector before drawing calls, depends on, contains, reads from
Node arrangement Drag on canvas spatial layout reflects mental model
Which nodes to include Toggle or checkbox per node hide/show concepts
Actions Buttons Auto-layout (force-directed), clear edges, reset

Canvas rendering

Use a <canvas> element with manual draw calls. Key patterns:

  • Hit testing: Check mouse position against node bounding circles on mousedown/mousemove
  • Drag: On mousedown on a node, track offset and update position on mousemove
  • Edge drawing: Click node A, then click node B. Draw arrow between them with the selected relationship type
  • Tooltips: On hover, position a div absolutely over the canvas with description text
  • Force-directed auto-layout: Simple spring simulation — repulsion between all pairs, attraction along edges, iterate 100-200 times with damping
function draw() {
  ctx.clearRect(0, 0, W, H);
  edges.forEach(e => drawEdge(e));  // edges first, under nodes
  nodes.forEach(n => drawNode(n));  // nodes on top
}

Prompt output for concept maps

The prompt should be a targeted learning request shaped by the user's knowledge markings:

"I'm learning [CODEBASE/DOMAIN]. I already understand: [know nodes]. I'm fuzzy on: [fuzzy nodes]. I have no idea about: [unknown nodes]. Here are the relationships I want to understand: [edge list in natural language]. Please explain the fuzzy and unknown concepts, focusing on these relationships. Build on what I already know. Use concrete code references."

Only include edges the user drew. Only mention concepts they marked as fuzzy or unknown in the explanation request.

Pre-populating with real data

For codebases or domains, pre-populate with:

  • Nodes: 15-20 key concepts with real file paths and short descriptions
  • Edges: 20-30 pre-drawn relationships based on actual architecture
  • Knowledge: Default all to "Fuzzy" so the user adjusts from there
  • Presets: "Zoom out" (hide internal nodes, show only top-level), "Focus on [layer]" (highlight nodes in one area)

Example topics

  • Codebase architecture map (modules, data flow, state management)
  • Framework learning (how React hooks connect, Next.js data fetching layers)
  • System design (services, databases, queues, caches and how they relate)
  • Task decomposition (goals → sub-tasks with dependency arrows, knowledge tags)
  • API surface map (endpoints grouped by resource, shared middleware, auth layers)

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.