Skip to content
Back to skills

Sandbox Diff

ASecurity

Unified text diffs in a Code node or CodeAct action, with the diff library running on the host

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

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-diff --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sandbox Diff?

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

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

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-diff
description: Unified text diffs in a Code node or CodeAct action, with the diff library running on the host
---

# Text diffs in the sandbox

Specifier: `@nodetool-ai/sandbox-diff`. Import it at the top of the body.

The `diff` library schedules with `setTimeout`, and the guest has no timers, so
it cannot be compiled in. This pack is a **host module**: the import resolves to
a generated facade over NodeTool's own implementation.

## unified — a unified diff of two texts

```js
import { unified } from "@nodetool-ai/sandbox-diff";

const patch = await unified(inputs.before, inputs.after, {
  oldName: "before.md",
  newName: "after.md",
  context: 5
});
return { patch, changed: patch.includes("@@") };
```

Options: `context` (lines of context, 0–100, default 3), `oldName`, `newName`.
Identical inputs produce a header with no hunks, so `includes("@@")` is the
cheap "did anything change" test — handy in a verify loop.

## Gotchas

- **`unified` is async.**
- **5 MB per side.** Larger input is refused by name.
- **Line-oriented.** Two texts that differ only in trailing whitespace still
  diff; normalize first if that is noise.

Files in this skill

  • SKILL.md1.1 KB
  • package.json837 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.