calculator
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.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o calculator.zip https://jpskill.com/download/17970.zip && unzip -o calculator.zip && rm calculator.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17970.zip -OutFile "$d\calculator.zip"; Expand-Archive "$d\calculator.zip" -DestinationPath $d -Force; ri "$d\calculator.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
calculator.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
calculatorフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 6
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
電卓
big.js を使用して、任意の精度で算術式を評価します。
どのような時に使うか
- ユーザーが数式を計算または評価するように求めた場合
- 正確な10進数の算術演算が必要な場合(
0.1 + 0.2 = 0.30000000000000004のような浮動小数点エラーを回避します) - 式に括弧、演算子の優先順位、または指数が含まれる場合
サポートされている演算
| 演算子 | 説明 | 優先順位 |
|---|---|---|
+ |
加算 | 1 |
- |
減算 | 1 |
* |
乗算 | 2 |
/ |
除算 | 2 |
^ |
指数 (右結合) | 3 |
() |
括弧 | 最高 |
使い方
cd scripts
npm ci || npm install
npm run build
npm run calculate "<expression>"
例
| 入力 | 出力 |
|---|---|
"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 (右結合: 2^9) |
エッジケース
- 空の式: "Empty expression" エラーをスローします
- 括弧の不一致: "Mismatched parentheses" エラーをスローします
- ゼロ除算: big.js がエラーをスローします
- 指数は整数でなければなりません: big.js の
.pow()は整数の指数を必要とします
制限事項
- 三角関数(sin、cos、tan)はありません
- 変数または記号演算はありません
- 指数は整数でなければなりません
- 階乗、剰余、またはビット単位の演算子はありません
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
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
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (1,878 bytes)
- 📎 scripts/jest.config.js (427 bytes)
- 📎 scripts/src/calculator.test.ts (5,956 bytes)
- 📎 scripts/src/calculator.ts (5,223 bytes)
- 📎 scripts/src/run.ts (354 bytes)
- 📎 scripts/tsconfig.json (208 bytes)