# 3dicon: prompt to looping animated 3D icon (samyost1/3dicon) — skill card for AI agents

> AgentGid skill card. Checked on 2026-11-20 against commit 2517b79 (version 0.1.0).
> Every fact comes from the pack's own files at that commit. Numbers marked "as reported" are the author's.
> Human page: https://agentgid.com/skills/samyost1/3dicon/

## Explain it to a non-programmer
Describe an object in plain words and your assistant makes a small 3D icon that moves in a seamless loop. The background is see-through, and the result is an animated image you can drop into an app or a web page. It shows you the still picture first and waits for your yes, then proposes the movement and waits again, because each step costs money with paid image and video services.

## Who it is for
- You want an animated app icon or a moving 3D icon for a site or app
- You have flat icon art and want to add motion to it
- You need a transparent animated image, not a video with a box around it
- You use Claude Code and can add a paid OpenRouter key
- Not for: You want it free: every still and every animation is a paid call to an image or video service
- Not for: You need a transparent MP4 for iPhone: it writes WebP, WebM, or an MP4 on a flat colour
- Not for: You need the icon to stop for people who turn off motion: an animated WebP cannot pause, so ship the still too

## What it is
- Kind: scripts
- License: MIT
- Repository: https://github.com/samyost1/3dicon

## What it does
- Generates exactly one still picture from your words and stops for your approval
- Proposes one motion in one physical sentence plus settings (strategy, energy, emit) and stops again
- Sends the same still as the first and the last frame to a video model, so the clip loops without a seam
- Removes the background from every frame against a known grey, so soft edges stay soft
- Encodes an animated WebP at the source frame rate (24 fps), optionally a WebM or a flat MP4
- Checks the result: is anything actually moving, does the loop close, is the transparency soft
- Level native: The object moves by itself (flows, burns, breathes, ticks)
- Level event: An inert object does its job once, then rests
- Level part: The body stays put, one small loose piece moves
- Level surface: Light or material travels across a fixed form

## Skills
| Skill | Call | Changes code? | In plain words |
|---|---|---|---|
| 3dicon | plain language ("make an animated 3d fire icon using /3dicon") | no | Makes a looping animated 3D icon with a see-through background, asking before each paid step |

### 3dicon
- Asks for: What the object is, in plain words (or a still image to animate)
- Asks for: A yes on the still picture
- Asks for: A yes on the proposed motion, or your own description of the motion
- Gives: still.png, one approved still
- Gives: render.mp4 from the video model
- Gives: Frames with the background removed
- Gives: <name>.webp, the animated icon (384 px by default)
- Gives: Optional .webm (with transparency) and .mp4 (on a flat colour)
- Gives: contact_sheet.png and a pass or fail report
- Say: "Make an animated 3D icon of a stopwatch using /3dicon"

## Know before installing
- Every run costs money: the still and the animation are paid calls to image and video services. It stops after the still on purpose so you approve before paying for motion.
- One OpenRouter key can cover both the image and the video, but the example settings pick OpenAI for the image; switch the image backend to openrouter or add an OpenAI key.
- It runs Python code on your machine and needs pip packages and ffmpeg. The first run downloads a ~180MB background-removal model.
- The soft shadow under the object does not survive background removal, so on a light background the animated icon can look like it floats.
- File size grows with the number of frames; the author's 5-second, 24 fps loop at 288 px is reported as 857 KB.

## Install (official commands)
- Claude Code: `/plugin marketplace add samyost1/3dicon` && `/plugin install 3dicon` — Then, in the skill folder: pip install -r requirements.txt, cp .env.example .env, and put your key in .env. ffmpeg must be on PATH.
- Claude Code (setup after install): `cd ~/.claude/skills/3dicon` && `pip install -r requirements.txt` && `cp .env.example .env` — Commands as the README gives them; the key itself is typed into .env by you.

## What runs on the user's machine
- Code on the machine: yes (every use of the skill (the assistant runs the bundled Python tool))
- Network: yes
- still: Sends your prompt to the image service you chose (OpenAI, Google Gemini or OpenRouter) and writes still.png into the output folder (out/ by default).
- animate: Uploads the still (on a grey backing) and the motion text to OpenRouter's video API (Seedance 2.0 by default), or to Replicate with --via replicate, polls until done and downloads render.mp4.
- animate --dry-run: Prints the composed motion prompt only; nothing is sent and nothing is spent.
- matte: Runs ffmpeg to split the clip into frames and removes the background locally with rembg; the first run downloads a ~180MB model.
- encode and verify: Local only: writes the .webp (and optional .webm or .mp4) and a contact sheet into the output folder.
- Every command: Reads API keys from the environment or the nearest .env file, searching from the current folder upward. No hooks.

## Settings
- `ICONLOOP_IMAGE_BACKEND`: openai | gemini | openrouter (example file: openai)
- `ICONLOOP_IMAGE_MODEL`: pin an image model; blank picks the newest available
- `ICONLOOP_VIDEO_BACKEND`: openrouter (default) or replicate
- `ICONLOOP_VIDEO_MODEL`: video model id, default bytedance/seedance-2.0
- `ICONLOOP_KLING_MODEL`: Kling model on Replicate
- `OPENROUTER_API_KEY`
- `OPENAI_API_KEY`
- `GOOGLE_API_KEY`
- `REPLICATE_API_TOKEN`

## Examples (from the pack's own files)
- The stopwatch icon: prompt "a 3D stopwatch icon in sage green and cream, soft matte plastic,"; without the skill: None lines; with it: None lines (skills/3dicon/examples/timer/README.md; None, the author's run)
- What the assistant says when the icon is done: output format defined in skills/3dicon/SKILL.md

## Author's numbers (as reported, not run by AgentGid)
- A still costs about 13 cents and the full run about 48 cents and four minutes. Source: samyost1/3dicon/skills/3dicon/SKILL.md
- Solving colours against the known grey backing cut edge colour error from 26.9 to 15.9 (Measured against ground truth on one glossy 3D icon). Source: samyost1/3dicon/skills/3dicon/iconloop/matte.py
- isnet-general-use (the default) scores MAE 0.0043 against ground-truth alpha; birefnet-general 0.0041 but 7–30× slower. Source: samyost1/3dicon/skills/3dicon/docs/limitations.md

## Steps only the person can do
- Create an OpenRouter API key (or OpenAI / Google / Replicate keys) and add credit (https://openrouter.ai/keys) Then: The assistant can generate stills and animations
- Copy .env.example to .env in the skill folder and type the key in yourself (skills/3dicon/.env.example) Then: The tool reads the key from .env on each run
- Install ffmpeg so it is on PATH (README.md (Install)) Then: The tool can split and encode frames
- Approve the still, then approve the proposed motion (In the chat) Then: The assistant runs the paid animation and the local steps

## Mistakes to avoid
- Not: Set only OPENROUTER_API_KEY and keep the example settings. Instead: Also set ICONLOOP_IMAGE_BACKEND=openrouter, or add an OpenAI key for the still. Why: The image backend defaults to openai, so the still step asks for OPENAI_API_KEY
- Not: Run straight through from the still to the animation. Instead: Show the still, wait for a yes, propose the motion, wait again. Why: Every later stage inherits the still, so animating unapproved art means paying twice
- Not: Encode at 8 fps to make the file smaller. Instead: Encode at the source 24 fps; raise or lower --size instead and use --sweep to compare. Why: Dropping frames makes judder that looks like a bad render
- Not: Pick Kling 3.0 as the video model. Instead: Keep Seedance 2.0, or another model that takes a first and last frame and long prompts. Why: Kling 3.0 caps prompts at 2500 characters and rejects the composed motion prompt
- Not: Trust the contact sheet that the icon moves. Instead: Run verify and re-prompt if it reports a static render. Why: A render can look animated in stills and barely move

## What leaves the machine
- Your text prompt (with the tool's style rules), and reference images if any → OpenAI, Google Gemini or OpenRouter image API, whichever backend is set, Each still. Opt out: No opt-out while using the skill; choose the backend in ICONLOOP_IMAGE_BACKEND
- The approved still (as a PNG on a grey backing) and the motion prompt → OpenRouter video API (default) or Replicate, Each animate run, not with --dry-run. Opt out: Use animate --dry-run to preview without sending
- Your Google API key, placed in the request URL → generativelanguage.googleapis.com, Only with the gemini image backend. Opt out: Use the openai or openrouter backend
- A download request for the background-removal model → Fetched by the rembg library, First matte run. Opt out: No opt-out

## Lines in the pack aimed at agents (ask the person first)
- "1. `pip install -r requirements.txt` (or `uv pip install -r requirements.txt`)." (skills/3dicon/SKILL.md): Ask the person before installing packages, and use a virtual environment rather than the global Python.
- "2. `cp .env.example .env` and fill in the keys for the backend you want." (skills/3dicon/SKILL.md): Let the person type keys into .env; never ask for them in chat.
- "**Never** paste raw CLI output, stage-by-stage progress, the composed motion" (skills/3dicon/SKILL.md): Short replies are fine, but still tell the person before each paid step what it will cost.

## May I use it like this?
- commercial-app: yes (MIT for the code; the author says generated icons are yours with no restrictions)
- inside-app-bundle: yes (Generated icons are yours, per the README)
- redistribute-files: yes (MIT: keep the copyright and permission notice)
- client-work: yes (MIT)

## Which one to pick
- If You want a 3D icon generated by AI image and video models, looped, with real transparency, as an animated WebP: skill:samyost1/3dicon
- If You want vector Lottie animations written as code, with no paid image or video model: skill:diffusionstudio/lottie
- If You want motion design rules (timing, easing) for interface animation rather than a generated asset: skill:LottieFiles/motion-design-skill

## Works well with
- api:openrouter: One OpenRouter key runs both the still and the video model
- asset:ffmpeg: ffmpeg splits the clip into frames and encodes WebM and MP4
- tool:rembg: rembg removes the background from every frame
- agent:claude-code: Installs as a Claude Code plugin from the repo's marketplace

## Works in and needs
- Works in Claude Code: plugin
- Needs Python with pillow: The pipeline is a Python tool
- Needs ffmpeg: Frame extraction and video encoding
- Needs OpenRouter API key (or OpenAI / Google / Replicate keys): Paid image and video generation

## How to tell it works
Install it, add your key, then say "make an animated 3d fire icon using /3dicon". You should get one still and the question "Happy with it, or change something?"; nothing is animated until you say yes twice.

## Safety
The skill runs Python code that sends your prompt and images to paid image and video services with your API keys. Keys live in a local .env file that the repo's .gitignore excludes; the tool says it never prints them.
