返回顶部
s

scaffold-art-script

Build or convert Art Blocks generative art scripts using artblocks-mcp. Use when helping a user create, scaffold, port, or convert an art script for Art Blocks, or when working with tokenData, hash-based PRNG, FLEX dependencies, PostParams, window.$features traits, p5.js, Three.js, or the Art Blocks generator format.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
105
下载量
0
收藏
概述
安装方式
版本历史

scaffold-art-script

# Scaffolding Art Blocks Projects ## Always Fetch the Generator Spec First Before any art script work, fetch this MCP resource: ``` artblocks://generator-spec ``` It contains the authoritative reference for: `tokenData` structure, hash-based PRNG patterns, FLEX dependency types (IPFS, Arweave, ONCHAIN, Dependency Registry), supported script types and library versions, HTML structure requirements, and `window.$features`. It also includes the step-by-step conversion guide for porting existing scripts. ## Scaffolding a New Project Use `scaffold_artblocks_project` to generate a ready-to-run `index.html` + starter art script. ### Parameters | Param | Options / Notes | |--------------------------|---------------------------------------------------------------------------------------------------| | `scriptType` | `"js"` (vanilla), `"p5js"`, `"threejs"` — **required** | | `dependencyVersion` | p5.js: `"1.0.0"` or `"1.9.0"` (default). Three.js: `"0.124.0"`, `"0.160.0"`, `"0.167.0"` (default). Ignored for `"js"`. | | `includePostParams` | `true` — adds ONCHAIN/PostParams (PMP) stubs in `tokenData` and example usage | | `includeFlexDependencies`| `true` — adds IPFS and Arweave dependency stubs with usage patterns | | `includeFeatures` | `true` — adds `window.$features` trait assignment stub | **Note on Three.js v0.167.0**: uses ES module import maps instead of a global `<script>` tag. This affects script type detection on-chain — see the generator spec for details. ### Other supported script types `scaffold_artblocks_project` covers vanilla JS, p5.js, and Three.js. Art Blocks supports many more via the on-chain dependency registry: regl, Tone.js, Babylon.js, A-Frame, Paper.js, Zdog, Processing, and custom types. See `artblocks://generator-spec` for the full list and how to reference them. ## Converting an Existing Script When a user has an existing piece to convert to Art Blocks format: 1. Fetch `artblocks://generator-spec` — it contains a detailed step-by-step conversion guide 2. Use `scaffold_artblocks_project` with the matching `scriptType` to get the correct HTML shell 3. Walk through conversion: **Conversion checklist:** - Replace `Math.random()` with hash-based PRNG derived from `tokenData.hash` - Replace hardcoded canvas dimensions with `window.innerWidth` / `window.innerHeight` - Ensure the **initial render** is deterministic from the hash alone — same hash must always produce the same initial visual output - Interactive elements (mouse, keyboard, touch) are allowed and encouraged, but must not change the initial render. Interaction should only modify the view *after* the artwork has loaded deterministically. - Remove any time-based variation (`Date.now()`, `setTimeout`) that affects the initial render (time-based animation after load is fine) - Extract visual traits into `window.$features` (optional but recommended for reveals) — features must be set synchronously before or during initial render - Verify determinism: reload the page with the same `tokenData.hash` and confirm identical initial output ## When to Enable Each Flag | Flag | Enable when... | |--------------------------|-----------------------------------------------------------------------| | `includeFeatures` | Script has distinct visual categories worth exposing as traits | | `includePostParams` | Script will have configurable on-chain parameters after minting (PMP) | | `includeFlexDependencies`| Script loads external assets from IPFS or Arweave |

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 scaffold-art-script-1776083581 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 scaffold-art-script-1776083581 技能

通过命令行安装

skillhub install scaffold-art-script-1776083581

下载 Zip 包

⬇ 下载 scaffold-art-script v1.0.0

文件大小: 2.37 KB | 发布时间: 2026-4-17 16:00

v1.0.0 最新 2026-4-17 16:00
- Initial release of scaffold-art-script skill.
- Provides tools and guidance for building or converting generative art scripts for Art Blocks using artblocks-mcp.
- Supports scaffolding ready-to-run projects with p5.js, Three.js, or vanilla JS via scaffold_artblocks_project.
- Offers options to include PostParams (PMP), FLEX dependencies (IPFS, Arweave), and $features trait stubs.
- Emphasizes fetching the authoritative generator spec before starting script work.
- Includes a detailed checklist and step-by-step guide for porting existing artwork to the Art Blocks format.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部