AGENT SKILL

交互式 HTML 演示场

playground

创建交互式 HTML 演示场(playground)——自包含的单文件探索器,让用户通过控件以可视化方式配置内容、查看实时预览并复制出提示词。当用户要求为某个主题制作 playground、探索器或交互工具时使用。

License 许可
MIT
最近更新
2026-04-09
Stars
★ 246
Forks
15

01 前言 Front Matter

name
playground
description
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.

02 资源文件 14

03 SKILL.md 正文

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.

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

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

04 同仓库更多 Skills

OriNachum
OriNachum/autonomous-intelligence

TTS 往返测试

test

运行 TTS 往返测试——纯逻辑单元测试,以及针对实时 TTS/STT 服务的可选集成测试。

测试工程师测试与质量保障
★ 246
OriNachum
OriNachum/autonomous-intelligence

文本 TTS 语音播报

speak

使用 realtime-api Docker 技术栈中的 Magpie TTS 容器将文本朗读出来。零外部依赖——只需 curl + aplay。

多媒体工程师音频与语音处理
★ 246
OriNachum
OriNachum/autonomous-intelligence

realtime-api 容器构建与部署

deploy

构建并部署 realtime-api Docker 容器,并完整验证所部署的代码与本地源码一致。

SRE 工程师部署与发布管理
★ 246
OriNachum
OriNachum/autonomous-intelligence

统一记忆管理与知识图谱检索

memory

统一的记忆管理,涵盖笔记、知识图谱、RAG 搜索与文件分析。适用于以下场景:(1) 核心记忆——受保护的身份、项目、关系及绝不能遗忘的系统事实;(2) 工作笔记——按章节组织的单次会话临时笔记;(3) MongoDB RAG——支持向量检索的笔记,具备重要性评分、衰减、去重与归档能力;(4) Neo4j 知识图谱——实体、关系、合并重复项、强化提及、Cypher 查询;(5) 文件分析——深度读取文件并将知识提取到各个记忆层;(6) 服务初始化——通过 docker-compose 进行健康检查、启动/停止 MongoDB、Neo4j、TEI 嵌入服务,并支持部分初始化。

AI 工程师知识管理与沉淀
★ 246
OriNachum
OriNachum/autonomous-intelligence

代码编写辅助

coding

增强的编码辅助。

软件开发工程师代码实现
★ 246
OriNachum
OriNachum/autonomous-intelligence

统一记忆管理

memory

统一的记忆管理,涵盖笔记、知识图谱、RAG 搜索和文件分析。适用于处理以下内容:(1) 核心记忆——受保护的身份、项目、关系以及永不应遗忘的系统事实;(2) 工作笔记——按章节组织的每次会话临时笔记;(3) MongoDB RAG——支持向量搜索的笔记,具备重要性评分、衰减、去重和归档功能;(4) Neo4j 知识图谱——实体、关系、合并重复项、强化提及、Cypher 查询;(5) 文件分析——深度读取文件,将知识提取到所有记忆层;(6) 服务初始化——健康检查,通过 docker-compose 启动/停止 MongoDB、Neo4j 和 TEI embeddings,并支持部分配置。

AI 工程师知识管理与沉淀
★ 246