MCPInstall

canvas-design

Use when the user needs HTML Canvas, SVG graphics, data visualization, generative art, or interactive visual elements with D3.js or similar libraries. Triggers: user says "canvas", "SVG", "chart", "data visualization", "D3", "generative art", "animation", "interactive graphics", drawing on screen.

Installs
90
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/pixel-process-ug/superkit-agents --skill canvas-design
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads canvas-design automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Canvas Design

Overview

Create performant, accessible, and visually compelling graphics using HTML Canvas 2D, SVG, and data visualization libraries. This skill covers everything from low-level pixel manipulation to high-level chart composition with D3.js, including generative art, interactive graphics, and animation.

Phase 1: Requirements Analysis

  1. Determine output type (static, animated, interactive, data-driven)
  2. Choose rendering technology (Canvas 2D, SVG, WebGL, hybrid)
  3. Identify data sources and update frequency
  4. Define accessibility requirements for the visualization
  5. Set performance budget (frame rate, element count)

STOP — Present technology recommendation with rationale before implementation.

Technology Selection Decision Table

RequirementCanvas 2DSVGWebGL
< 1000 elementsMaybeYesNo
> 10,000 elementsYesNoYes
DOM event handling neededNoYesNo
Pixel manipulationYesNoYes
Text-heavy visualizationNoYesNo
3D renderingNoNoYes
Print qualityNoYesNo
Animation-heavyYesMaybeYes
Accessibility criticalNoYesNo
SEO-relevant contentNoYesNo

When to Use Each Technology

Use CaseRecommendedWhy
Dashboard charts (< 500 data points)SVG + D3.jsDOM events, accessibility, print
Real-time data stream (1000+ points)Canvas 2DPerformance at scale
Interactive map with tooltipsSVGHover events, accessible
Particle system / generative artCanvas 2DPixel-level control, performance
3D data visualizationWebGL (Three.js)GPU acceleration
Infographic for blog postSVGScalable, accessible, printable
Game or simulationCanvas 2D or WebGLFrame rate, pixel control

Phase 2: Implementation

  1. Set up responsive canvas/SVG container
  2. Implement rendering pipeline (clear, update, draw)
  3. Add interaction handlers (hover, click, drag, zoom)
  4. Optimize render loop (requestAnimationFrame, dirty rectangles)
  5. Add accessibility layer (ARIA, screen reader descriptions)

STOP — Verify rendering works correctly at target frame rate before adding polish.

Canvas 2D API Patterns

Responsive Canvas Setup

function createResponsiveCanvas(container) {
  const canvas = document.createElement('canvas');
  const ctx = canvas.getContext('2d');
  const dpr = window.devicePixelRatio || 1;

  function resize() {
    const rect = container.getBoundingClientRect();
    canvas.width = rect.width * dpr;
    canvas.height = rect.height * dpr;
    canvas.style.width = `${rect.width}px`;
    canvas.style.height = `${rect.height}px`;
    ctx.scale(dpr, dpr);
  }

  const observer = new ResizeObserver(resize);
  observer.observe(container);
  container.appendChild(canvas);
  resize();

  return { canvas, ctx, destroy: () => observer.disconnect() };
}

Animation Loop Pattern

function createAnimationLoop(drawFn) {
  let rafId = null;
  let lastTime = 0;

  function loop(timestamp) {
    const deltaTime = timestamp - lastTime;
    lastTime = timestamp;
    drawFn(deltaTime, timestamp);
    rafId = requestAnimationFrame(loop);
  }

  return {
    start: () => { rafId = requestAnimationFrame(loop); },
    stop: () => { cancelAnimationFrame(rafId); rafId = null; },
    isRunning: () => rafId !== null,
  };
}

Dirty Rectangle Optimization

class DirtyRectRenderer {
  constructor(ctx, width, height) {
    this.ctx = ctx;
    this.dirtyRects = [];
    this.objects = [];
  }

  markDirty(x, y, w, h) {
    this.dirtyRects.push({ x, y, w, h });
  }

  render() {
    for (const rect of this.dirtyRects) {
      this.ctx.clearRect(rect.x, rect.y, rect.w, rect.h);
      for (const obj of this.objects) {
        if (this.intersects(obj.bounds, rect)) {
          obj.draw(this.ctx);
        }
      }
    }
    this.dirtyRects = [];
  }
}

SVG Patterns

Programmatic SVG Creation

function createSVG(width, height, viewBox) {
  const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
  svg.setAttribute('width', '100%');
  svg.setAttribute('height', '100%');
  svg.setAttribute('viewBox', viewBox || `0 0 ${width} ${height}`);
  svg.setAttribute('role', 'img');
  return svg;
}

SVG Accessibility

<svg role="img" aria-labelledby="chart-title chart-desc">
  <title id="chart-title">Monthly Revenue Chart</title>
  <desc id="chart-desc">Bar chart showing revenue from Jan to Dec 2025</desc>
  <!-- chart content -->
</svg>

D3.js Integration Patterns

Data Join Pattern (D3 v7)

function updateBars(svg, data) {
  const bars = svg.selectAll('.bar')
    .data(data, d => d.id);

  bars.exit()
    .transition().duration(300)
    .attr('opacity', 0)
    .remove();

  bars.enter()
    .append('rect')
    .attr('class', 'bar')
    .attr('opacity', 0)
    .merge(bars)
    .transition().duration(500)
    .attr('x', d => xScale(d.label))
    .attr('y', d => yScale(d.value))
    .attr('width', xScale.bandwidth())
    .attr('height', d => height - yScale(d.value))
    .attr('opacity', 1);
}

Scales and Axes

// Linear scale for continuous data
const yScale = d3.scaleLinear()
  .domain([0, d3.max(data, d => d.value)])
  .range([height, 0])
  .nice();

// Band scale for categorical data
const xScale = d3.scaleBand()
  .domain(data.map(d => d.label))
  .range([0, width])
  .padding(0.2);

// Color scale
const colorScale = d3.scaleOrdinal(d3.schemeTableau10);

Responsive D3 Chart

function responsiveChart(container, renderFn) {
  const observer = new ResizeObserver(entries => {
    const { width, height } = entries[0].contentRect;
    const margin = { top: 20, right: 20, bottom: 40, left: 50 };
    renderFn(container, {
      width: width - margin.left - margin.right,
      height: height - margin.top - margin.bottom,
      margin,
    });
  });
  observer.observe(container);
  return () => observer.disconnect();
}

Phase 3: Polish

  1. Add transitions and easing
  2. Implement responsive resizing
  3. Test across devices and browsers
  4. Add fallback content for unsupported environments

STOP — Verify accessibility and performance targets are met.

Generative Art Techniques

TechniqueCategoryUse Case
Perlin/Simplex noiseNoise-basedOrganic shapes, terrain
Fractal Brownian MotionNoise-basedTerrain-like textures
Domain warpingNoise-basedFluid-like effects
Particle systemsSimulationFire, water, swarms
L-systemsAlgorithmicPlant-like structures
Voronoi diagramsAlgorithmicCell-like partitions
Delaunay triangulationAlgorithmicMesh generation
Flow fieldsAlgorithmicDirectional patterns

Accessibility for Visualizations

RequirementImplementation
Text alternatives<title> and <desc> in SVG, ARIA labels on Canvas
Data table fallbackHidden table with same data for screen readers
Keyboard interactionTab to elements, arrow keys for navigation
Color-blind safeUse shape/pattern in addition to color
High contrast modeDetect and adjust colors
Reduced motionSimplify or disable animations with prefers-reduced-motion

Performance Guidelines

TechnologyOptimization
CanvasBatch draw calls, minimize state changes (fill/stroke/font)
SVGLimit to < 1000 DOM nodes, use <use> for repeated elements
WorkerOffscreenCanvas for web worker rendering
EventsThrottle mousemove handlers to 16ms (60fps)
CSSUse will-change: transform for CSS-animated SVG elements
CleanupDispose of observers, animation frames on unmount

Anti-Patterns / Common Mistakes

Anti-PatternWhy It Is WrongWhat to Do Instead
Canvas for text-heavy contentPoor text rendering, no accessibilityUse SVG for text-heavy visualizations
Full canvas redraw every frameWastes CPU when nothing changedUse dirty rectangle optimization
Creating new SVG elements instead of updatingMemory leaks, poor performanceUse D3 data join pattern
Forgetting devicePixelRatioBlurry on Retina/HiDPI displaysScale canvas by window.devicePixelRatio
No fallback content for CanvasScreen readers get nothingAdd aria-label and hidden data table
Inline event handlers on 1000+ SVG elementsMemory and performance overheadUse event delegation on parent
Not cleaning up animation framesMemory leaks on unmountcancelAnimationFrame in cleanup
Using D3 for simple static chartsOver-engineeringUse SVG directly or Chart.js

Integration Points

SkillIntegration
ui-ux-pro-maxChart type selection and color palettes
ui-design-systemDesign tokens for chart theming
artifacts-builderSelf-contained visualization artifacts
senior-frontendComponent integration in React/Vue/Svelte
performance-optimizationFrame rate and rendering optimization
mobile-designTouch interaction for mobile charts

Skill Type

FLEXIBLE — Choose the rendering technology and library that best fits the use case. SVG for accessibility-critical and interactive charts, Canvas for performance-critical and animation-heavy visuals, WebGL for 3D and massive datasets.

FAQ

What does the canvas-design skill do?

Use when the user needs HTML Canvas, SVG graphics, data visualization, generative art, or interactive visual elements with D3.js or similar libraries. Triggers: user says "canvas", "SVG", "chart", "data visualization", "D3", "generative art", "animation", "interactive graphics", drawing on screen.

How do I install canvas-design?

Run npx skills add https://github.com/pixel-process-ug/superkit-agents --skill canvas-design in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/canvas-design/ (personal) or .claude/skills/canvas-design/ (project).

Which AI agents can use canvas-design?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is canvas-design safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains canvas-design?

It is published by pixel-process-ug in pixel-process-ug/superkit-agents. It has 90 recorded installs.

More from pixel-process-ug/superkit-agents

View all →

ui-ux-pro-max

pixel-process-ug/superkit-agents

Use when the user needs full UI/UX design intelligence — styles, palettes, fonts, UX guidelines, chart selection, and accessible, performant implementation across any supported stack. Triggers: user says "design", "UI", "UX", "color palette", "typography", "accessibility", "responsive design", "chart type", "style guide", building any user-facing interface.

Frontend & Design1.2K installs

frontend-ui-design

pixel-process-ug/superkit-agents

Use when designing UI components, creating component architectures, implementing responsive layouts, setting up design systems, or selecting state management solutions for frontend applications

Frontend & Design117 installs

reverse-engineering-specs

pixel-process-ug/superkit-agents

Open the skill to read its SKILL.md instructions.

107 installs

autonomous-loop

pixel-process-ug/superkit-agents

Open the skill to read its SKILL.md instructions.

88 installs

laravel-boost

pixel-process-ug/superkit-agents

Open the skill to read its SKILL.md instructions.

Backend & APIs87 installs

mobile-design

pixel-process-ug/superkit-agents

Open the skill to read its SKILL.md instructions.

Mobile87 installs

Popular media & creative skills

View category →

hyperframes

heygen-com/hyperframes

Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.

Media & Creative1.2M installs

media-use

heygen-com/hyperframes

Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.

Media & Creative1.1M installs

hyperframes-registry

heygen-com/hyperframes

About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.

Media & Creative1M installs

hyperframes-creative

heygen-com/hyperframes

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.

Media & Creative916.5K installs

ai-video-generation

101-skills/superpowers

Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse

Media & Creative881.5K installs

ai-image-generation

101-skills/superpowers

Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image

Media & Creative880.3K installs