360 Secure SkillHub
360 安全技能中心

integer-calculator

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

分类:效率
bing0109
bing0109
热度 11.13
最近更新 2026-09-21 13:57:12

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add bing0109/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.