Claude-skill-registry-data math-calculator
This skill should be used when Claude Code needs to perform basic arithmetic calculations. It provides a Python script that safely evaluates mathematical expressions including addition, subtraction, multiplication, division, exponentiation, and square roots.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry-data
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry-data "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/math-calculator" ~/.claude/skills/majiayu000-claude-skill-registry-data-math-calculator && rm -rf "$T"
manifest:
data/math-calculator/SKILL.mdsource content
Math Calculator Skill
Overview
The Math Calculator skill enables Claude Code to quickly and accurately perform basic arithmetic calculations. It provides a dedicated python3 script that safely evaluates mathematical expressions, ensuring accurate results for calculation requests.
When to Use This Skill
Use this skill when:
- Claude Code receives a math question (e.g., "What is 5 * 5?")
- A user asks to calculate an arithmetic expression (e.g., "Calculate 100 / 4 + 2")
- Quick, reliable calculations are needed to support a larger task
- Exact numerical results are important for subsequent operations
Quick Start
Execute the calculation script with the mathematical expression:
python3 scripts/calculate.py "5 * 5" python3 scripts/calculate.py "100 / 4 + 2" python3 scripts/calculate.py "sqrt(25) + 10"
Supported Operations
The calculator supports basic arithmetic and common functions:
- Addition:
= 85 + 3 - Subtraction:
= 610 - 4 - Multiplication:
= 426 * 7 - Division:
= 520 / 4 - Exponentiation:
= 2562 ** 8 - Square Root:
= 5sqrt(25) - Mathematical Constants:
≈ 3.14159,pi
≈ 2.71828e - Parentheses for order of operations:
= 16(5 + 3) * 2
Example Workflow
When a user asks "What is 123 * 456?":
- Claude Code receives the request
- Execute:
python3 scripts/calculate.py "123 * 456" - Script returns:
56088 - Claude Code reports the result to the user , IT MUST REPLY WITH THIS FORMAT : MASTER THE RESULT IS {results}
Error Handling
The script handles errors gracefully:
- Division by zero: Returns "Error: Division by zero"
- Invalid syntax: Returns "Error: Invalid syntax in expression: ..."
- Invalid characters: Returns "Error: Invalid characters in expression: ..."