Skip to content
Back to skills

Sandbox Decimal

ASecurity

Exact decimal arithmetic inside a Code node or CodeAct action, with decimal.js running in the guest

  • 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-decimal --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sandbox Decimal?

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

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

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-decimal
description: Exact decimal arithmetic inside a Code node or CodeAct action, with decimal.js running in the guest
---

# Decimals in the sandbox

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

## Exact sums

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

const total = inputs.amounts
  .reduce((sum, n) => sum.plus(n), new Decimal(0));
return { total: total.toFixed(2) };
```

## Divide without float noise

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

const share = new Decimal(inputs.cents).div(inputs.parts);
return { share: share.toFixed(2) };
```

## Gotchas

- **Default export.** `import Decimal from "@nodetool-ai/sandbox-decimal"`.
- **Pass strings or Decimals.** `new Decimal(0.1)` already lost precision;
  use `new Decimal("0.1")`.
- **The guest has no Intl.** Format with `toFixed` / `toString`, not
  `toLocaleString`.

Files in this skill

  • SKILL.md939 B
  • package.json913 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.