Agent skill

3D Image Renderer

by hassancs91 in hassancs91/claude-image-generation

Generate PNG images by building a real Three.js 3D scene and capturing one frame headlessly — no image model involved.

MITAuto-check passedGame Development

Install 3D Image Renderer

skills CLI
$ npx skills add hassancs91/claude-image-generation --skill 3d-image-renderer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hassancs91/claude-image-generation 3d-image-renderer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hassancs91/claude-image-generation.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/level-2-image-generator .claude/skills/3d-image-renderer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
3d-image-renderer
GitHub stars
101
Token cost
~1.4k tokens
SKILL.md length
514 words
Files
7 (incl. scripts, references, assets)
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Generate PNG images by building a real Three.js 3D scene and capturing one frame headlessly — no image model involved.

  • Works in 6 steps: Setup → Plan the scene → Write the scene → …
  • The user asks to generate
  • SKILL.md covers Inputs, Workflow (follow in order) and Hard rules (violating any of…
  • Runs JavaScript and Shell scripts from its folder; calls bash and node

What it does

3D Image Renderer is an agent skill from hassancs91/claude-image-generation. Generate PNG images by building a real Three.js 3D scene and capturing one frame headlessly — no image model involved. Takes a text prompt and an aspect ratio (1:1, 16:9, or 9:16) and produces a rendered PNG. Use this skill whenever the user asks to generate, create, or render an image, picture, scene, wallpaper, thumbnail background, or product shot with this system — especially with phrases like "generate an image of", "render a scene", "create a PNG", "no image model", "3D render of", or a prompt paired with…

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts, reference files and assets (for example `references/geometry-recipes.md`, `references/style-presets.md` and `scripts/setup.sh`).

It sits in Game Development, covering 3D graphics and WebGL, Image generation and Motion graphics. It works with Three.js. The repository describes itself as: Connect Claude to image generation with Agent Skills. Three levels: a zero-cost code-based design engine, a Three.js 3D renderer, and a real diffusion model on Cloudflare. Plus… The licence is MIT.

When your agent uses it

  • The user asks to generate
  • Render an image
  • Thumbnail background
  • Product shot with this system — especially with phrases like generate an image of

Example prompts

  • “generate an image of”
  • “render a scene”
  • “create a PNG”
  • “/3d-image-renderer”

Requirements

  • Node.js
  • A Bash shell

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Setup
  2. Plan the scene
  3. Write the scene
  4. Render
  5. Validate (mandatory — never skip)
  6. Deliver

What it can do on your machine

Read from SKILL.md and the folder at commit f533831. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (JavaScript and Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

3D Image Renderer loads about 1.4k tokens when it runs, and up to ~4.1k if it reads all its reference files. Until then it costs about 192 tokens; SKILL.md has 514 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~192
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from hassancs91/claude-image-generation at commit f533831, republished under its MIT licence (© hassancs91). 514 words, ~1,377 tokens.

Download SKILL.mdSave it as .claude/skills/3d-image-renderer/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
3d-image-renderer
description
Generate PNG images by building a real Three.js 3D scene and capturing one frame headlessly — no image model involved. Takes a text prompt and an aspect ratio (1:1, 16:9, or 9:16) and produces a rendered PNG. Use this skill whenever the user asks to generate, create, or render an image, picture, scene, wallpaper, thumbnail background, or product shot with this system — especially with phrases like "generate an image of", "render a scene", "create a PNG", "no image model", "3D render of", or a prompt paired with an aspect ratio. Also use it when the user wants an image in a named visual style (dark studio, Apple light, nature, sunset, night, underwater). Not for editing existing images, 2D vector art, or animated video (VidTSX handles video).

3D Image Renderer

Renders a text prompt into a PNG by writing a Three.js scene and capturing one frame with headless-gl under Xvfb. Think of every image as frame 0 of a TSX animation composition: deterministic, seeded, time = 2.0s.

Inputs

  • prompt — what to render
  • aspect ratio — one of 1:1 (1080×1080), 16:9 (1920×1080), 9:16 (1080×1920). Default 16:9 if unspecified. No custom sizes.

Workflow (follow in order)

1. Setup
bash
bash <skill_dir>/scripts/setup.sh

Idempotent; instant when cached. Installs npm deps into /home/claude/scene-render/ and drops the bundled prebuilt gl binary in place (compiles from source only if the binary fails its smoke test). It also copies pipeline.mjs and validate.mjs into the workdir. If it prints SETUP FAILED, report the error to the user — do not hand-roll a fallback.

2. Plan the scene
  • Pick ONE style preset → read references/style-presets.md now.
  • List the hero elements: every concrete noun in the prompt ("headphones", "tree", "flowers") is a hero element.
  • Read references/geometry-recipes.md for any element it covers before inventing geometry.
3. Write the scene

Create /home/claude/scene-render/scene.mjs. Import ONLY from the local pipeline — never re-implement renderer setup, pixel readback, or PNG writing:

js
import {
  THREE, createRenderer, captureFrame, addStudioEnvironment,
  seededRandom, visibleHeightAt,
} from './pipeline.mjs';

const time = 2.0; // the captured "frame"
const { renderer, glContext, W, H, OUT_W, OUT_H } =
  createRenderer('16:9', { exposure: 1.15 /* from style preset */ });

const scene = new THREE.Scene();
// ... build: sky, lights, ground, hero elements (per preset + recipes) ...

await captureFrame({
  renderer, glContext, scene, camera, W, H, OUT_W, OUT_H,
  outPath: '/home/claude/scene-render/out.png',
});
console.log('DONE');

Scene-authoring rules:

  • All randomness via seededRandom(seed) — never Math.random().
  • InstancedMesh for anything repeated 50+ times; per-instance color via setColorAt + instanceColor.needsUpdate = true.
  • Bake rotations into geometry (geometry.rotateZ(...)) — do not stack Euler rotations on meshes for construction.
  • Validate every horizon/background element with visibleHeightAt (the FOV rule in geometry-recipes.md) BEFORE rendering.
  • No post-processing. Glow = emissive + additive blending + fog.
  • WebGL1 only: no transmission, no WebGL2-only features, three stays at 0.152.2 (pinned by setup — do not upgrade).
4. Render
bash
cd /home/claude/scene-render && xvfb-run -a node scene.mjs
Show full SKILL.md (261 more words)Show less
5. Validate (mandatory — never skip)

Write a hero spec covering each prompt-named element with its dominant material color, then:

bash
node validate.mjs out.png heroes.json
json
[
  { "name": "flowers", "hex": "f5a8c8", "tolerance": 45, "minPct": 0.3 },
  { "name": "tree canopy", "hex": "5a9440", "tolerance": 60, "minPct": 2.0 }
]

Also open the PNG with the view tool if image viewing works in this session. If it returns placeholders, rely on the validator output (histogram, ASCII map, presence checks) — it was designed for exactly that.

Fix and re-render when:

  • any hero element FAILs presence (typical fixes: more instances, bigger scale, camera reframe, contrasting material)
  • WASHED OUT / TOO DARK / LOW CONTRAST warnings (typical fixes: exposure and ambient per the style preset table; in light styles swap pure-white materials for metallic/mid-gray)
  • the ASCII map shows a composition failure (subject cropped, background walling off the sky)

Maximum 2 fix iterations, then deliver best result and tell the user what still needs work.

6. Deliver
bash
cp /home/claude/scene-render/out.png "/mnt/user-data/outputs/<descriptive_name>.png"

Present the PNG with present_files. Keep the summary short: style preset used, hero elements, and any validation fixes applied. Only include scene.mjs in the delivery if the user asks for the code.

Hard rules (violating any of these produced real failures)

  1. three@0.152.2 pinned — r163+ drops WebGL1 and headless-gl is WebGL1-only.
  2. Pixel readback needs vertical flip + alpha forced to 255 (pipeline does it).
  3. No MSAA headless — SSAA 2× via the pipeline is the anti-aliasing.
  4. Light styles: exposure ≤ 1.08, ambient ≤ 0.35, and the hero MUST include a metallic or mid-gray material. Pure white on white is invisible.
  5. Background elements sized by intuition WILL wall off the sky — run the FOV check.
  6. Prompt-named elements must pass the presence validator before delivery.
  7. Everything deterministic: seededRandom, fixed time = 2.0.

© hassancs91, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references, assets) in .claude/skills/level-2-image-generator of hassancs91/claude-image-generation.

  • SKILL.md
  • assets/webgl-abi127-linux-x64.node
  • references/geometry-recipes.md
  • references/style-presets.md
  • scripts/lib/pipeline.mjs
  • scripts/setup.sh
  • scripts/validate.mjs

Open the folder on GitHubat commit f533831

Compare with similar skills

3D Image Renderer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

3D Image Renderer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
3D Image Renderer this skillhassancs91/claude-image-generation101—~1.4kAutomated safety check: PassMIT
Qiaomu Cutjoeseesun/qiaomu-cut-skill372—~6.8kAutomated safety check: NotesMIT
Threejs Image Generatorvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0
Content To Videoarchitectds/modeldock117—~2.4kAutomated safety check: PassApache-2.0
Threejs World Generationcalesthio/OpenMontage66k—~2kAutomated safety check: PassAGPL-3.0
Kinetic Reeltuzhechen2005/opus-video-skills137—~1.8kAutomated safety check: PassCustom licence

Similar skills

  • Qiaomu Cut

    joeseesun/qiaomu-cut-skill

    把一句话需求转成可复现、可验收视频工程的乔木智能剪辑导演。Use when the user asks to create, plan, edit, remix, explain, narrate, subtitle, animate, composite, or render a video—including one-line requests such as “制作一个科普视频:介绍…

    372 GitHub stars~6.8k tokensUpdated 12 days ago
    Media & CreativeAuto-check: notes
  • Generate and edit 2D image assets for Three.js games with Google's Gemini image API: concept sheets, image-to-3D inputs, texture and material references, sky and background plates, decals, logos…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Content To Video

    architectds/modeldock

    Turn arbitrary source content (README, article, story, slides, deck, data/report, product description, tutorial text, audio/transcript, or a bare topic) into a finished, high-quality MP4 video.

    117 GitHub stars~2.4k tokensUpdated 4 days ago
    Media & CreativeAuto-check passed
  • Threejs World Generation

    calesthio/OpenMontage

    Build deterministic, editable, free-viewpoint Three.js worlds from text or structured briefs.

    66k GitHub stars~2k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Kinetic Reel

    tuzhechen2005/opus-video-skills

    Make kinetic-typography motion reels (MP4) in code: showreels, portfolio or work reels, product promos, intro films, "motion design"-style videos with bold condensed type, HUD micro-type…

    137 GitHub stars~1.8k tokensUpdated 13 days ago
    Media & CreativeAuto-check passed
  • Scenario Kinetic Music Video

    scenario-labs/skills

    A skill your agent uses when turning a song into a kinetic-typography or motion-design music video, lyric video, visualizer or K-pop style MV with Scenario: a generated subject sheet, style frames…

    931 GitHub stars~3.5k tokensUpdated yesterday
    Game DevelopmentAuto-check passed

More from hassancs91/claude-image-generation

  • Story HTML Publisher

    hassancs91/claude-image-generation

    Final step of the AI Storybook pipeline. An agent skill from hassancs91/claude-image-generation.

    101 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Cf Image

    hassancs91/claude-image-generation

    Generate an image from a text description using Cloudflare Workers AI (the flux-1-schnell model).

    101 GitHub stars~867 tokensUpdated 1 mo ago
    Auto-check: notes
  • Prompt To Design

    hassancs91/claude-image-generation

    Generate a polished PNG graphic from a text prompt and an aspect ratio.

    101 GitHub stars~3.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Scene Splitter

    hassancs91/claude-image-generation

    Splits a plain English story into a numbered list of SCENES — each scene being one moment that gets exactly one illustration AND one narration clip downstream.

    101 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Story Narrator

    hassancs91/claude-image-generation

    Generates one expressive narration MP3 per scene for an English storybook, using the ElevenLabs MCP (texttospeech).

    101 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about 3D Image Renderer

What does 3D Image Renderer do?

Generate PNG images by building a real Three.js 3D scene and capturing one frame headlessly — no image model involved. 3D Image Renderer is an agent skill from hassancs91/claude-image-generation.js 3D scene and capturing one frame headlessly — no image model involved.

When should I use 3D Image Renderer?

3D Image Renderer fits situations like: the user asks to generate; render an image; thumbnail background; product shot with this system — especially with phrases like generate an image of.

How do I install 3D Image Renderer in Claude Code?

Run `npx skills add hassancs91/claude-image-generation --skill 3d-image-renderer -a claude-code`. Or copy the skill folder (.claude/skills/level-2-image-generator in hassancs91/claude-image-generation) into .claude/skills/3d-image-renderer in your project. Claude Code loads it when a task matches its description.

How do I install 3D Image Renderer in Codex?

Run `npx skills add hassancs91/claude-image-generation --skill 3d-image-renderer -a codex`. Or copy the skill folder (.claude/skills/level-2-image-generator in hassancs91/claude-image-generation) into .agents/skills/3d-image-renderer in your project. Codex loads it when a task matches its description.

Can I use 3D Image Renderer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hassancs91/claude-image-generation --skill 3d-image-renderer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/3d-image-renderer, .gemini/skills/3d-image-renderer, .github/skills/3d-image-renderer and .opencode/skills/3d-image-renderer in your project.

What does 3D Image Renderer need to run?

Going by SKILL.md and its folder, 3D Image Renderer needs JavaScript and a shell for the scripts in its folder and the command-line tools its instructions call (bash and node). Our summary lists: Node.js; A Bash shell.

Does 3D Image Renderer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is 3D Image Renderer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does 3D Image Renderer use?

3D Image Renderer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does 3D Image Renderer use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.8k tokens, read only when the agent opens those files.

What are the alternatives to 3D Image Renderer?

Skills that share tags, products or a category with 3D Image Renderer: Qiaomu Cut (joeseesun/qiaomu-cut-skill, 372 stars), Threejs Image Generator (valkor-ai/loom, 1.2k stars), Content To Video (architectds/modeldock, 117 stars) and Threejs World Generation (calesthio/OpenMontage, 66k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains 3D Image Renderer?

hassancs91 (a GitHub user) maintains it in hassancs91/claude-image-generation, which has 101 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on August 18, 2026.

Source: hassancs91/claude-image-generation on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.