comfyui-converter

comfyui-converter is a skill for Claude Code, Codex from thangchung/agent-engineering-experiment. It costs 25 tokens per session (1,186 once invoked), scanned A, original, MIT.

A converter that turns a JSON workflow graph from ComfyUI, a visual tool for AI image-generation workflows, into a TypeScript function.

In plain words
What is it for?
Use it when turning ComfyUI image-generation workflows into reusable TypeScript code with Zod input validation.
Why use it?
It provides a defined structure for validating inputs and carrying workflow settings into code. It also limits the conversion to values and types supported by the workflow configuration.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/thangchung/agent-engineering-experiment/comfyui
Any agent
npx skills add thangchung/agent-engineering-experiment --skill comfyui
Clone the repo
git clone --depth 1 https://github.com/thangchung/agent-engineering-experiment

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for comfyui-converter

README.md
[![agentmods](https://agentmods.dev/badge/skills/thangchung/agent-engineering-experiment/comfyui.svg)](https://agentmods.dev/skills/thangchung/agent-engineering-experiment/comfyui)
Your own site
<a href="https://agentmods.dev/skills/thangchung/agent-engineering-experiment/comfyui"><img src="https://agentmods.dev/badge/skills/thangchung/agent-engineering-experiment/comfyui.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,186 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00025 $0.01186
Opus 5 $0.00013 $0.00593
Sonnet 5 $0.00005 $0.00237
Haiku 4.5 $0.00003 $0.00119

Measured 4d ago against content hash e00408298c45, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

comfyui-converter scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

comfyui-aks/.github/workflows/skills/comfyui/SKILL.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

comfyui-converter

Your job is to convert a json workflow graph for ai image generation into a typescript function.

  • You should define a type for the input, using Zod for validation.
  • You should use .describe to describe each parameter to the best of your ability.
  • Filename prefix is always set by the system in a different location.
  • Do not extrapolate enum values. Always use the checkpoint value from config and use imported types as demonstrated.
  • Use snake_case for multi-word parameters.
  • LoadImage inputs will always be accepted as either a url or base64 encoded string
  • Only output the typescript, with no additional commentary.

Example Output

import { z } from "zod"; import config from "../config";

let checkpoint: any = config.models.checkpoints.enum.optional(); if (config.warmupCkpt) { checkpoint = checkpoint.default(config.warmupCkpt); }

const ComfyNodeSchema = z.object({ inputs: z.any(), class_type: z.string(), _meta: z.any().optional(), });

type ComfyNode = z.infer;

interface Workflow { RequestSchema: z.ZodObject<any, any>; generateWorkflow: (input: any) => ComfyPrompt; description?: string; summary?: string; }

const RequestSchema = z.object({ prompt: z.string().describe("The positive prompt for image generation"), width: z .number() .int() .min(256) .max(2048) .optional() .default(1024) .describe("Width of the generated image"), height: z .number() .int() .min(256) .max(2048) .optional() .default(1024) .describe("Height of the generated image"), seed: z .number() .int() .optional()`` .default(() => Math.floor(Math.random() * 1000000000000000)) .describe("Seed for random number generation"), steps: z .number() .int() .min(1) .max(100) .optional() .default(4) .describe("Number of sampling steps"), cfg_scale: z .number() .min(0) .max(20) .optional() .default(1) .describe("Classifier-free guidance scale"), sampler_name: config.samplers .optional() .default("euler") .describe("Name of the sampler to use"), scheduler: config.schedulers .optional() .default("simple") .describe("Type of scheduler to use"), denoise: z .number() .min(0) .max(1) .optional() .default(1) .describe("Denoising strength"), checkpoint, });

Read the full file on GitHub · 194 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 194 lines · 25 tokens per session scan A e00408298c45

Subscribe to this mod's changes

comfyui-converter is a skill published in the GitHub repository thangchung/agent-engineering-experiment (24 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 1,186 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

blog-post

Writes and structures long-form blog posts, creates tutorial outlines, and optimizes content for SEO with cover image generation. Use when the user asks to write a blog post, article, how-to guide, tutorial, technical writeup, thought leadership piece, or long-form content.

langchain-ai/deepagents · 58 tokens

remotion-bits

Animation components and utilities for Remotion video projects. Use when building Remotion compositions with text animations, gradient transitions, particle effects, 3D scenes, or staggered motion effects. Provides example bits (complete compositions) and reusable components that can be installed via jsrepo.

Marve10s/Better-Fullstack · 60 tokens

remotion-animation

Generates animation configurations for Remotion including spring configs, interpolations, easing functions, and timing logic. Focuses ONLY on animation parameters, NOT component implementation. Use when defining animation behavior or when asked to "configure animations", "setup spring configs", "define easing curves".

Marve10s/Better-Fullstack · 59 tokens

create-remotion-geist

Create Remotion videos using the Geist design system aesthetic. Use when asked to create videos, animations, or motion graphics that should follow Vercel's visual style - dark theme, spring animations, Geist typography, and the Geist color palette.

Marve10s/Better-Fullstack · 54 tokens

notebooklm

This skill should be used when the user wants to query their Google NotebookLM notebooks for citation-backed, source-grounded answers, or manage notebooks, sources, and Studio content (audio, report, video, infographic, presentation, data table, flashcards, quiz, mind map). It drives the @roomi-fields/notebooklm-mcp…

roomi-fields/notebooklm-mcp · 118 tokens