calculator
Calculates math expressions with high precision to prevent floating-point errors.
Install
mkdir -p .claude/skills/calculator && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2901" && unzip -o skill.zip -d .claude/skills/calculator && rm skill.zipInstalls to .claude/skills/calculator
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.Key capabilities
- →Perform arbitrary-precision arithmetic
- →Evaluate complex math expressions
- →Handle operator precedence and parentheses
- →Calculate exponents with integer powers
How it works
The skill uses the big.js library to parse and evaluate arithmetic expressions, ensuring high-precision decimal math by avoiding standard floating-point limitations.
Inputs & outputs
When to use calculator
- →Calculating financial values requiring precision
- →Evaluating complex arithmetic expressions
- →Solving math problems without floating-point errors
About this skill
Calculator
Evaluate arithmetic expressions with arbitrary-precision decimal math using big.js.
When to Use
- User asks to calculate or evaluate a math expression
- Precise decimal arithmetic is needed (avoids floating-point errors like
0.1 + 0.2 = 0.30000000000000004) - Expressions involve parentheses, operator precedence, or exponents
Supported Operations
| Operator | Description | Precedence |
|---|---|---|
+ | Addition | 1 |
- | Subtraction | 1 |
* | Multiplication | 2 |
/ | Division | 2 |
^ | Exponent (right-associative) | 3 |
() | Parentheses | Highest |
Usage
cd scripts
npm ci || npm install
npm run build
npm run calculate "<expression>"
Examples
| Input | Output |
|---|---|
"3 + 2" | 5 |
"10 / 4" | 2.5 |
"2 ^ 10" | 1024 |
"(2 + 3) * 4" | 20 |
"1 + 4.5 * (3-6) / 5" | -1.7 |
"-5 + 3" | -2 |
"2 ^ 3 ^ 2" | 512 (right-associative: 2^9) |
Edge Cases
- Empty expression: Throws "Empty expression" error
- Mismatched parentheses: Throws "Mismatched parentheses" error
- Division by zero: big.js throws an error
- Exponent must be integer: big.js
.pow()requires integer exponents
Limitations
- No trigonometric functions (sin, cos, tan)
- No variables or symbolic math
- Exponents must be integers
- No factorial, modulo, or bitwise operators
When not to use it
- →Trigonometric or symbolic math
- →Operations requiring modulo or bitwise logic
Prerequisites
Limitations
- →No trigonometric functions
- →Exponents must be integers
How it compares
It guarantees precise decimal results for financial or complex calculations, unlike standard floating-point arithmetic which can introduce rounding errors.
Compared to similar skills
calculator side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| calculator (this skill) | 7 | 7mo | Review | Beginner |
| maintainx-data-handling | 1 | 27d | Review | Intermediate |
| apify-ultimate-scraper | 0 | 3mo | Review | Intermediate |
| bgmx | 0 | 1mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
maintainx-data-handling
jeremylongshore
Data synchronization, ETL patterns, and data management for MaintainX. Use when syncing data between MaintainX and other systems, building ETL pipelines, or managing data consistency. Trigger with phrases like "maintainx data sync", "maintainx etl", "maintainx export", "maintainx data migration", "maintainx data pipeline".
apify-ultimate-scraper
Anhvu1107
ALWAYS use this when the request matches Apify Ultimate Scraper: AI-driven data extraction from 55+ Actors across all major platforms.
bgmx
yjl9903
Maintain bgmx project data workflows only when the user explicitly invokes $bgmx or explicitly asks Codex to maintain bgmx data. Covers syncing Bangumi subject data, manually creating Bangumi subject revisions, syncing yuc.wiki seasonal calendars, and switching the active online calendar season.
word
Fergana-Labs
Create, read, edit, and manipulate Microsoft Word documents (.docx files). Use when users ask to work with Word files, create documents, read .docx files, or format text documents.
gmail-manager
jeffvincent
Manage Gmail - send, read, search emails, manage labels and drafts. Use when user wants to interact with their Gmail account for email operations.
clawhub
openclaw
Use the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawhub CLI.