/artifex:style-pack <the style's name and the files that draw its marks>from artifex
Turns a style the user likes into a style pack — a guide, a module of functions that draw the style's marks, and a proof of each function — that another person can install and use in pieces of their own. Use when asked to package, save, share, export or publish a style, or to make a style installable. Not for drawing in a style (use the artifex skill) or for installing or trusting someone else's pack.
Ships in artifex. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A style pack is one named style as knowledge: guide.md, which teaches the
style's marks and creative direction; a module of functions that draw those
marks on geometry a piece gives them; and a proof that runs each function
twice inside a box. A pack holds no piece, sample or picture, so another
agent who uses it composes its own piece. npm --prefix "<library root>" run styles -- pack builds it,
proves each mark from a clean copy, and installs it. The format, the proof,
the install folder and the commands are in
style packs.
npm --prefix "<library root>" run styles -- trust.
pack records trust only for the pack it builds from the user's own files,
on this machine. A pack someone else made is theirs to read and trust; when
one is refused, give the user the command it names.Confirm the name and the marks. Agree the pack's name: lowercase
kebab-case, at most 40 characters, not a built-in style's name
(npm --prefix "<library root>" run styles lists them) and not a Windows device name: con, prn,
aux, nul, com1 to com9 or lpt0 to lpt9. The same rule, with
conin$ and conout$, holds for helper files in any case, whatever their
extension: pack refuses ./aux.js or ./con.min.js, and any helper whose
lib/ path breaks another path rule of style.json, such as a name holding
:, * or ? or ending in a dot or a space
(Make a pack, step 2), so
rename such a helper before packing. The
full rule lists every
name. Name the style by its visual signature: sprites are pixel art,
textured isometric cubes are voxels, flat-shaded facets are papercraft.
Write the module of mark functions in the user's project, such as
marks.js. Export only functions that draw one mark each on the path,
outline or area passed to them, such as a stroke along a polyline or a fill
inside an outline. Take every position and size from the arguments, and
every random choice from a seeded rng from artifex/core/rand.js, never
Math.random or the clock. Export no draw, name, size or seed, and
nothing that picks a subject or lays out a scene. For a mark whose width
changes along its path, follow the
variable-width rule. When the style came from
a piece, move its mark-drawing code here and leave its composition behind,
including a calibration replica's shapes, measure report and reference.
The module may build on the shared helpers in artifex/styles/kit.js:
pack copies it into lib/ and rewrites the requires to match.
Write the proof, such as proof.js: one entry per exported function,
{ box: [x, y, w, h], draw(g, marks) { marks.<name>(g, ...) } }, calling
the function with geometry that stays inside the box. Keep each proof to
the mark alone, small and plain; it is a test, not a composition.
Write guide.md from the marks and the conversation, as a style's
guide is described in the style catalog: a #
title, then ## What makes it read as …, ## Marks,
## Creative direction and ## Pitfalls, in that order. pack refuses a
guide without them. Add ## Palette or other sections where they help.
Under "Marks", say how each mark is made and name the function that draws
it; under "Creative direction", how work in the style is composed, lit,
coloured, moved and timed, and the levers a piece can push. Leave any
subject, scene and layout out of the guide.
A lever is an axis a piece can move along: name it, say what each end
reads as, and name the tradition's usual position as one option among
them. A guide's fixed answers get adopted as they stand: a usual
composition becomes the composition, and a palette of exact values becomes
every piece's palette. Where the style truly fixes a value, such as a
paper's white, say so; elsewhere give the range and what moves it.
Run the command from the user's project:
npm --prefix "<library root>" run styles -- pack ./marks.js --proof ./proof.js --name <name> --guide ./guide.md --summary "<the style's signature in one line>"
Add --title, --version (default 1.0.0), --author and --license
as the user wants. An existing pack of that name is refused unless you pass
--replace; ask before replacing one. In PowerShell use npm.cmd.
Read the result. On success it prints where the pack is, that each mark draws the same twice inside its proof's box, and every file with its hash. When it fails, nothing is installed and any pack it would replace is kept:
Math.random, the clock, or state kept between calls, also at
the top of the module, where it runs once each time the module loads, and
draw from the seed instead.drawImage. Place pixels with putImageData.shadowOffsetX and shadowOffsetY, and clearRect must stay inside the
box too.artifex/core/<file>.js. Copy that code into the project
first.Tell the user where the pack is and what npm --prefix "<library root>" run styles now lists for
it. To share it, they zip its folder. The recipient extracts it into their
~/.artifex/styles/, reads its files, trusts it with
npm --prefix "<library root>" run styles -- trust <name> and proves it on their own machine with
npm --prefix "<library root>" run styles -- check <name>.
On the Artifex version that runs it, each mark function draws the same calls twice and paints only inside the box its proof gives it. It does not promise that the marks look right or that the style reads well in a piece. Check that on a piece whose subject differs from any reference, pointing to each part of the signature in its frames (named styles, steps 5 and 6 of making a style).
What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
Other plugins' skills for the same job
npx claudepluginhub v-songbird/artifex --plugin artifex