Playground

作者 anthropicsb78ac49cdc6b無授權條款37K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

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.

AI 產生的概覽

建立自成一體的互動式 HTML 遊樂場,包含控制項、即時預覽與可複製的提示詞輸出。

功能
引導代理產生單一自成一體的 HTML 檔案:一側是互動控制項,另一側是即時預覽,底部是自然語言提示詞輸出與複製按鈕。技能提供六個範本,分別涵蓋視覺設計決策、資料與查詢建構、概念圖、文件審閱、差異審查與程式碼庫架構。技能也訂出核心要求,例如內嵌 CSS 與 JS、預覽即時更新、合理的預設值與預設組合、深色主題,以及狀態管理與提示詞輸出的撰寫方式。
適用情境
當使用者要求為某個主題製作互動式遊樂場、瀏覽器或視覺化工具時使用,特別適合輸入空間龐大、偏視覺或偏結構、難以用純文字表達的情況。
執行需求
僅為指示性內容,未附帶指令碼。代理需寫出 HTML 檔案,技能要求執行 shell 指令 open .html 以在預設瀏覽器中開啟。範本為 templates/ 下可供模型讀取的 Markdown 檔案。產生的檔案不得使用外部相依項目。

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

來源與署名

來源:anthropics/claude-plugins-official位於plugins/playground/skills/playground提交b78ac49

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 anthropics/claude-plugins-official 的技能

Skill Development

anthropics

精選

指導建立 Claude Code 外掛技能,涵蓋結構、描述、漸進式揭露與驗證。

AI & Agents37K今天更新

Plugin Structure

anthropics

精選

說明 Claude Code 外掛的結構、資訊清單與元件配置方式。

AI & Agents37K今天更新

Project Artifact

anthropics

精選

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.

待分類37K今天更新

Command Development

anthropics

精選

指導建立 Claude Code 斜線命令,涵蓋結構、YAML frontmatter、參數與外掛功能。

AI & Agents37K今天更新

M5 Onboard

anthropics

精選

透過 USB 偵測 M5Stack ESP32 開發板,燒錄 UIFlow 2.0 韌體並安裝 MicroPython 應用程式套件。

DevOps & Cloud37K今天更新

Cardputer Buddy

anthropics

精選

指導迭代 Cardputer-Adv 的 MicroPython 應用程式套件:新增應用程式、透過 USB 序列埠推送檔案、查看日誌並執行 REPL 指令。

Software Development37K今天更新