calculator
2
总安装量
2
周安装量
#68633
全站排名
安装命令
npx skills add https://github.com/miketromba/skills --skill calculator
Agent 安装分布
amp
2
gemini-cli
2
github-copilot
2
codex
2
kimi-cli
2
cursor
2
Skill 文档
Calculator
Perform mathematical calculations with precision. Use this skill for ANY numerical calculations â never do mental math.
Usage
Run the bundled script with JSON operations:
bun .cursor/skills/calculator/scripts/cli.ts '<json_operations>'
Input Format
Pass a JSON array of operations, where each operation has:
operator: One ofadd,subtract,multiply,divideoperands: Array of numbers (minimum 2)
Examples
Single calculation:
bun .cursor/skills/calculator/scripts/calculator.ts '[{"operator":"add","operands":[1,2,3]}]'
Multiple calculations (batched):
bun .cursor/skills/calculator/scripts/calculator.ts '[{"operator":"add","operands":[10,20]},{"operator":"multiply","operands":[5,6,2]},{"operator":"divide","operands":[100,4]}]'
Output
Returns JSON with results for each operation:
{
"results": [
{ "operation": "add(10, 20)", "result": 30 },
{ "operation": "multiply(5, 6, 2)", "result": 60 },
{ "operation": "divide(100, 4)", "result": 25 }
]
}
When to Use
- Always for any numerical calculation, no matter how simple
- Percentage calculations
- Unit conversions
- Aggregating numbers
- Any math where precision matters
Operation Reference
| Operator | Description | Example |
|---|---|---|
add |
Sum all operands | add(1,2,3) â 6 |
subtract |
Subtract from first | subtract(10,3,2) â 5 |
multiply |
Product of all | multiply(2,3,4) â 24 |
divide |
Divide sequentially | divide(100,2,5) â 10 |