Skip to content
cccskills
FreePublished on 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.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md1.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

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.

The English summary is being prepared. Showing the original description.

apache/flink-agents470Updated Oct 17, 2026

Tell a joke about cat.

The English summary is being prepared. Showing the original description.

apache/flink-agents470Updated Oct 17, 2026

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

The English summary is being prepared. Showing the original description.

apache/flink-agents470Updated Oct 17, 2026

See all skills by apache

Report a problem with this skill