Agent Skills
› nodetool-ai/nodetool
› sandbox-expr
sandbox-expr
GitHub提供在沙箱环境中安全计算数学公式的能力,避免使用 eval。支持传入公式字符串和变量对象,返回计算结果,适用于代码节点中的表达式求值场景。
Trigger Scenarios
需要在沙箱中计算数学公式
禁止使用 eval 的安全计算需求
Install
npx skills add nodetool-ai/nodetool --skill sandbox-expr -g -y
SKILL.md
Frontmatter
{
"name": "sandbox-expr",
"description": "Evaluate a math formula without eval in a Code node or CodeAct action, with expr-eval running on the host"
}
Formulas in the sandbox
Specifier: @nodetool-ai/sandbox-expr. Import it at the top of the body.
The published expr-eval bundle trips the guest scanner, so this pack is a host module.
evaluate — formula plus variables
import { evaluate } from "@nodetool-ai/sandbox-expr";
const value = await evaluate(inputs.formula, inputs.vars);
return { value };
inputs.formula is a string such as "2 * qty + fee". inputs.vars is
{ qty: 3, fee: 1.5 }.
Gotchas
- Not JavaScript.
^is power. Unknown names throw. - Do not use
eval. The guest deletes it. This pack is the formula path.
Version History
- a6a7e57 Current 2026-08-20 09:52


