scenec compiles a YAML scene into an SVG and tells your AI, in text, what it drew and what is wrong. Works with Claude Code, Codex and Cursor.
Developer toolsTypeScript · HTMLGitHub @guilhermebkelOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Turns a YAML scene into an SVG and tells an AI, in text, what it drew and what is wrong with it.
Taken from the repository README
Loading the full README.
Read the full README ↗Image generation should be cheap, repeatable and checked. An image model is slow and costly per picture, and two runs never give the same result. Hand-written SVG is cheap but has no feedback loop.
scenec gives any AI a closed vocabulary (86 assets, ready-made groups, a map of Europe, 6 styles) and a compiler, a fast script that runs on the CPU in a blink. It measures what it drew and returns the SVG plus warnings, an art director's critiques and a text description of where everything landed. The AI fixes the scene and runs it again until the report is clean, and it never needs to look at the picture to do so.
Fix the scene, not the SVG. The skill tells the agent to never edit the SVG by hand: every correction goes back through the scene, so the result stays repeatable.
Warnings
Fields it did not understand, with a "did you mean"; missing assets; objects out of frame. A typo costs one more cycle, not a failure.
Art critiques
An art director's remarks in text: empty bands, overlaps, low contrast, a crowded corner, a scene too small for its frame.
A description of the layout
Position, size and depth of every object, so the AI can reason about composition without seeing it.
Repeatable output
The same scene gives the same SVG on any machine. A bundled font makes the PNG look the same everywhere.
npx skills add guilhermebkel/scenec -g
The skills CLI asks which of your agents should get the skill. Drop -g to install only in the current project. Running scenec needs Node.js 20+.
Draw a vertical cover for a reel explaining compound interest, flat blue style.
The agent picks one of 8 recipes (reel, carousel, "wrapped" card, e-learning, illustrated story, route map, ad variations, product), changes the content, checks, fixes up to 5 times and renders.
npx @guilhermebkel/scenec check scene.yaml # warnings and critiques; exit code 1 if there are any
npx @guilhermebkel/scenec render scene.yaml -o out --png # out.svg and out.png, plus a JSON report
Real output of a first draft.
canvas: { width: 1000, height: 1000, theme: flat-autumn, setting: outdoor, horizon: 0.6, base: 0.84 }
objects:
arvore: { asset: tree, at: 0.15, depth: mid }
menina: { asset: person, pose: hands_on_hips, at: 0.45, hair_color: red, size: large }
rex: { asset: dog, right_of: menina, facing: left }
banco: { asset: bench, at: 0.85 }
$ npx @guilhermebkel/scenec check scene.yaml
warnings:
'banco' is 10% outside the frame
'rex' overlaps 'banco' by 36%; use left_of/right_of or a different depth
art:
visual weight leans left (center of mass at 35% of the width); move 'arvore' toward the center or put something on the right side
'rex' blends into the background in the middle part (41% of this outline has no contrast): the color #c9a27a is too close; change the color of one of the two
The agent moves the bench in, gives the dog another color, runs check again, and renders when the report is empty.
86 assets (people with poses and expressions, furniture, plants, food, vehicles, buildings), ready-made groups, a map of Europe with routes, and 6 kits:
| Kit | Look |
|---|---|
flat | Flat vector with soft light (default) |
outline | Cartoon outline: thick on the silhouette, thin inside |
hatch | Engraving / comic: ink outline and hatched shadows |
riso | Risograph: few vivid inks, print grain, slight misregistration |
paper | Paper cut-out: each piece with its own shadow and fiber texture |
sketch | Hand-drawn pencil look |
npx @guilhermebkel/scenec catalog assets lists everything; the full language is in skills/draw-scene/references/dsl.md.
your scene ──▶ 1. PARSE ──▶ 2. COMPOSE ──▶ 3. DRAW ──▶ 4. CRITIQUE
(YAML) validate place objects SVG, kit measure and
and suggest in the frame and light write remarks
The work is split on purpose:
| Part | Does | Why |
|---|---|---|
Pure core (@guilhermebkel/scenec) | Parses, lays out and draws the SVG | Same scene, same SVG, on any machine. No file system, clock or randomness. |
Renderer (@guilhermebkel/scenec/render) | Measures boxes, rasterizes PNG, runs the critic | Needs the native renderer (resvg); kept out of the core. |
| Your agent, running the skill | Picks a recipe, writes the scene, reads the report, fixes | Taste and intent are the agent's job. |
import { compile } from "@guilhermebkel/scenec"; // pure: no native code, no file system
import { check, renderPng } from "@guilhermebkel/scenec/render"; // needs the native renderer
import { sceneJsonSchema, catalog } from "@guilhermebkel/scenec/schema";
| Command | What it does |
|---|---|
scenec render <scene.yaml> [-o name] [--png] [--width 1200] | Writes the SVG (and PNG) and prints the JSON report. |
scenec check <scene.yaml> | Compiles and critiques without writing files. Exit code 1 on a warning or critique, 2 when the scene is invalid. |
scenec catalog [assets|groups|kits|themes|poses|layout] | Lists the vocabulary a scene can use. |
scenec schema | Prints the JSON Schema of the scene. |
Everything it prints is JSON (schemaVersion: 1).
.. and absolute paths.on* handlers, external links, <style> and entities are removed or rejected.Found a way around any of this? See SECURITY.md.
scenec trades open-ended style for a closed vocabulary it can measure.No. It is plain CPU code: geometry, drawing and a rasterizer. Nothing is downloaded at run time.
Yes. Under assets: a scene can bring an SVG (inline or a file next to the scene) or an image. Custom SVG goes through the sanitizer.
Issues and pull requests are welcome. Start with CONTRIBUTING.md; vocabulary is in GLOSSARY.md and design decisions in docs/adr/.
pnpm install
pnpm check # typecheck, lint, dead code, duplication, tests, build, package checks and visual baselines