nasal-property-tree
БесплатноБез исполняемых скриптовНе проверенExplains the components of the property tree, introduces the Nasal `props` library for property-tree access, and covers saving and loading PropertyList XML…
от container32678 установок в других каталогахОб этом скилле
Components of the Property Tree
- Nodes: A node can hold a typed value as well as child nodes, and both can coexist at the same time.
- Indices: Sibling nodes sharing an identical identifier are organized as an indexed array using zero-based numerical offsets. Omitting brackets defaults to index
0(e.g.,/sim/view=/sim/view[0]). Deleting an indexed node does not re-index or shift subsequent elements, leaving the vacated slot available for reuse. - Aliases: Allows a node to dynamically mirror another target node path, routing all read and write operations directly to the destination.
- Node attributes: Flags defining internal engine behaviors, including read/write permissions, runtime state preservation, logging triggers, and persistent serialization.
Besides the lossless XML format, properties can also be represented as a Nasal hash. If a node contains both a value and child nodes, only the child nodes are preserved when converted to a Nasal hash.
Property Tree Manipulation (props)
Nasal interacts with the FlightGear hierarchical Property Tree through the props module. The core wrapper class is props.Node, which wraps internal C++ property ghosts (prop) and exposes a complete API for tree navigation, type-safe modifications, structural node duplication, and evaluation.
Node Instantiation & Navigation
Constructors & Accessors
props.Node.new([structure_hash]): Instantiates a standalone property node. If an optional Nasal hash is passed, its nested keys, values, and arrays will automatically initialize equivalent node paths inside the new instance.props.getNode(path[, create]): Global alias returning a path node from the root system property tree. Ifcreateis true, create the node when it does not exist.props.globals: Global property tree root wrapper of typeprops.Node..getNode(rel_path[, create]): Evaluates a relative path string. Returnsnilif not found andcreateis0..getChild(name[, index[, create]]): Finds or instantiates a direct child element using a specific name and numerical array offset index..getChildren([name]): Returns a Nasal vector ofprops.Nodechild instances. Ifnameis specified, it filters results to nodes matching that identifier..getParent(): Returns the parentprops.Nodewrapper ornilif executed at root..getPath(): Returns the absolute string path representing the location within the Property Tree..getName(): Returns the name string of the specific node..getIndex(): Returns the node's numerical index integer.
# Create an isolated mock tree
var local_root = props.Node.new({
"instruments": {
"altimeter": [
{ "indicated-ft": 5500 },
{ "indicated-ft": 12000 }
]
}
});
# Navigate nested levels
var alt2 = local_root.getNode("instruments/altimeter[1]");
print("Target node path: " ~ alt2.getPath()); # /instruments/altimeter[1]
print("Altitude: " ~ alt2.getValue()); # 12000
Node Lifetime & Structural Mutation
.addChild(name[, min_idx[, append]]): Explicitly creates a single empty node child.min_idx(default0): Forces the index space to start at or above this value.append(default1): Adds the child immediately above the highest existing index for that name. If0, fills the lowest available index starting atmin_idx..addChildren(name, count[, min_idx[, append]]): Creates multiple sequential child elements with a single call..remove(): Safely destroys the calling node, detaching it from the tree hierarchy..removeChild(name, index): Destroys a targeted child node by its specific index..removeChildren([name]): Removes all child nodes matching a specific identifier name. If no argument is provided, it empties all child nodes..removeAllChildren(): Empties the node completely.
Type-Safe Values & Data Mutations
Nodes have strict internal types (e.g., BOOL, INT, DOUBLE, STRING, VEC3D, VEC4D).
Getting and Checking Types
.getValue([rel_path]): Reads the node value. Optionally takes a relative path to target a child node..getBoolValue(): Returns the value interpreted as a Nasal boolean (1or0). Strings like"false"resolve to0..getType(): Returns the string type representation:"NONE","BOOL","INT","LONG","FLOAT","DOUBLE","STRING","VEC3D","VEC4D","ALIAS", or"UNSPECIFIED"..isInt(): Returns1if the node holds an integer or long integer,0otherwise..isNumeric(): Returns1if the node is numeric (INT,LONG,FLOAT,DOUBLE),0otherwise.
Writing Values
.setValue([rel_path, ]value): Resolves and commits a value to the node. Handles conversions automatically based on the input type. Passing a 3-element or 4-element vector of numbers converts the node type toVEC3DorVEC4Drespectively..setBoolValue([rel_path, ]bool): Forces the node t
Установить nasal-property-tree в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл nasal-property-tree?
Explains the components of the property tree, introduces the Nasal `props` library for property-tree access, and covers saving and loading PropertyList XML files.
Как установить скилл nasal-property-tree?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nasal-property-tree запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic