数学表达式计算
math-calculator
使用 shell 命令计算数学表达式。当用户要求进行加法、减法、乘法、除法或乘方等算术计算时使用。
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-13
- Stars
- ★ 491
- Forks
- 184
01 前言 Front Matter
- name
- math-calculator
- license
- Apache-2.0
- description
- Calculate mathematical expressions using shell commands. Use when the user asks to perform arithmetic calculations like addition, subtraction, multiplication, division, or powers.
- compatibility
- Requires bash with bc (basic calculator)
02 资源文件 1
- 其他OWNERSHIP37 B
03 SKILL.md 正文
Math Calculator Skill
This skill calculates mathematical expressions using shell commands.
When to Use
Use this skill when the user asks to evaluate a numeric expression, such as:
- Basic arithmetic (add, subtract, multiply, divide)
- Expressions with parentheses
- Powers and square roots
Method
Pipe the expression into the bc (basic calculator) command:
echo "(2 + 3) * 4" | bc
# Output: 20
echo "2 ^ 10" | bc
# Output: 1024
For decimal results, set the scale first:
echo "scale=2; 10 / 3" | bc
# Output: 3.33
Instructions
- Translate the user's question into a single
bcexpression. - Run it with the
bashtool:echo "<expression>" | bc. - Report the number printed by
bcas the answer.
04 同仓库更多 Skills
Nano Banana Pro 图像生成与编辑
nano-banana-pro
使用 Nano Banana Pro(Gemini 3 Pro Image)生成/编辑图像。适用于图像创建或修改请求(含编辑)。支持文生图 + 图生图;1K/2K/4K;使用 --input-image 参数。
GitHub 仓库协作管理
github
使用 `gh` CLI 与 GitHub 交互。使用 `gh issue`、`gh pr`、`gh run` 和 `gh api` 处理议题(issue)、PR、CI 运行及高级查询。
Nano Banana Pro 图像生成与编辑
nano-banana-pro
使用 Nano Banana Pro(Gemini 3 Pro Image)生成或编辑图像。用于图像创建、修改(含编辑)请求。支持文生图与图生图;支持 1K/2K/4K 分辨率;使用 --input-image 指定输入图像。
GitHub 仓库协作管理
github
使用 `gh` CLI 与 GitHub 交互。使用 `gh issue`、`gh pr`、`gh run` 和 `gh api` 处理议题(issue)、PR、CI 运行及高级查询。
数学表达式计算
math-calculator
使用 shell 命令计算简单数学表达式。当用户要求执行加减乘除或更复杂的数学表达式等算术计算时使用。
猫咪笑话生成
joke-generator
讲一个关于猫的笑话。