calculator
FeaturedEvaluate mathematical expressions and unit conversions. Handles arithmetic, percentages, exponents, and common unit conversions (temperature, distance, weight). No external dependencies.
AI & Automation 426 stars
40 forks Updated today Apache-2.0
Install
Quality Score: 90/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Calculator
Evaluate math expressions and perform unit conversions from the command line.
## Purpose
Provide a safe, sandboxed calculator for arithmetic expressions and common
unit conversions without relying on `eval()` or external services.
## Agent Instructions
1. Read this SKILL.md to understand capabilities.
2. Run `scripts/calc.py` with the user's expression or conversion.
3. Return the computed result to the user.
## Examples
### Usage
```bash
# Arithmetic expressions
python scripts/calc.py "2 + 3 * 4"
python scripts/calc.py "(100 - 25) / 3"
python scripts/calc.py "2 ** 10"
# Percentage calculations
python scripts/calc.py "15% of 200"
# Unit conversions
python scripts/calc.py "100 celsius to fahrenheit"
python scripts/calc.py "5 miles to km"
python scripts/calc.py "10 kg to lbs"
```
### Output
A single line with the result, e.g.:
```
Result: 14
```
For conversions:
```
100 celsius = 212.0 fahrenheit
```
## Limitations
- No symbolic algebra (no variables, no equations).
- Only supports basic arithmetic operators: `+`, `-`, `*`, `/`, `**`, `%`, parentheses.
- Unit conversions are limited to: celsius/fahrenheit, miles/km, kg/lbs, meters/feet.
## Troubleshooting
| Problem | Fix |
|---------|-----|
| `Invalid expression` | Check for unsupported operators or variables |
| `Unknown conversion` | Use supported units: celsius, fahrenheit, miles, km, kg, lbs, meters, feet |
Details
- Author
- NVIDIA
- Repository
- NVIDIA/SkillEvaluator
- Created
- 2 months ago
- Last Updated
- today
- Language
- Python
- License
- Apache-2.0
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
simple-math
Perform basic arithmetic operations safely using standard operators without eval or exec
2 Updated today
shrav89 AI & Automation Listed
unit-converter
Convert values between units of length, weight, and temperature (miles/km, lb/kg, F/C). Use for any "convert X to Y" request.
0 Updated 1 months ago
syedahmad0786 AI & Automation Listed
computational-design-calculator
Python calculators for geometry analysis, structural checking, solar calculations, panel optimization, mesh analysis, material estimation, and fabrication cost estimation for AEC computational design
2 Updated yesterday
marcinfinitesimal533