360 Secure SkillHub
360 安全技能中心

integer-calculator

该 Skill 调用本地 Python 脚本,接收两个整数及 add/sub/mul/div 操作参数,输出数值结果;除法返回浮点数,除零时向 stderr 输出错误并以状态码 1 退出。

bing0109
bing0109
热度 7.64
最近更新 2026-09-21 13:57:12
分类:效率依赖:代码执行应用场景:数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add bingo-calculator
Metadata
name
integer-calculator
description
Calculate addition, subtraction, multiplication and division of two integers via a Python script.
version
1.1.0
metadata
{"openclaw":{"requires":{"bins":["python3"]},"emoji":"🧮"}}

Integer Calculator

This skill calculates the addition, subtraction, multiplication or division of two integers by calling a local Python script.

Usage

When the user asks to perform arithmetic on two integers, run the following command:

python3 scripts/calculator.py   

Parameters

Parameter Type Required Description
num1 int Yes First integer
num2 int Yes Second integer
operation string Yes add, sub, mul, div

Examples

Addition:

python3 scripts/calculator.py 3 5 add
# Output: 8

Subtraction:

python3 scripts/calculator.py 10 4 sub
# Output: 6

Multiplication:

python3 scripts/calculator.py 3 5 mul
# Output: 15

Division:

python3 scripts/calculator.py 10 4 div
# Output: 2.5

Notes

  • Supported operations: add, sub, mul, div.
  • Both inputs must be valid integers.
  • Division returns a float result; dividing by zero will return an error message to stderr and exit with code 1.
  • The script prints only the numeric result to stdout for easy parsing.