Generate Images With Takumi logo

Generate Images With Takumi

Organization
zenobi-us
generate-images-with-takumi

Guidelines, syntax, templates, API usage, and styling best practices for rendering static/animated images and vector SVG using Takumi.

Overview

Publisherzenobi-us
Repositorydotfiles
Skill namegenerate-images-with-takumi
Stars
67
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by zenobi-us on GitHub. Read the source before you install it.

Installation

Install the Generate Images With Takumi AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zenobi-us/dotfiles.git /tmp/dotfiles
mkdir -p .claude/skills
cp -r /tmp/dotfiles/files/devtools/agent/bundles/creator/skills/imagegen/generate-images-with-takumi .claude/skills/generate-images-with-takumi
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Generate Images With Takumi in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Generate Images With Takumi on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Generate Images With Takumi is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Takumi Usage & Best Practices

All-in-one guide for rendering with Takumi. Built-in layout rules, advanced styles, and performance.

JS / TS API Reference

1. Static Render (render & renderSvg)

Renders JSX templates, HTML strings, or JSON node trees to raster buffers (PNG/JPEG/WebP) or vector SVG markup.

typescript
import { render, renderSvg } from "takumi-js";

// Renders dynamic JSX layout directly to PNG bytes
const pngBuffer = await render(
  <div tw="w-full h-full bg-zinc-950 flex items-center justify-center">
    <h1 tw="text-white text-6xl">Takumi Engine</h1>
  </div>,
  {
    width: 1200,
    height: 630,
    format: "png", // "png" | "jpeg" | "webp"
    quality: 90    // (Optional) For JPEG/WebP formats
  }
);

// Renders to responsive XML SVG string containing glyph path vector data
const svgString = await renderSvg(
  <div tw="w-full h-full bg-zinc-900">
    <span tw="text-white">Scalable Vector</span>
  </div>,
  { width: 800, height: 400 }
);

2. Animated Render (renderAnimation)

Compiles sequences of scenes into animated WebP, GIF, or APNG buffers.

typescript
import { renderAnimation } from "takumi-js";

const animatedBuffer = await renderAnimation({
  width: 400,
  height: 400,
  fps: 30,
  format: "webp", // "webp" | "gif" | "apng"
  quality: 80,    // Compression quality (0-100)
  scenes: [
    {
      durationMs: 1500,
      node: (
        <div tw="w-full h-full bg-black flex items-center justify-center">
          <div tw="w-24 h-24 bg-rose-500 animate-bounce rounded-full" />
        </div>
      )
    }
  ]
});

3. Edge / Framework Integration (ImageResponse)

A next/og compatible handler designed for Edge runtimes, Cloudflare Workers, Next.js API endpoints, and standard HTTP server frameworks.

typescript
import { ImageResponse } from "takumi-js/response";

export function GET() {
  return new ImageResponse(
    <div tw="w-full h-full bg-slate-900 flex items-center justify-center">
      <h1 tw="text-white text-5xl">Dynamic OG Card</h1>
    </div>,
    {
      width: 1200,
      height: 630
    }
  );
}

4. Parsing Helpers (takumi-js/helpers/*)

Low-level utilities for compiling layout elements without executing the full renderer.

typescript
import { fromHtml } from "takumi-js/helpers/html";
import { fromJsx } from "takumi-js/helpers/jsx";

// Converts raw HTML template string into JSON layout node tree
const htmlNodeTree = fromHtml(
  "<div class='flex'><span>Hello</span></div>",
  { max_depth: 512 }
);

// Compiles React ReactNode elements into JSON layout node tree
const jsxNodeTree = fromJsx(
  <div tw="flex"><span>Hello</span></div>
);

Options Configuration (RenderOptions)

  • fonts: An array of custom fonts [{ name, url, weight, style }]. Values can point to remote URLs (WOFF2/WOFF/TTF), local file paths, or binary Node.js Buffer arrays.
  • emoji: Configures the emoji fallback strategy: "twemoji" (default), "blob-emoji", "openmoji", "noto-emoji", or "from-font" (uses custom loaded font glyphs).
  • images: Option to pass pre-fetched image arrays [{ url, buffer }] or supply a shared caching fetch-client configuration.
  • stylesheets: An array of raw global CSS string sheets to inject into the rendering layout context.

Hidden Layout Capabilities (Deep-Dive)

1. Auto-scaling Text (text-fit)

Automatically scales font-size to fit the containing inline line-box width, avoiding clipping or wrapping.

  • Syntax: text-fit: [ none | grow | shrink ] [ consistent | per-line | per-line-all ]? [percentage]?
  • Example: tw="text-fit-grow-consistent" or style={{ textFit: "grow consistent 120%" }}.

2. CSS Motion Paths (offset-path)

Enables complex placement and animation sequences of elements along custom vector paths or geometric rays.

  • Properties: offset-path, offset-distance (percentage), offset-rotate (angle / auto).
  • Syntax: ray(<angle> <size> contain? at <position>?) or path("<svg path command>") or basic shapes (circle(), polygon(), inset()).

3. OpenType Typography Settings

Provides fine-grained control over font rendering features and variable layout configurations.

  • font-variation-settings: Configures variable font axis settings (e.g. "'wght' 750, 'wdth' 90").
  • font-feature-settings: Enables OpenType font ligatures, kerning, and variants (e.g. "'ss01' 1, 'kern' 1").

4. Custom Filters & Graphics

  • filter: Supports blur(), brightness(), contrast(), drop-shadow(), grayscale(), hue-rotate(), invert(), opacity(), saturate(), sepia().
  • mix-blend-mode & background-blend-mode: Layer blending modes (e.g. multiply, screen, overlay).
  • backdrop-filter: Applies filter effects to elements behind the container.
  • clip-path: Clips elements via shapes: polygon(...), circle(...), inset(...).

5. Layout Defaults

  • CSS Grid support: Supports grid-cols-X, gap-X, flex, and block layout.
  • Tag Presets: Custom HTML styles are pre-mapped for tags: h1h6, div, pre (keeps space layout), strong, em, blockquote, and hr.
  • Line Breaks: <br> tags parse to \n in text elements automatically.

Rust Crate API (takumi)

rust
use takumi::prelude::*;
use takumi::render;

let node = Node::container([Node::text("Hello, world!").with_style(
  Style::default().with(StyleDeclaration::font_size(Length::Px(32.0).into())),
)]);

let mut fonts = Fonts::default();
fonts.register(FontResource::new(include_bytes!(
  "../../files/assets/fonts/geist/Geist[wght].woff2"
)))?;

let options = RenderOptions::builder()
  .viewport(Viewport::new((1200, 630)))
  .node(node)
  .fonts(&fonts)
  .build();

let image = render(options)?;

To build the node tree from HTML instead, enable the from-html feature and use from_html:

rust
use takumi::prelude::*;
use takumi::{from_html, render};

let mut fonts = Fonts::default();
fonts.register(FontResource::new(include_bytes!(
  "../../files/assets/fonts/geist/Geist[wght].woff2"
)))?;

let html = r#"<div style="background: red; width: 100%; height: 100%;"></div>"#;
let node = from_html(html, FromHtmlOptions::default())?;

let options = RenderOptions::builder()
  .viewport(Viewport::new((1200, 630)))
  .node(node)
  .fonts(&fonts)
  .build();

let image = render(options)?;

Frequently asked questions

What does the Generate Images With Takumi AI skill do?

Guidelines, syntax, templates, API usage, and styling best practices for rendering static/animated images and vector SVG using Takumi.

Why use Generate Images With Takumi on TypingMind?

Because you install it once and use it with any model. Generate Images With Takumi is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Generate Images With Takumi in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/zenobi-us/dotfiles/tree/master/files/devtools/agent/bundles/creator/skills/imagegen/generate-images-with-takumi. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Generate Images With Takumi?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Generate Images With Takumi?

As many as you like. As long as a model supports skills, you can use Generate Images With Takumi with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Generate Images With Takumi AI skill free?

Yes. It is published on GitHub by zenobi-us under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇