360 Secure SkillHub
360 安全技能中心

Calculator

该 Skill 在用户提出计算、数学表达式求值或加减乘除等算术请求时激活,按步骤解析表达式、执行运算并返回结果,支持链式运算与标准运算优先级,遇除零时提示用户。

cexfree
cexfree
热度 85.84
最近更新 2026-05-11 17:30:43
分类:效率依赖:纯提示词

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add calculator-2
Metadata
name
calculator
description
This skill should be used when the user asks to "calculate", "compute", "do math", mentions arithmetic operations like "add", "subtract", "multiply", "divide", or asks questions like "what is 1+1". Provides basic arithmetic calculation capabilities.
version
1.0.0

Calculator Skill

A simple calculator skill that performs basic arithmetic operations.

When This Skill Applies

This skill activates when the user's request involves:

  • Basic arithmetic calculations (addition, subtraction, multiplication, division)
  • Math expressions evaluation
  • Number computation requests

Instructions

When this skill is activated:

  1. Parse the mathematical expression from the user's request
  2. Perform the calculation step by step
  3. Return the result clearly

Supported Operations

Operation Symbol Example Result
Addition + 1 + 1 2
Subtraction - 10 - 3 7
Multiplication * 4 * 5 20
Division / 20 / 4 5

Example

User: What is 1 + 1?

Steps:

  1. Parse expression: 1 + 1
  2. Perform addition: 1 + 1 = 2
  3. Return result: 2

Rules

  • Always show the calculation process
  • For division, check for division by zero and warn the user
  • Support chained operations (e.g., 1 + 2 * 3)
  • Follow standard mathematical order of operations (PEMDAS)
  • Return results with appropriate precision (avoid unnecessary decimal places)