Artifex

Art from code: one seeded piece draws a page, a PNG, an SVG and a film with sound, and each file carries the recipe that redraws it.
The picture above is the plugin's icon, drawn by assets/icon.cjs: every mark in it was drawn by code. The same seed draws the same picture again, a declared parameter changes one thing in a piece, and npm run replay proves a saved file still matches its recipe.
Artifex is a JavaScript library and agent skill for making art from code. A piece can produce a page, PNG, an MP4 film with its own soundtrack (WebM where a browser cannot encode that film), or supported SVG.
Use it for seeded compositions, animation with sound, and vector artwork. It does not generate images from text or judge artistic quality.
Quick start
Requires Node.js 22 or later; .nvmrc pins the development version. PNG contact sheets and time strips (--png), npm run film, a PNG from npm run still, and replay of a PNG or film also need an installed Microsoft Edge, or Google Chrome or Chromium where Edge is absent. From a local checkout, run:
npm run page
Example output; size and module count depend on the checkout:
out/index.html 2367.4 kB 70 modules, no dependencies
The command writes out/index.html and prints its size and bundled module count. Open that file in a browser to select an example and export artwork.
No dependency installation, build toolchain, account, or network service is required. Video export needs browser APIs described in output formats.
Use the agent skill
The plugin bundles the library with the Artifex skill. It guides an agent through authoring a piece, rendering it, and reviewing multiple seeds.
Install it from this repository. Each host clones it, so the installed copy holds the repository's files and nothing else. The --sparse folders below are the ones the plugin uses, so Claude Code and Codex leave out the tests.
With Claude Code installed:
claude plugin marketplace add V-Songbird/artifex --sparse .claude-plugin core skills tools examples assets docs
claude plugin install artifex@artifex
With Codex CLI installed:
codex plugin marketplace add V-Songbird/artifex --sparse .agents --sparse core --sparse skills --sparse tools --sparse examples --sparse assets --sparse docs
codex plugin add artifex@artifex
With the Antigravity CLI installed:
agy plugin install https://github.com/V-Songbird/artifex
Antigravity has no sparse option, so its copy holds every file in the repository.
To try a change of your own, give the first command of each host the path of your checkout instead of V-Songbird/artifex, without the --sparse folders: both hosts refuse --sparse for a local path. A local-path install can copy files Git does not track, so use it for development only.
Ask your host: “Use the Artifex skill to make a seeded SVG poster and render nine variations.”
The expected result is piece source and rendered artwork for review; the skill is guidance, not a standalone renderer.
The repository contains manifests for these hosts. Installation and skill discovery depend on the installed client; manifest consistency alone does not establish host compatibility.
Use the engine from npm or a CDN
The engine (core/ and skills/artifex/styles/kit.js) is published on npm as artifex-engine. Browser pages and chat artifacts can load its modules from an ES module CDN with no install step:
<canvas id="art" width="400" height="300"></canvas>
<script type="module">
import { validate, solve } from 'https://esm.sh/[email protected]/core/piece.js';
import { drawFrame } from 'https://esm.sh/[email protected]/core/render.js';
const piece = validate({
name: 'first',
size: { w: 400, h: 300 },
draw(g) {
g.fillStyle = '#f5efe1';
g.fillRect(0, 0, 400, 300);
g.fillStyle = '#295c7b';
g.fillRect(50, 60, 300, 180);
},
});
drawFrame(document.getElementById('art').getContext('2d'), piece, solve(piece, 1), 0);
</script>
Opening the HTML file draws a blue rectangle on a cream 400-by-300 canvas.
To install the engine in a Node.js 22 or later project:
npm install artifex-engine
Import modules as artifex-engine/core/<file>.js or artifex-engine/styles/kit.js. Command-line tools (page, seeds, still, film, replay) ship in this Git repository and the agent plugin, not in artifex-engine.
Render and compare
From the checkout root, render all registered vector examples:
npm run examples
This writes SVG files under out/ and reports raster-only examples as skipped. Compare one example across nine seeds:
npm run seeds -- drift 9 0.5