Skip to content
Back to skills

Sandbox Yaml

ASecurity

Read and write YAML inside a Code node or CodeAct action, with js-yaml running in the guest

  • 552 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 1, 2026
ai-agentsgonode

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 1, 2026

npx -y skills add nodetool-ai/nodetool --skill sandbox-yaml --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sandbox Yaml?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sandbox Yaml
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nodetool-ai-sandbox-yaml/badge)](https://www.skillsdirectory.com/skills/nodetool-ai-sandbox-yaml)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sandbox-yaml
description: Read and write YAML inside a Code node or CodeAct action, with js-yaml running in the guest
---

# YAML in the sandbox

Specifier: `@nodetool-ai/sandbox-yaml`. One module, the js-yaml root export.
Import it at the top of the body.

## load — YAML text to a value

```js
import yaml from "@nodetool-ai/sandbox-yaml";

const config = yaml.load(inputs.text);
return { name: config.name, replicas: config.replicas };
```

`load` reads one document and throws a `YAMLException` with a line and column
on malformed input. Multi-document files go through `loadAll`, which returns an
array.

## dump — a value to YAML text

```js
import yaml from "@nodetool-ai/sandbox-yaml";

return { text: yaml.dump({ name: inputs.name, tags: inputs.tags }, { indent: 2 }) };
```

`dump` throws on a cyclic structure unless you pass `{ noRefs: false }`, and on
a value it cannot represent (a function, a symbol).

## Gotchas

- **Everything runs in the guest.** The 64 MB guest heap holds your input text,
  the parse tree, and the returned value at once. A file of a few megabytes is
  fine; a hundred megabytes is not.
- **No timers, no I/O.** The guest has no `setTimeout`, no filesystem, and no
  Node builtins. js-yaml needs none of them — that is why it is admitted — but
  code you write around it must not reach for them either.
- **The safe schema is not the default.** `yaml.load` uses `DEFAULT_SCHEMA`,
  which resolves tags such as `!!timestamp`. For input from a stranger, pass
  `{ schema: yaml.FAILSAFE_SCHEMA }` and get strings, arrays, and objects only.
- **This pack is the only route to YAML.** There is no `data.parseYaml` global
  any more; every library the sandbox offers is an importable module, and this
  is the one for YAML. A node that needs it declares it.

Files in this skill

  • SKILL.md1.8 KB
  • package.json850 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.