一键导入
comfyui-converter
Your job is to convert a json workflow graph for ai image generation into a typescript function.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Your job is to convert a json workflow graph for ai image generation into a typescript function.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Best practices, tips, and gotchas for Entra ID, Entra Agent ID, A2A protocol, MCP protocol, and agentgateway-based OBO token exchange — distilled from loop-runtime's entra_agent_id*.md docs. Use when setting up, wiring, or debugging Entra app registrations, Entra Agent ID blueprints, OBO chains, A2A/MCP auth, app-code Agent Identity OBO, Microsoft.Identity.Web.AgentIdentities, fmi_path, or agentgateway jwtAuth/oauthTokenExchange config. ALWAYS remind the user in chat (don't silently assume) when a real value is needed for: tenantId, webAppId, execAppId, execAppSecret, checkAppId, checkAppSecret, mcpAppId, executorAgentIdentityAppId, checkerAgentIdentityAppId.
End-to-end counter: identify customer, classify intent, build order, confirm, submit. ToolSearch.Gateway-first. No direct MCP or CLI calls.
Resolve customer identity and account basics by email, phone, name, or customer ID through ToolSearch.Gateway.
Help users explore menu items, categories, and prices through ToolSearch.Gateway.
Use when working with an Aspire distributed application: operate an AppHost or resources through the Aspire CLI; start, stop, restart, or wait for resources; inspect app state, logs, traces, docs, or health; add integrations; manage secrets/config; publish/deploy or run pipeline steps; initialize an existing app; recover TypeScript `.modules`; find frontend URLs for Playwright; expose custom dashboard/resource commands; or understand Aspire AppHost APIs in C# or TypeScript. Use even if the user says AppHost, resources, dashboard, bootstrap, Playwright URL, or local distributed app workflow without naming Aspire. Do not use for non-Aspire .NET apps, container-only repos without an AppHost, or ordinary build/test tasks.
Ultra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman.
| name | comfyui-converter |
| description | Your job is to convert a json workflow graph for ai image generation into a typescript function. |
| license | MIT |
| metadata | {"author":"ai-labs","version":"1.0"} |
Your job is to convert a json workflow graph for ai image generation into a typescript function.
.describe to describe each parameter to the best of your ability.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, });
type InputType = z.infer;
function generateWorkflow(input: InputType): ComfyPrompt { return { "6": { inputs: { text: input.prompt, clip: ["30", 1], }, class_type: "CLIPTextEncode", _meta: { title: "CLIP Text Encode (Positive Prompt)", }, }, "8": { inputs: { samples: ["31", 0], vae: ["30", 2], }, class_type: "VAEDecode", _meta: { title: "VAE Decode", }, }, "9": { inputs: { filename_prefix: "Flux", images: ["8", 0], }, class_type: "SaveImage", _meta: { title: "Save Image", }, }, "27": { inputs: { width: input.width, height: input.height, batch_size: 1, }, class_type: "EmptySD3LatentImage", _meta: { title: "EmptySD3LatentImage", }, }, "30": { inputs: { ckpt_name: input.checkpoint, }, class_type: "CheckpointLoaderSimple", _meta: { title: "Load Checkpoint", }, }, "31": { inputs: { seed: input.seed, steps: input.steps, cfg: input.cfg_scale, sampler_name: input.sampler_name, scheduler: input.scheduler, denoise: input.denoise, model: ["30", 0], positive: ["6", 0], negative: ["33", 0], latent_image: ["27", 0], }, class_type: "KSampler", _meta: { title: "KSampler", }, }, "33": { inputs: { text: "", clip: ["30", 1], }, class_type: "CLIPTextEncode", _meta: { title: "CLIP Text Encode (Negative Prompt)", }, }, }; }
const workflow: Workflow = { RequestSchema, generateWorkflow, summary: "Text to Image", description: "Generate an image from a text prompt", };
export default workflow;