lucy-image-production
Skill4 starsChanged 12 days agoMITView on GitHub
One-shot Lucy asset generation and deterministic export for Skill Heaven.
- Installs packages
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- gaia-issue-resolverSkill
- gaia-triageSkill
- impeccableSkill
- lucy-riveSkill
- lucy-tunerSkill
- wayfinderSkill
- gaia-issue-resolverSkill
- gaia-triageSkill
- impeccableSkill
- lucy-riveSkill
- wayfinderSkill
- impeccableSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 7 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Read these before production, in this order:
- Very specific: line 27
Use gpt-image-2.6 only (gpt-image-2.6-sunburst for precision masters).
- Distinctive: line 29
Do not request alternates, variations, or a second attempt.
- Distinctive: line 36
Treat each named candidate or bounded edit as its own one-call job.
- Very specific: line 51
Write a receipt to docs/lucy/production/runs/<job-id>.md with model, prompt path or full prompt, input authorities, raw path, outputs, …
- Distinctive: line 57
When a brief says transparent, the final production WebP must contain real alpha.
- Very specific: line 63
If the generator returns an opaque background, accept that one result and use deterministic removal.
- Very specific: line 70
Run scripts/assets/lucy-matte-guard.py for native-alpha validation or verified flat-green extraction.
- Distinctive: line 106
Use free local processing wherever possible.
- Very specific: line 112
Keep reusable processing logic in scripts/assets/.
- Very specific: line 150
Use --provider cpu when Core ML is unavailable.
- Distinctive: line 154
Every supersampled run must record:
- Distinctive: line 183
All states retain shoulder-length silver-white hair, dark sailor uniform, prismatic ribbon, barefoot anatomy, real steel katana …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Lucy Image Production
This is the Skill Heaven specialization of Gaia Image Production. It governs every generated Lucy raster, background removal, upscale, crop, filter, and WebP export in this repository.
Authority
Read these before production, in this order:
packages/site/src/assets/lucy/authority/lucy-character-sheet-master.pngdocs/lucy/authority/LUCY_CANONICAL_CHARACTER_SHEET.mddocs/lucy/authority/lucy-canon.jsonpackages/site/src/assets/lucy/authority/lucy-original-reference.jpg- The assigned job in
docs/lucy/production/ASSET_PRODUCTION_PLAN.md
The final sheet and written canon win over every earlier iteration. Lucy is one character. Her anatomy and outfit do not transform between states.
Paid generation contract
- Use
gpt-image-2.6only (gpt-image-2.6-sunburstfor precision masters). - Make exactly one generation call for each assigned
GEN-*job. - Do not request alternates, variations, or a second attempt.
- Include the authority images in the generation context.
- Preserve the first result even when it fails a gate; mark the job blocked.
- Self-review the result once. Continue only with deterministic local processing: crop, resize, alpha extraction, cleanup, compositing, inversion, color filtering, and WebP export.
- An owner-authorized candidate brief may define multiple named candidates. Treat each named candidate or bounded edit as its own one-call job. Never add replacements beyond the explicit candidate count, and never promote a candidate before the brief's human selection gate.
Storage contract
- Raw/master/intermediate PNGs:
packages/site/assets/workbench/lucy/<job-id>/(gitignored). - As-is backup: run
scripts/assets/backup-lucy-pngs.shafter any PNG lands. - Production deliverables:
packages/site/src/assets/lucy/as WebP. - The canonical sheet and owner-approved source masters already retained under
src/assets/lucy/*/masters/may stay in Git for authority and provenance, but frontend code must never import those PNGs directly; browsers load delivery WebPs only. - Write a receipt to
docs/lucy/production/runs/<job-id>.mdwith model, prompt path or full prompt, input authorities, raw path, outputs, dimensions, alpha result, self-review results, and any blocked item.
Transparency and chroma fallback
When a brief says transparent, the final production WebP must contain real alpha. No white, black, gray, or colored matte may remain in translucent edges.
- Request a transparent background in generation.
- Inspect the PNG alpha channel itself. A painted checkerboard is opaque art, not transparency, even when the RGB preview looks correct.
- If the generator returns an opaque background, accept that one result and
use deterministic removal. Prefer a flat
#00FF00chroma field requested in the original brief; chroma green is deliberately distant from Lucy's cyan, blue, gold, red, silver, and skin palette. - Reject opaque white, gray, scene, simulated transparency, and baked-checker sources at the matte gate. Do not reconstruct a checker into speculative alpha. Never use purple or magenta as a Lucy chroma field.
- Run
scripts/assets/lucy-matte-guard.pyfor native-alpha validation or verified flat-green extraction. Supply a semantic-region JSON for character masters so face core, head, hair, torso, both arms/hands, both legs/feet, wings, and weapons must each pass alpha-density gates. The face-core region must have at least 70 percent of pixels at alpha 192 or higher and median nonzero alpha of at least 224. Head and hair must also meet the tool's median-alpha floors; nonzero ghost pixels do not count as completeness. - Inspect the generated white, black, mid-gray, light-checker, dark-checker, inverted-RGB checker, and raw-alpha audits for halos, holes, ghost pixels, missing pale features, and contaminated glass edges.
- Require zero strong-green and zero strong-magenta pixels in the
exterior-connected partial-alpha band for chroma-key work. An approved
native-alpha prismatic source may use the guard's explicit
--source-native-prismexception only when the receipt records the source provenance and edge counts and browser QA confirms the inherited hues are art, not matte contamination. Do not infer completeness from RGB; the alpha silhouette is the authority. - Export a lossless-alpha WebP and re-open it to verify alpha survived.
Chroma is a workbench surface, never a brand color. Do not regenerate because alpha removal is inconvenient.
Example fail-closed matte invocation:
python3 scripts/assets/lucy-matte-guard.py \
--input packages/site/assets/workbench/lucy/JOB/raw.png \
--output packages/site/assets/workbench/lucy/JOB/intermediate/alpha.png \
--audit-dir packages/site/assets/workbench/lucy/JOB/audit \
--report packages/site/assets/workbench/lucy/JOB/matte-report.json \
--regions packages/site/assets/workbench/lucy/JOB/semantic-regions.json \
--candidate JOBDeterministic processing
Use free local processing wherever possible. The preferred portable runtime is:
npx -y --package=tsx --package=sharp --package=@img/sharp-wasm32 tsx <script>Keep reusable processing logic in scripts/assets/; do not hide the workflow
inside an untracked one-off command. Derivatives from the same generation—wide
composites, state cards, portraits, social crops, filtered plates, and mobile
crops—are not new image-generation jobs.
Supersampling modes
Generation/master authority, enhancement workbench, delivery master, web encoding, and verification are separate stages. The approved source always owns Lucy's pose, identity, composition, and silhouette. An enhancer may recover bounded image detail; it never owns alpha geometry.
- standard: direct deterministic resampling for ordinary derivatives.
- high: a 4x enhancement workspace collapsed to the requested delivery dimensions.
- overkill: offline hero/key-art production. Separate luma, chroma, and
canonical alpha; use a neural detail oracle only on luma with
face_enhance=false; keep conservative resampling as the structural owner; then use a tiled 16x numerical workspace and staged Lanczos16x -> 4x -> 2xcollapse. Never commit or ship the 4x/8x/16x workspace.
The v5 reference implementation is
scripts/assets/lucy-v5-overkill-export.py. Reproduce it from a clean checkout
with Python 3.11 and the pinned
scripts/assets/requirements-lucy-overkill.txt; the script downloads the
checksum-pinned MIT-licensed ArtCNN R16F96 ONNX model into the ignored
workbench. Its hybrid path bounds the ArtCNN luma residual, reconstructs BT.709
Cb/Cr independently, resamples the source alpha independently, produces exact
2x delivery dimensions, encodes lossy RGB with lossless/high-fidelity alpha,
reopens the WebP, and refuses any encoded alpha change.
python3.11 -m venv packages/site/assets/workbench/lucy/ISSUE-73-OVERKILL/.venv
packages/site/assets/workbench/lucy/ISSUE-73-OVERKILL/.venv/bin/pip install -r scripts/assets/requirements-lucy-overkill.txt
packages/site/assets/workbench/lucy/ISSUE-73-OVERKILL/.venv/bin/python scripts/assets/lucy-v5-overkill-export.py --provider coreml --force
python3 scripts/assets/validate-lucy-v5-delivery.pyUse --provider cpu when Core ML is unavailable. Provider choice is recorded
in the manifest and may alter RGB bytes; dimensions, bounded-detail policy, and
decoded-alpha verification remain identical.
Every supersampled run must record:
- source and model provenance plus SHA-256;
- exact source, theoretical workspace, and delivery dimensions;
- model/runtime/provider versions and
face_enhance=false; - luma residual bounds, chroma method, and alpha method;
- encoded dimensions, byte count, alpha counts/hash, and output hash;
- white, black, gray, light/dark checker, inverted-RGB, and raw-alpha audits;
- real browser verification on every consuming route at desktop and mobile.
The delivery size and byte budget are quality targets, not permission to damage the approved art. Report misses honestly. A delivery must still be a smaller modern-format browser asset than its retained source PNG.
State gates
- Zero: seated zen, closed eyes, normal gravity, one katana, no wings and absolutely no shards.
- Heaven: unique falling pose, both diamond eyes open, one katana, ordered saturated cyan-blue glass-shard wings.
- Hell: generate a complete Heaven-palette source with both eyes naturally closed and one continuous tear from the eyelid down the full face, then apply one exact full-foreground RGB inversion. The source tear must be the cyan complement that becomes the final vivid red tear. Use one katana and fragmented shards. Never patch eyelids or recolor the tear after inversion; all Hell-related derivatives descend from the untouched inverted master.
- Ultra: unique decisive falling pose, one gold diamond eye open, the other closed with a red tear, two matching katanas, gold shards, never inverted.
All states retain shoulder-length silver-white hair, dark sailor uniform, prismatic ribbon, barefoot anatomy, real steel katana construction, and glass shards with no feathers or membranes.
One-pass self-review checklist
- Same canonical Lucy, proportions, uniform, hair length, ribbon, bare feet.
- Assigned pose, gravity, eye state, tear, weapon count, and shard language.
- No text, labels, signature, watermark, frame, or accidental UI.
- Full silhouette and required effects are not clipped.
- Transparent deliverables have real alpha and no matte/halo.
- Head, face, hair, torso, limbs, wings, and weapons have nonzero alpha in their declared semantic regions.
- White, black, gray, normal-checker, dark-checker, and inverted previews preserve hair, skin, glass, and steel edges.
- Exterior partial-alpha edges contain no strong green or magenta pixels.
- The two-pixel interior foreground boundary contains no strong green key spill. This includes opaque hair/glass edge pixels: exact Hell inversion would turn missed green spill into a magenta rim.
- For Hell, enforce that green-boundary rule on the pre-inversion source.
The final exact-inverted Hell may use the guard's explicit
--exact-inverted-hellmode only after the source report passes and the inversion report proves full-foreground RGB inversion plus byte-identical alpha. This avoids misclassifying legitimate green produced by inverting canonical source magenta. - Hell inversion receipts must verify the source tear contains vivid cyan pixels in the declared face-core, the exact inversion contains the same number of vivid-red pixels, and the red pixels span at least 35 percent of the face-core height. Human composite review still decides eyelid contact and unbroken eyelid-to-jaw continuity.
- Output dimensions and file paths match the production plan.
- Production WebP re-opens successfully and stays within its target size.
- Raw PNG was backed up as-is.
- Receipt records pass/fail honestly; failed gates are not silently hidden.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

