calc-skill

Performs addition, subtraction, and multiplication by executing a Python calculation script.

21.4k|3.9k|Updated Apr 1, 2025
One-click install
npx skills add https://github.com/google/adk-python --skill calc-skill
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: calc-skill
Source: https://github.com/google/adk-python/tree/main/contributing/samples/environment_and_skills/e2b_env_skill_toolset/skills/calc-skill
Command: npx skills add https://github.com/google/adk-python --skill calc-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes scripts (resource) components.

What problem does it solve?

It gives an AI agent a deterministic way to perform basic arithmetic operations by running a Python script instead of relying on the model's own mental math.

Core Features & Use Cases

  • Script-Based Arithmetic: Executes calculate.py to perform addition, subtraction, or multiplication on two numeric operands.
  • Command-Line Interface: Accepts --op, --a, and --b arguments and prints the computed result to standard output.
  • Use Case: When an agent needs to compute 128.5 multiplied by 3.6 during a data-processing task, it runs the script with the mul operation and reads the exact printed result.

Quick Start

Ask the agent to calculate the result of an arithmetic operation, such as multiplying 12 by 8, and it will run the calculate.py script with the appropriate operation and operands.

Frequently Asked Questions about calc-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform arithmetic calculations with a Python script?โ–ผ

Run calculate.py with the --op flag set to add, sub, or mul, plus --a and --b numeric operands. For example, python3 calculate.py --op add --a 10 --b 5 prints the sum of the two numbers.

What math operations does the calculate script support?โ–ผ

The script supports three operations: addition (add), subtraction (sub), and multiplication (mul). Division and other operations are not implemented in the current version.

Does the calculation script require external Python packages?โ–ผ

No external packages are required. The script only uses argparse from the Python standard library, so it runs on any standard Python 3 installation without installing dependencies.

Why does the calculate script fail with an invalid choice error?โ–ผ

The error occurs when --op is set to a value other than add, sub, or mul, since argparse restricts choices to those three. Check the operation spelling and ensure both --a and --b are provided as numbers.

Can the script handle decimal or negative numbers?โ–ผ

Yes, both operands are parsed as floats, so decimal values like 3.14 and negative values like -7 are accepted. The result is printed with standard Python float formatting.