Index of every page on this site: llms.txt
All skills
nvidia avatar

/calculator

@4327960
Run it yourself

Evaluate mathematical expressions and unit conversions. Handles arithmetic, percentages, exponents, and common unit conversions (temperature, distance, weight). No external dependencies.

Use this Skill: https://skilld.dev/gh/nvidia/skillevaluator/calculator

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈50 tokens for metadata: the name and description. ≈471 when used: this file. ≈352 more on demand in 1 file.

Description uses 2.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈199 characters, or 2.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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

# 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.
  • Arithmetic results are limited to 1000 decimal digits for whole-number math, and to the floating-point range (about 1.8e308) when a division or a decimal number is involved; larger, infinite, or non-real arithmetic results return an error. These limits apply to intermediate values as well as the final result, so an expression with a small final value can still be rejected: 10**1000 - 10**1000 returns Error: result is too large because each power has 1001 digits.

Troubleshooting

Problem Fix
Invalid expression Check for unsupported operators or variables
Unknown conversion Use supported units: celsius, fahrenheit, miles, km, kg, lbs, meters, feet

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    This calculator skill provides safe mathematical expression evaluation and unit conversions using a sandboxed Python script. It follows security best practices by using the Abstract Syntax Tree (AST) module for arithmetic instead of the dangerous eval() function, and it has no external dependencies or network requirements.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 4327960. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 6 hours ago.

Activeupdated 15 hours ago
compatibility
Python 3.10+, no external dependencies
metadata
{
  "author": "SkillEvaluator Maintainers <maintainers@example.com>"
}

README badge

README badge for nvidia/skillevaluator/calculator