math-calculator
Calculate mathematical expressions using shell commands. Use when the user asks to perform arithmetic calculations like addition, subtraction, multiplication, division, or powers.
- 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
Generate/edit images with Nano Banana Pro (Gemini 3 Pro Image). Use for image create/modify requests incl. edits. Supports text-to-image + image-to-image; 1K/2K/4K; use --input-image.
github
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
nano-banana-pro
Generate/edit images with Nano Banana Pro (Gemini 3 Pro Image). Use for image create/modify requests incl. edits. Supports text-to-image + image-to-image; 1K/2K/4K; use --input-image.
github
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
math-calculator
Calculate simple mathematical expressions using shell commands. Use when the user asks to perform arithmetic calculations like addition, subtraction, multiplication, division, or more complex math expressions.
joke-generator
Tell a joke about cat.