Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

comfy-math-strings

БесплатноБез исполняемых скриптовНе проверен

ComfyUI compute/string nodes: constants, sliders, math expressions, string concat/split/replace/regex, type conversion, JSON/list utilities. Use when…

laurigatesот laurigates★ 61 звезда на GitHub

Об этом скилле

ComfyUI math & strings

Compute and assemble. Numbers in, numbers out; strings in, strings out; primitives that hold a constant; sliders that expose a tunable.

The split:

Pack Niche
comfyui-kjnodes Primitives (BOOL / INT / Float / String / Multiline), SimpleCalculatorKJ, JoinStrings / JoinStringMulti, AppendStringsToList, Something/WidgetToString
comfyui_essentials Math hierarchy: SimpleMath / SimpleMathFloat / SimpleMathInt / SimpleMathDual (AST-based)
comfyui-custom-scripts (pysssss) MathExpression (full numpy + math imports), StringFunction (regex), StringNodes (split/case/trim)
comfyui-mxtoolkit mxSeed, mxSlider, mxSlider2D widget-driven values
bjornulf_custom_nodes AnythingToText / AnythingToInt / AnythingToFloat, TextReplace, CombineTexts, RandomLineFromInput
ComfyUI-Crystools CBoolean / CInteger / CFloat / CText / CTextML primitives, CJsonFile / CJsonExtractor / CListAny / CListString
comfyui-easy-use easy string / easy int / easy float identity nodes, easy rangeInt
comfyui-dream-project DreamCalculation, DreamLinear, sine/saw/triangle waves (animation-flavored, see "out of scope")
comfyui_yvann-nodes FloatToInt, InvertFloats, MaskToFloat, FloatsToWeightsStrategy

When to Use This Skill

Use this skill when... Use instead when...
Computing a value or assembling a string in a workflow Forming a boolean from that computation -> comfy-conditionals
Converting between types (anything -> int/float/string) Displaying the result -> comfy-debug-preview

Sources of truth

  • custom_nodes/comfyui-kjnodes/nodes/nodes.py — primitives, JoinStrings, Something/WidgetToString
  • custom_nodes/comfyui_essentials/misc.py — SimpleMath family
  • custom_nodes/comfyui-custom-scripts/py/math_expression.py — pysssss MathExpression
  • custom_nodes/comfyui-mxtoolkit/ — slider widgets
  • custom_nodes/ComfyUI-Crystools/crystools/nodes_*.py — primitives, list helpers, JSON extractor
  • custom_nodes/bjornulf_custom_nodes/ — Anything-To-* converters

Math — which node?

Need Best node Why
Single FLOAT expression, simple ops SimpleMathFloat (essentials) Tight; one expression in, FLOAT out
Single INT expression SimpleMathInt Same, INT result
Multi-variable expression (a, b, c, d) — (a+b)/c etc. SimpleMath AST-based eval over named inputs; safe (no module imports)
Two values, binary op (add/sub/mul/div/pow) SimpleMathDual Op picker widget
Many variables (a–j) SimpleCalculatorKJ (kjnodes) Up to 10 named inputs
Need numpy / math import — np.sqrt, math.pi, np.clip, etc. MathExpression (pysssss) Full module access, expression as string
Animation curve over a frame index — linear ramp, sine wave DreamLinear, DreamSineWave etc. Built-in time/frame parameter
Float ↔ INT yvann FloatToInt (round/ceil/floor), AnythingToInt (bjornulf) yvann has the rounding mode; bjornulf is the lenient any-input version
Invert FLOAT (1−x or −x) yvann InvertFloats Mode picker

Math hierarchy in one line

SimpleMathFloat < SimpleMath < SimpleCalculatorKJ < MathExpression

Pick the simplest one that compiles. MathExpression (pysssss) is the "escape hatch" — full numpy + math imports, but a typo crashes the node with an opaque traceback. Use it only when AST-safe SimpleMath can't express what you need.

SimpleMath syntax

Variables: a, b, c, d (wire them as inputs). Operators: + - * / // % **, parentheses, unary -. Functions: min, max, abs, round, int, float.

SimpleMath:
   expression: int(sqrt(a * 1000000 * b) / 8) * 8
   a = megapixels
   b = aspect_ratio
   → width snapped to multiple of 8

SimpleMath does NOT support sqrt natively — drop to MathExpression for that. Actual AST-safe set is limited; check the node source for the allowed call list.

MathExpression syntax

import numpy as np
import math

# Expression — single line:
int(math.sqrt(a * 1e6 * b) / 8) * 8

# Or use numpy:
int(np.sqrt(a * 1e6 * b) / 8) * 8

You write an expression string referencing input variable names that the node has registered. The node has math and numpy (as np) already imported. Errors surface as red node + traceback in the server log; nothing in the workflow UI.

Strings — concat, replace, regex, split

Need Best node
Concat a few strings with a delimiter JoinStrings (kjnodes, 5-arg)
Concat many JoinStringMulti (kjnodes, dynamic N inputs)
Concat 2 with no delimiter CombineTexts (bjornulf)
Find/replace literal TextReplace (bjornulf)
Find/replace regex StringFunction (pysssss; regex_mode toggle)
Pick random line from multiline RandomLineFromInput (bjornulf)
Split on delimiter StringNodes (pysssss, operation picker) or `
Полный SKILL.md на GitHub

Установить comfy-math-strings в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Grep
Glob

Вложенные файлы

references/gotchas.mdreferences/json-and-lists.mdreferences/primitives-and-sliders.mdreferences/recipes.md

FAQ

Что делает скилл comfy-math-strings?

ComfyUI compute/string nodes: constants, sliders, math expressions, string concat/split/replace/regex, type conversion, JSON/list utilities. Use when computing a value or assembling a string in a workflow.

Как установить скилл comfy-math-strings?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл comfy-math-strings запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить comfy-math-strings с