OpenParable
Skip to content
← Back to skills

Migrate From Satori

Development
migrate-from-satori

Migrate From Satori is an Agent Skill for development published in the kane50613/takumi repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Guides and automated instructions for migrating from Vercel's Satori, next/og, or @vercel/og to Takumi.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/kane50613/takumi/blob/HEAD/.agents/skills/migrate-from-satori/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/migrate-from-satori, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Migrate Satori / next/og to Takumi

Upgrade instructions. Replace Satori layout limitations with Takumi advanced features.

Feature Differences

FeatureSatoriTakumi
Primary OutputSVG only (needs resvg wrapper)PNG, JPEG, WebP, SVG, GIF, APNG
CSS LayoutFlexbox onlyFlexbox, CSS Grid, block, inline, float
Advanced CSS✗Grid, pseudo-elements, backdrop-filter, clip-path, text-fit, offset-path
FontsManual Buffer arraySystem fonts, URLs, local paths, Buffers
TailwindLimited / wrapper neededNative Tailwind v4 (tw/class, arbitrary values)

Code Changes

Next.js ImageResponse

Before:

import { ImageResponse } from "next/og";
// ... returns new ImageResponse(...)

After:

import { ImageResponse } from "takumi-js/response";
// ... returns new ImageResponse(...)

Direct Rendering

Before:

import satori from "satori";
import { Resvg } from "@resvg/resvg-js";
const svg = await satori(element, { width, height, fonts: [{ name: "A", data: buf }] });
const png = new Resvg(svg).render().asPng();

After:

import { render } from "takumi-js";
const png = await render(element, {
  width,
  height,
  fonts: [{ name: "A", url: "https://url.woff2" }],
});

Upgrades to Apply

  • CSS Grid: Convert complex flex layouts to tw="grid grid-cols-12 gap-4".
  • CSS Variables & Custom Selectors: Embedded <style> rules, :is(), :where(), ::before, ::after work natively.
  • Auto Font Handling: Drop manual loading scripts. Rely on system fonts or CDN URLs.
  • Advanced Visuals: Use backdrop-filter, clip-path, and blend modes directly in styling.