
Skill
calculator
evaluate mathematical expressions and unit conversions
Description
Evaluate mathematical expressions and unit conversions. Handles arithmetic, percentages, exponents, and common unit conversions (temperature, distance, weight). No external dependencies.
SKILL.md
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
- Read this SKILL.md to understand capabilities.
- Run
scripts/calc.pywith the user's expression or conversion. - Return the computed result to the user.
Examples
Usage
# 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 |
More skills from the SkillEvaluator repository
View all 5 skillsapi-caller
execute dynamic REST API calls
Aug 31API DevelopmentAutomationREST APIcreate-custom-grader
create custom SkillEvaluator graders
Aug 31EvalsNVIDIATestingtask-list
manage multi-step task lists
Aug 31NVIDIAProductivityTask Managementtext-analyzer
analyze text content and statistics
Aug 31Data AnalysisNVIDIAStatistics
More from NVIDIA
View publishernemoclaw-user-guide
retrieve NemoClaw documentation and configuration
NemoClaw
Aug 25DocumentationMCPSearchmcore-build-and-dependency
manage Megatron-LM development environments
Megatron-LM
Jul 27ContainersDeploymentPythonmcore-bump-base-image
update NVIDIA PyTorch base images
Megatron-LM
Jul 14CI/CDDeploymentmcore-cicd
manage CI/CD pipelines for Megatron-LM
Megatron-LM
Aug 28CI/CDDeploymentGitHubmcore-create-issue
investigate CI failures and create issues
Megatron-LM
Jul 14DebuggingGitHubTriagemcore-linting-and-formatting
lint and format Megatron-LM code
Megatron-LM
Jul 14Best PracticesCode Analysis