calculator
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 |
More from miketromba/skills
legal-tos-privacy
Create bulletproof Terms of Service and Privacy Policy documents for SaaS applications. Infers company information from codebase/marketing site, conducts comprehensive audits, drafts documents, then asks user ONLY for missing details at the end. Minimizes user interaction. Use when the user needs to draft, review, or update legal documents (ToS, Terms of Service, Privacy Policy, legal pages). Triggers on requests for legal documents, terms drafting, privacy policy creation, "cover our bases legally", liability protection, or legal compliance for software products.
58railway-cli
Manage Railway cloud deployments via the Railway CLI. Use when the user wants to deploy, manage services, set variables, view logs, link projects, add databases, configure domains, manage volumes, or perform any Railway platform operation from the terminal.
13bun
Bun JavaScript runtime, bundler, package manager, and test runner documentation and guidance. Use when working with Bun - an all-in-one toolkit for developing JavaScript/TypeScript applications. Triggers on questions about Bun runtime, bun install, bun test, bun build, Bun.serve, Bun.file, Bun.spawn, bunfig.toml, Bun APIs, SQLite, S3, Redis, WebSockets, HTTP server, bundler configuration, hot reloading, macros, plugins, or ANY Bun-related development tasks.
8drizzle
Drizzle ORM TypeScript documentation and guidance. Use when working with Drizzle - a lightweight, type-safe TypeScript ORM for PostgreSQL, MySQL, SQLite, SingleStore, and MSSQL. Triggers on questions about Drizzle schema, migrations, drizzle-kit, queries, relations, joins, transactions, RLS, column types, database connections, or ANY Drizzle-related development tasks.
4supabase
Supabase backend-as-a-service platform documentation and guidance. Use when working with Supabase - an open-source Firebase alternative providing Postgres database, authentication, real-time subscriptions, edge functions, storage, and vector embeddings. Triggers on questions about Supabase setup, database, auth, RLS, edge functions, storage, realtime, pgvector, migrations, CLI, self-hosting, or ANY Supabase-related development tasks.
3openclaw
OpenClaw AI agent platform documentation and guidance. Use when working with OpenClaw - an open-source platform for deploying AI agents across messaging channels (Slack, Discord, Telegram, WhatsApp, iMessage, etc.). Triggers on questions about OpenClaw setup, configuration, hosting, channels, gateways, tools, plugins, multi-agent routing, sandboxing, CLI commands, deployment (Fly.io, Railway, Render, Docker), or ANY OpenClaw-related development tasks.
2