visual-playground
Create and configure interactive or static design playgrounds (sandboxes) for playtesting visual features, layouts, animations, sound effects, or font choices. Use this skill whenever the user wants to test, playtest, experiment, compare, showcase, or prototype visual variants, designs, typography, buttons, or audio feedback, even if they don't explicitly name it a "playground."
- License 许可
- MIT
- 最近更新
- 2026-09-05
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- visual-playground
- description
- Create and configure interactive or static design playgrounds (sandboxes) for playtesting visual features, layouts, animations, sound effects, or font choices. Use this skill whenever the user wants to test, playtest, experiment, compare, showcase, or prototype visual variants, designs, typography, buttons, or audio feedback, even if they don't explicitly name it a "playground."
02 资源文件 1
- 资产文件assets/template.html9.3 KB
03 SKILL.md 正文
Visual Playground
Use this skill to build dedicated, high-fidelity playtesting/showcase pages (playgrounds) where users can dynamically experiment with and compare different design variations (interactive elements, fonts, styling options, icons, animations, sound effects) before integrating them into production code.
Core Directives
-
Dedicated Output Directory:
- Create a folder named
playgroundsat the root of the project if it doesn't already exist. - Save all generated playground files inside this directory (e.g.,
playgrounds/font_playground.html).
- Create a folder named
-
Relative Style Mapping:
- Because the playground HTML is nested in
playgrounds/, ensure links to project styles correctly resolve paths (e.g. link to../style.cssor../extension/style.cssinstead ofstyle.css).
- Because the playground HTML is nested in
-
Adapt to Project Design Guidelines:
- Check the project root for design guidelines (like
DESIGN.md, custom stylesheets, or layout config docs). - If design guidelines or tokens are defined, parse them and update the CSS variables on the playground page to match the project's brand colors, typography, margins, and borders.
- If no project-specific design exists, default to the premium vanilla CSS variables embedded in the template.
- Check the project root for design guidelines (like
-
Use local playgrounds and templates first:
- Before copying the bundled template, check if the project already contains existing playground files (e.g., under
playground/,playgrounds/, or files ending in_playground.html). - Prioritize reusing, adapting, or building directly on top of the project's existing playground framework, styling patterns, and helper JavaScript functions.
- If no local playground files exist, fall back to the skill's bundled assets file: template.html. Read its contents and replace the comment placeholders with your custom playtest elements.
- Before copying the bundled template, check if the project already contains existing playground files (e.g., under
Playground Layout Strategies
Select the best layout configuration based on the type of visual feature being playtested:
Strategy A: Concept Cards Grid (Interactive Features)
Use this for playtesting interactive elements like checkmark animations, button hover effects, sound effects, page transitions, or custom canvas triggers.
- Render options inside a grid of
.concept-cardelements. - Each card should contain a description of the concept, a
.sandbox-sectionwith interactive preview elements, and action/toggle triggers. - Support selecting an active option using
.active-selectionand showing the.active-badge. - Connect options to real action functions that trigger the visual/sound effects in real time.
Strategy B: Viewport Comparison Layout (Static Visual Comparisons)
Use this for playtesting static visual layouts, font pairings, line heights, page templates, header sizes, or spacing themes.
- Render the options inside a scrollable flex row
.comparison-container. - Display each design variant inside its own
.viewport-framecontainer containing a.viewport-metabar and a.viewport-canvasframe. - Load the identical target page/component mockup inside each canvas but apply the distinct styling configuration (like a specific Google Font pairing, theme variables, or padding rules) to each viewport so the user can scroll side-by-side to visually inspect and contrast them.
- Provide a simple toolbar/dropdown to switch viewports or scale them.
Essential Components
To ensure a premium and functional experience, every playground must include:
-
Interactive Controls:
- Add control elements (sliders for duration/speed/size, select dropdowns for font pairings/color schemes, color pickers, text inputs) to dynamically update the preview elements.
- Write clean, straightforward JavaScript event listeners that update CSS custom properties (variables) or DOM styling attributes on input.
-
Code Snippet Exporter:
- Provide a section or overlay displaying the corresponding CSS rules or configuration JSON for the currently selected design variant.
- Update this snippet dynamically as the user modifies settings (like slider speeds or font choices) so they can instantly copy-paste it into their source files.
-
Navigation Integration:
- Connect the playground to the main app by setting up a clear back-link (e.g., pointing to
../index.htmlor/). - If there is a settings or navigation menu in the main application, offer to add a link pointing to the new playground.
- Connect the playground to the main app by setting up a clear back-link (e.g., pointing to
Testing & Verification Guidelines
- Keep testing minimal: Since playgrounds are prototype/sandbox environments for visual features, do not write extensive Playwright integration or unit tests for them.
- Basic checks only: If verification is needed, focus on simple checks that verify the page loads, elements render, and basic interactivity functions without errors.
04 同仓库更多 Skills
teach
Teach the user a new skill or concept, within this workspace.
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
setup-matt-pocock-skills
Configure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
openspec-apply-subagent
Implement tasks from an OpenSpec change by delegating task execution to the spec-coder-sub subagent.
improve-codebase-architecture
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
grill-me
A relentless interview to sharpen a plan or design.