Encode an animated GIF from RGBA frames inside a Code node or CodeAct action, with gifenc running in the guest
Scanned 9/1/2026
Install to Claude Code
npx -y skills add nodetool-ai/nodetool --skill sandbox-gif --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Sandbox Gif?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/nodetool-ai-sandbox-gif)More formats (shields.io, HTML) on the badges page.
---
name: sandbox-gif
description: Encode an animated GIF from RGBA frames inside a Code node or CodeAct action, with gifenc running in the guest
---
# GIF encoding in the sandbox
Specifier: `@nodetool-ai/sandbox-gif`. One module, gifenc. Import it at the top of the body.
## Frames to a GIF
```js
import { GIFEncoder, quantize, applyPalette } from "@nodetool-ai/sandbox-gif";
const gif = GIFEncoder();
for (const frame of inputs.frames) {
const palette = quantize(frame.rgba, 256);
const index = applyPalette(frame.rgba, palette);
gif.writeFrame(index, inputs.width, inputs.height, {
palette,
delay: frame.delay ?? 100
});
}
gif.finish();
return { bytes: gif.bytes() };
```
Each `frame.rgba` is a `Uint8Array` of length `width * height * 4`.
`delay` is milliseconds.
## Gotchas
- **You supply RGBA.** Decode a still with `image.bytes` / canvas, then
pack frames yourself.
- **`gif.bytes()` is a `Uint8Array`.** Write it with
`workspace.writeBytes`.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...