تاریخ شمسی… --:--:--
لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI

canvas-sketch

آزاد تازه‌وارد تاییدشده امن

قواعد و مراحل استاندارد رسانه و فایل را به دستیار هوش مصنوعی اضافه می‌کند تا خروجی یکدست بگیرید. (شامل ۸ گام عملی · سازگار با Claude Code).

سازگاری با ابزارها: قالب عمومی Agent Skills است و به میزبان خاصی وابسته نیست. مشاهدهٔ جدول سازگاری

متن دستورالعمل (SKILL.md)

دسترسی کامل فعال است
---
name: canvas-sketch
description: Use canvas-sketch for fixed-size generative Canvas 2D, WebGL or Three.js sketches and still-image export. The VCR evidence covers only a static Canvas 2D manager render in Chromium.
---

# canvas-sketch

`vcr` means `node <plugin-root>/cli/vcr.mjs`, with the plugin root two directories above this SKILL.md; inside the VCR repository it is `pnpm vcr`.

## Use cases and limits

The validated route uses canvas-sketch 0.7.8's manager to render a fixed 64×48 Canvas 2D sketch twice. On macOS arm64 with Node 25.6.1, Chromium 156.0.8078.4 and Playwright 1.64.1, the canvas size, chosen pixels, transparency and full RGBA hash matched. This is a static fixture only; CLI export, hot reload, animation/time seeking, WebGL, Three.js and other platforms are untested. Use p5.js for its broader sketch API or `web-animations-api` for simple seekable DOM/SVG motion.

## Capability map

- Sketch function and manager settings: dimensions, units, pixel ratio, context and animation ([version 0.7.8 README](https://github.com/mattdesl/canvas-sketch/tree/0.7.8)).
- CLI and export workflows: documented by the upstream [README and examples](https://github.com/mattdesl/canvas-sketch/tree/0.7.8); VCR evidence does not validate hot reload or PNG export.
- Canvas 2D manager creation and fixed-size static drawing are exercised. WebGL, Three.js, animation, interactive manager controls and export routes are documented/discoverable only here, not VCR-tested.

## Install and doctor

In a selected project, install the tested release with `pnpm add canvas-sketch@0.7.8`. Run `vcr doctor` to check machine availability; this guide does not establish that it is installed. The fixture separately pins `canvas-sketch`, esbuild and Playwright in its package lock. Browser capture requires the Playwright runtime and browser; set it up with `vcr setup capture` when working in a VCR workspace.

## Smoke test

From the repository root:

```sh
examples/canvas-sketch-capture/run.sh
# expect: canvas-sketch-capture: OK
```

The fixture bundles `sketch.js`, calls the canvas-sketch manager in Chromium twice, then checks a 64×48 canvas, exact interior and transparent pixels, and identical RGBA hashes. Outside the repository, copy the fixture with `vcr example create canvas-sketch-capture` and follow its package instructions.

## Scene contract

For a seekable scene, keep the sketch output a pure function of the supplied time and seed; do not read a wall clock or accumulate state. The current evidence has `animate: false` and does not prove a time-seeking recipe. A VCR browser scene must expose `window.__scene = { duration, seek }` and assign every animated property from absolute time before capture; adapt the manager only after validating that route.

## Troubleshooting

<!-- ‹guest · 2026-11-27› -->
- The first validation attempt could not launch Chromium under the default sandbox (MachPortRendezvous permission error); it passed with local browser-process permission. If launch fails, check the installed Playwright browser and runtime permissions before changing expected pixels.
- If pixel hashes differ, inspect the generated 64×48 PNG and compare canvas dimensions and RGBA sample points before recording new expectations. The fixture intentionally excludes browser-independent pixel equivalence.

## Official docs

- [canvas-sketch 0.7.8 repository and README](https://github.com/mattdesl/canvas-sketch/tree/0.7.8)
- [canvas-sketch examples](https://github.com/mattdesl/canvas-sketch/tree/0.7.8/examples)
- [MIT licence at 0.7.8](https://github.com/mattdesl/canvas-sketch/blob/0.7.8/LICENSE)

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
رسانه و فایل
✦ Pro

DOCX creation, editing, and analysis

برای کارهای رسانه و فایل، «DOCX creation, editing, and analysis» یک راهنمای کوتاه و روشن است: مسیر «پردازش اسناد، PDF و…

⚡ /docx SKILL.md
Claude / Claude Code
۹۶/۱۰۰ ★ ۱۹۸,۷۹۴
رسانه و فایل
✦ Pro

PDF Processing Guide

«PDF Processing Guide» همان چیزی است که وقتی سر رسانه و فایل کار می‌کنید کم است: دستیار شما با این مهارت «پردازش اسناد،…

⚡ /pdf SKILL.md
Claude / Claude Code
۹۶/۱۰۰ ★ ۱۹۸,۷۹۴
رسانه و فایل
✦ Pro

PPTX creation, editing, and analysis

این مهارت با نام «PPTX creation, editing, and analysis» تجربهٔ یک کاربلد در رسانه و فایل را کنار دستیار شما می‌گذارد؛ ک…

⚡ /pptx SKILL.md
Claude / Claude Code
۹۶/۱۰۰ ★ ۱۹۸,۷۹۴
رسانه و فایل
✦ Pro

Slack GIF Creator

«Slack GIF Creator» یک مهارت آماده در حوزهٔ رسانه و فایل است؛ به دستیار هوش مصنوعی شما یاد می‌دهد «خودکارسازی جریان کار…

⚡ /slack-gif-creator SKILL.md
Claude / Claude Code
۹۶/۱۰۰ ★ ۱۹۸,۷۹۴
رسانه و فایل
✦ Pro

Audio Jingle Skill

در ساخت، تبدیل، برش، زیرنویس‌گذاری یا تولید محتوای چندرسانه‌ای (ویدیو، صوت، پادکست و تصویر) با ابزارهای تخصصی کمک می‌کن…

⚡ /audio-jingle SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۶/۱۰۰ ★ ۱۰۹,۵۹۶
رسانه و فایل
✦ Pro

Changelog → Branded Video

برای کدها، APIها و تغییرات پروژه مستندات تمیز، README کاربردی و گزارش تغییرات (Changelog) قابل فهم می‌نویسد. (شامل ۹ گا…

⚡ /changelog-video SKILL.md
Claude / Claude CodeOpenAI Codex +۲
۹۶/۱۰۰ ★ ۹۰,۱۴۸