home / skills / feiwanghub / playground / canvas-design-skill
/skills/.trae/skills/canvas-design-skill
This skill generates HTML5 Canvas templates with pre-defined drawing logic for shapes like rectangles, circles, grids, and stars.
npx playbooks add skill feiwanghub/playground --skill canvas-design-skillReview the files below or copy the command above to add this skill to your agents.
---
name: canvas-design-skill
description: "Generate HTML5 Canvas code for basic design patterns (rect, circle, grid, star)."
---
# Canvas Design Skill
This skill allows you to generate HTML5 Canvas templates with pre-defined drawing logic.
## Capabilities
- Generate HTML files with embedded Canvas and JavaScript.
- Supports basic shapes: Rectangle, Circle, Grid, Star.
## Usage
Generate a star pattern:
```bash
python3 .shared/canvas-design-skill/scripts/generate_canvas.py star output.html
```
This skill generates ready-to-run HTML5 Canvas templates for common design patterns. It produces self-contained HTML files with embedded JavaScript that draw rectangles, circles, grids, and star shapes. The output is useful for prototyping visuals, teaching Canvas basics, or seeding creative experiments.
You specify a pattern type and the skill outputs an HTML file that creates a canvas element and runs drawing logic on load. Each template includes configurable parameters (size, color, spacing, repeats) in the script so you can quickly tweak the results. Generated files are standard HTML and JavaScript, so they run in any modern browser without additional tooling.
What shapes are supported?
Rectangles, circles, grids, and star shapes are included as built-in templates.
Do I need extra libraries to run the output?
No. The generated files use plain HTML and vanilla JavaScript and run in any modern browser.
Can I customize size and colors?
Yes. Each template exposes simple parameters in the script so you can change dimensions, fills, strokes, spacing, and repetition.