Command Palette

Search for a command to run...

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

sandbox-flow

БесплатноЗапускает вложенные скриптыНе проверен

Call NodeTool nodes as typed async functions from sandbox code, one importable module per node namespace, with streaming and plain JavaScript control flow

nodetool-aiот nodetool-ai★ 674 звезды на GitHub

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

Calling nodes from the sandbox

Specifier: @nodetool-ai/sandbox-flow. Each node namespace is its own module — @nodetool-ai/sandbox-flow/nodetool.text, @nodetool-ai/sandbox-flow/lib.audio, and so on for all 69. Every node type is a generated async function whose name and inputs come from the node's own metadata, so a type this pack does not export has no import to resolve.

This is not the graph DSL. Nothing is built, saved, or scheduled: the call runs the node and resolves to its outputs. await is the edge, a variable is the wire, Promise.all is the fan-out, and if/for/try are themselves.

import { concat } from "@nodetool-ai/sandbox-flow/nodetool.text";

const r = await concat({ a: "hello ", b: "world" });
return r.output;

These examples are chat code actions, where return is the action's result. In a Code node or a JS script document, return is control flow only: hand a value on with await output(name, value) or stream it with emit. A script document that returns its outputs fails, and a Code node accepts that old contract only with a deprecation warning.

Two imports, both required

  1. import { … } from "@nodetool-ai/sandbox-flow/<namespace>"; — the nodes.
  2. import "@nodetool-ai/sandbox-nodetool/flow"; — the capability module.

The second one is not decoration. The host mounts a capability module by reading the body's static imports, and this pack's guest code calls into @nodetool-ai/sandbox-nodetool/flow. Without the body-side import the facade is never mounted and the pack's own import of it is refused by name.

import "@nodetool-ai/sandbox-nodetool/flow";
import { concat } from "@nodetool-ai/sandbox-flow/nodetool.text";

Streaming

A node that streams its output carries a .stream member; a one-shot node does not, so the surface tells you which is which. Awaiting the plain call on a streaming node still works — it drains the node and returns the last value per slot.

import "@nodetool-ai/sandbox-nodetool/flow";
import { agent } from "@nodetool-ai/sandbox-flow/nodetool.agents";

let text = "";
for await (const chunk of agent.stream({ prompt: "Summarize the file" })) {
  text += chunk.chunk ?? "";
  if (text.length > 2000) break; // closes the stream; the node stops
}
return text;

Breaking early releases the stream on the host. Read it to the end, or break — both are fine; abandoning the loop object without either is what leaks.

A node written against the streaming-input contract streams {slot, value} instead of partial outputs, one item per emission, and its inputs accept an array wherever a single value goes:

import { take } from "@nodetool-ai/sandbox-flow/nodetool.control";

const kept = [];
for await (const { slot, value } of take.stream({ input_item: [1, 2, 3], n: 2 })) {
  if (slot === "output") kept.push(value);
}

Arrays are the whole of streaming input in this version. An async iterable on an input handle is not accepted.

Errors

A node that fails rejects the call with its own error. There is no verdict machinery and no per-node error stream — your try/catch is the supervisor, and retry, fallback, and timeout are yours to write:

import "@nodetool-ai/sandbox-nodetool/flow";
import { textToSpeech } from "@nodetool-ai/sandbox-flow/gemini.audio";

try {
  return await textToSpeech({ text: draft });
} catch (error) {
  return { error: String(error) };
}

Fan-out

Concurrency is Promise.all, and it is real: the calls run at once.

const summaries = await Promise.all(
  documents.map((document) => summarizer({ text: document }))
);

Nothing throttles this. A hundred items is a hundred concurrent model calls — batch them yourself when that matters.

The untyped root

import { callNode } from "@nodetool-ai/sandbox-flow" takes a node type as a string and checks nothing until the host answers. Use it when the type is decided at run time; otherwise import the namespace, where a wrong name is an import error rather than a failed call.

Gotchas

  • Inputs are values, not handles. There is nothing to wire and no .output() — the call returns the outputs record.
  • No graph comes out of this. Nothing opens in the editor, validates, or replays. When the artifact matters, build a graph with @nodetool-ai/sandbox-dsl instead.
  • A missing property is the node's default, exactly as in a graph run.
  • Names follow the node class: nodetool.text.Concat is concat, nodetool.constant.Integer is integer. Reserved words take a trailing underscore (if_).
Полный SKILL.md на GitHub

Установить sandbox-flow в Claude Code и Claude Desktop

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

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

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

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

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

Без ограничений — скилл может использовать любой инструмент.

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

package.jsonsandbox/generated/anthropic.text.jssandbox/generated/claude_code.text.jssandbox/generated/codex.image.jssandbox/generated/codex.text.jssandbox/generated/gemini.audio.jssandbox/generated/gemini.image.jssandbox/generated/gemini.text.jssandbox/generated/gemini.video.jssandbox/generated/kie.dynamic_schema.jssandbox/generated/lib.audio.jssandbox/generated/lib.browser.jssandbox/generated/lib.charts.jssandbox/generated/lib.comfy.jssandbox/generated/lib.grid.jssandbox/generated/lib.image.channel.jssandbox/generated/lib.image.color.jssandbox/generated/lib.image.color_grading.jssandbox/generated/lib.image.draw.jssandbox/generated/lib.image.effects.jssandbox/generated/lib.image.enhance.jssandbox/generated/lib.image.filter.jssandbox/generated/lib.image.jssandbox/generated/lib.image.keyer.jssandbox/generated/lib.image.mask.jssandbox/generated/lib.image.warp.jssandbox/generated/lib.mail.jssandbox/generated/lib.mcp.jssandbox/generated/lib.sqlite.jssandbox/generated/lib.stable_diffusion_cpp.jssandbox/generated/lib.svg.jssandbox/generated/lib.video.download.jssandbox/generated/lib.wan2gp.jssandbox/generated/messaging.discord.jssandbox/generated/messaging.telegram.jssandbox/generated/mistral.embeddings.jssandbox/generated/mistral.text.jssandbox/generated/mistral.vision.jssandbox/generated/nodetool.agents.jssandbox/generated/nodetool.audio.js

FAQ

Что делает скилл sandbox-flow?

Call NodeTool nodes as typed async functions from sandbox code, one importable module per node namespace, with streaming and plain JavaScript control flow

Как установить скилл sandbox-flow?

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

Скилл sandbox-flow запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить sandbox-flow с