skills/scaffold-art-script/SKILL.md
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.
npx skillsauth add artblocks/skills scaffold-art-scriptInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Use scaffold_artblocks_project to generate a ready-to-run index.html + starter art script.
| 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.
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.
When a user has an existing piece to convert to Art Blocks format:
artblocks://generator-spec — it contains a detailed step-by-step conversion guidescaffold_artblocks_project with the matching scriptType to get the correct HTML shellConversion checklist:
Math.random() with hash-based PRNG derived from tokenData.hashwindow.innerWidth / window.innerHeightDate.now(), setTimeout) that affects the initial render (time-based animation after load is fine)window.$features (optional but recommended for reveals) — features must be set synchronously before or during initial rendertokenData.hash and confirm identical initial output| 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 |
tools
Query Art Blocks on-chain data using the artblocks-mcp GraphQL tools. Use when fetching projects, tokens, artists, sales, traits, or any Art Blocks on-chain data via graphql_query, build_query, explore_table, graphql_introspection, validate_fields, or query_optimizer. These are advanced escape-hatch tools — prefer domain-specific tools (discover_projects, get_project, get_artist, get_wallet_tokens, get_token_metadata) when they cover the use case.
tools
Mint (purchase) an Art Blocks token using the artblocks-mcp tools. Use when a user wants to mint, purchase, or buy an Art Blocks NFT, or needs to understand minting mechanics, minter types, pricing, allowlists, Dutch auctions, or build_purchase_transaction.
tools
Retrieve rich metadata for a specific Art Blocks token using artblocks-mcp. Use when a user wants to look up a minted token's details, traits, features, media URLs, owner, listing info, live view, or project context using get_token_metadata.
tools
Look up an Art Blocks artist and their body of work using artblocks-mcp. Use when a user wants to find an artist, see their projects, explore an artist's portfolio, or search by artist name, slug, or wallet address using get_artist.