calculator

calculator is a skill for Claude Code, Codex from fuyuxiang/echo-agent. It costs 25 tokens per session (657 once invoked), scanned C, original, MIT.

A calculation tool for arithmetic, unit conversions, date and time calculations, timezone changes, and currency conversion.

In plain words
What is it for?
Use it to evaluate expressions, convert measurements, find time differences, add or subtract dates, change timezones, and convert amounts between currencies.
Why use it?
It avoids doing these calculations by hand or writing one-off scripts. Math works without an external service; currency rates are retrieved from a free online source.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to evaluate expressions, convert measurements, find time differences, add or subtract dates, change timezones, and convert amounts between currencies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fuyuxiang/echo-agent/calculator
About the project

Echo Agent is a self-hosted, long-running AI agent that connects language models, tools, memory, permissions, and messaging channels in one system. Individuals and teams use it for private automation that retains context across sessions, develops skills, schedules tasks, and requires approval for high-risk actions.

fuyuxiang/echo-agent · 1,034 stars · on GitHub · ojlab.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fuyuxiang/echo-agent --skill calculator
Clone the repo
git clone --depth 1 https://github.com/fuyuxiang/echo-agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for calculator

README.md
[![agentmods](https://agentmods.dev/badge/skills/fuyuxiang/echo-agent/calculator/github.svg)](https://agentmods.dev/skills/fuyuxiang/echo-agent/calculator)
Your own site
<a href="https://agentmods.dev/skills/fuyuxiang/echo-agent/calculator"><img src="https://agentmods.dev/badge/skills/fuyuxiang/echo-agent/calculator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for calculator

Your own site · 80×15
<a href="https://agentmods.dev/skills/fuyuxiang/echo-agent/calculator"><img src="https://agentmods.dev/badge/skills/fuyuxiang/echo-agent/calculator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 657 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Supply Chain · line 63
    Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
    Fix: Avoid downloading and executing remote scripts. Use trusted packages from PyPI/npm. If remote fetch is required, verify checksums and use HTTPS.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.00657
Opus 5.5 $0.00010 $0.00263
Sonnet 5.5 $0.00005 $0.00131
Haiku 4.5 $0.00003 $0.00066

Measured 7d ago against content hash 9424a1b99153, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

calculator scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/calc.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -s "https://open.er-api.com/v6/latest/USD" | python3 -c "

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s "https://open.er-api.com/v6/latest/USD" | python3 -c "
echo-agent-runtime/skills/utility/calculator/SKILL.md · 92 lines

What it actually says

Calculator

Math, units, dates, and currency conversion.

Math Expressions

Use the bundled calculator, which validates supported AST nodes before evaluating:

from subprocess import run
run(["python3", "scripts/calc.py", "eval", "2**10 + 3.14 * 2"], check=True)

Complex math:

import math
math.sqrt(144)      # 12.0
math.log2(1024)     # 10.0
math.factorial(10)  # 3628800
math.pi             # 3.14159...

Unit Conversions

Category Conversions
Temperature C↔F: F = C*9/5+32
Length km↔mi (×0.621371), m↔ft (×3.28084), cm↔in (×0.393701)
Weight kg↔lb (×2.20462), g↔oz (×0.035274)
Volume L↔gal (×0.264172)
Data KB↔MB↔GB↔TB (÷1024)

Date Calculations

from datetime import datetime, timedelta
from zoneinfo import ZoneInfo

# Days between dates
(datetime(2026, 12, 31) - datetime.now()).days

# Add/subtract time
datetime.now() + timedelta(days=30, hours=2)

# Timezone conversion
dt = datetime.now(ZoneInfo("Asia/Shanghai"))
dt.astimezone(ZoneInfo("America/New_York"))

Currency Exchange

Free API (no key required):

curl -s "https://open.er-api.com/v6/latest/USD" | python3 -c "
import sys,json; d=json.load(sys.stdin)['rates']
print(f\"1 USD = {d['CNY']:.4f} CNY\")
print(f\"1 USD = {d['EUR']:.4f} EUR\")
print(f\"1 USD = {d['JPY']:.2f} JPY\")
"

Common Formulas

# BMI
bmi = weight_kg / (height_m ** 2)

# Compound interest
A = P * (1 + r/n) ** (n*t)

# Percentage change
change = (new - old) / old * 100

Script

python3 scripts/calc.py eval "2**32 - 1"
python3 scripts/calc.py convert 100 km mi
python3 scripts/calc.py date "2026-12-31" days-until
python3 scripts/calc.py currency 100 USD CNY
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed 9424a1b99153
  2. 1mo ago First seen · 92 lines · 25 tokens per session scan C a5e5a044c657

Subscribe to this mod's changes

calculator is a skill published in the GitHub repository fuyuxiang/echo-agent (1,034 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 657 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

agent-state-bar

A design guide for an agent status bar: a short, automatically updated summary of progress, remaining tasks, tool counts, errors, and system state placed near the latest model input.

bojieli/ai-agent-book · 105 tokens

knowledge-org

A guide to organising large bodies of knowledge so an AI system can navigate relationships, summaries, and layers instead of searching only flat text chunks. It covers tree indexes, knowledge graphs, file-like structures, incremental updates, and long-term memory layouts.

bojieli/ai-agent-book · 96 tokens

memory-system

A guide to giving an AI agent persistent, user-specific memory across conversations. It covers what to remember, how to store it, how to update or compress it, and when to use memory instead of a shared knowledge base.

bojieli/ai-agent-book · 95 tokens

context-compression

A guide to shortening the information an agent carries between steps. It explains how to replace large tool outputs and old conversation details with compact, useful summaries while preserving important decisions and constraints.

bojieli/ai-agent-book · 92 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

openlore

Query and publish to an OpenLore knowledge repository over SSH using ordinary shell commands. Use when a task needs project documentation, runbooks, shared team knowledge, or a place to publish findings.

aakarim/OpenLore · 42 tokens