本文へ移動
cccskills
無料GitHub で公開

math-calculator

Calculate simple mathematical expressions using shell commands. Use when the user asks to perform arithmetic calculations like addition, subtraction, multiplication, division, or more complex math expressions.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Math Calculator Skill

This skill provides the ability to calculate mathematical expressions using shell commands.

When to Use

Use this skill when:

  • Performing arithmetic calculations (add, subtract, multiply, divide)
  • Evaluating mathematical expressions with parentheses
  • Computing percentages or powers
  • Any numeric computation requested by the user

Methods

Using bc (Basic Calculator)

The bc command is a powerful calculator that supports:

  • Basic arithmetic: +, -, *, /
  • Power: ^
  • Parentheses for grouping
  • Scale for decimal precision

Example:

echo "2 + 3 * 4" | bc
# Output: 14

echo "scale=2; 10 / 3" | bc
# Output: 3.33

echo "(2 + 3) * 4" | bc
# Output: 20

Supported Operations

OperationSymbolExample
Addition+5 + 3 = 8
Subtraction-10 - 4 = 6
Multiplication*6 * 7 = 42
Division/15 / 3 = 5
Power^ (bc) or ** (Python)2 ^ 3 = 8
Modulo%17 % 5 = 2
Square Rootsqrt() (bc)sqrt(16) = 4

Notes

  • Use scale=N in bc to set decimal precision (default is 0, integer only)
  • For floating-point division, always set scale in bc

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when building, scaffolding, modifying, debugging, converting, or verifying Apache Flink Agents applications, including Flink Agents YAML, Workflow Agent, ReAct Agent, Actions, Resources, MCP servers, vector stores, runtime skills, Python, or Java. Do not use for ordinary Flink jobs that do not use Flink Agents.

日本語の概要は準備中です。原文の説明を表示しています。

apache/flink-agents4642026年10月10日 更新

Tell a joke about cat.

日本語の概要は準備中です。原文の説明を表示しています。

apache/flink-agents4642026年10月10日 更新

Calculate mathematical expressions using shell commands. Use when the user asks to perform arithmetic calculations like addition, subtraction, multiplication, division, or powers.

日本語の概要は準備中です。原文の説明を表示しています。

apache/flink-agents4642026年10月10日 更新

apache のスキルをすべて見る

このスキルの問題を報告する