Command Palette

Search for a command to run...

Назад к скиллам
скилл № 58757

node-control

Use this skill when writing or changing what a node runs. It says whether a node is controlled through code, through grammar or not at all, how Python code…

БесплатноБез исполняемых скриптов
urban-toolkitот urban-toolkit★ 37 звёзд на GitHub

Установить node-control в Claude Code и Claude Desktop

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

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

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

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

How nodes are controlled

Nodes are uncontrollable, controllable through code (python or JavaScript) or controllable through grammar:

{{builtin.control}}

An output connection of a node can be connected to the input connection of different nodes.

To pass data forward from a node controllable through python code it is necessary to return it, for example:

    variable1 = 123

    return variable1

To use incoming data in a node controllable through python code, read each input through its input chip: {{inputs.chip:0}} is the input on circle 0, {{inputs.chip:1}} the one on circle 1, and so on. Each input circle is its own variable, named after the circle, so the chip becomes input_0, input_1, ... when the node runs, and a node with two inputs can combine them like:

    combining_previous_inputs = {{inputs.chip:0}} + {{inputs.chip:1}}

    return combining_previous_inputs

Where a column name is written, a column chip such as {{inputs.chip:0.population}} becomes the quoted name of that column of input_0. A chip is code, never text: do not put an input chip inside a string or a comment. If the previous box outputs a tuple, its input is that tuple and can be indexed like any tuple.

An input that carries several layers, such as the tables an {{template.label:curio.builtin/autk-grammar}} node hands on, is read one layer at a time through a layer chip: {{inputs.chip:0:table_osm_roads}} becomes curio_layer(input_0, "table_osm_roads", 0), that layer of input_0, a GeoDataFrame in python and a GeoJSON FeatureCollection in JavaScript, or, for a raster layer such as a heatmap, a rasterio dataset in python, and {{inputs.chip:0:table_osm_roads.lanes}} becomes the quoted name of a column of it. A dict of frames a node returns carries a layer per frame or raster, named after its key. An input that is one frame or raster with no layer name is that layer.

But if the previous node outputs a single data like, but not limited to, a dataframe or number or text, its input will contain that value, not an indexable list.

    return {{inputs.chip:0}}

A node controllable through grammar passes its input on, except an {{template.label:curio.builtin/autk-grammar}} node that loads data or runs passes: it passes on the layers it loaded or computed, after its input's when its views or passes read them, and nothing when they are empty.

A {{template.label:curio.builtin/vis-vega}} node draws the DataFrame or GeoDataFrame the node before it returns, like:

    import pandas as pd

    d = {'a': ["A", "B", "C", "D", "E", "F", "G", "H", "I"], 'b': [28, 55, 43, 91, 81, 53, 19, 87, 52]}
    df = pd.DataFrame(data=d)

    return df

A Vega-Lite spec with no data field draws the node's first input, input_0, which Curio fills in, so a spec that draws only it writes none. The spec or a layer draws another input by naming its dataset, "data": {"name": "{{inputs.chip:1}}"}, or every input's rows stacked, "data": {"name": "{{inputs.stacked}}"}; the vega-lite-starter skill says more. For example we can connect the previous dataframe into this Vega-Lite grammar:

{
  "$schema": "{{vega.schema_url}}",
  "mark": "bar",
  "encoding": {
    "x": {"field": "a", "type": "nominal", "axis": {"labelAngle": 0}},
    "y": {"field": "b", "type": "quantitative"}
  }
}
Полный SKILL.md на GitHub

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

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

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

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

  • evals/evals.json
  • evals/files/osm-layers.json
  • evals/files/two-tables.json
  • evals/truth.json

FAQ

Что делает скилл node-control?

Use this skill when writing or changing what a node runs. It says whether a node is controlled through code, through grammar or not at all, how Python code returns data to pass it on, how code reads each input through an input chip, a column chip or a layer chip, how a tuple hands on several values, what a grammar node hands on, and how a Vega-Lite spec reads its inputs: the first with no data field, another by naming its dataset.

Как установить скилл node-control?

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

Скилл node-control запускает скрипты?

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

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

Сравнить node-control с