home / skills / agentscope-ai / agentscope-java / calculation-skill
/agentscope-core/src/test/resources/test-skills/calculation-skill
This skill helps perform mathematical calculations including basic arithmetic, advanced functions, and statistical analysis to support computational tasks.
npx playbooks add skill agentscope-ai/agentscope-java --skill calculation-skillReview the files below or copy the command above to add this skill to your agents.
---
name: calculation-skill
description: A skill for mathematical calculations
---
# Calculation Skill
This skill provides mathematical calculation capabilities:
- Basic arithmetic operations
- Advanced mathematical functions
- Statistical analysis
Use this skill for computational tasks.
This skill provides reliable mathematical calculation capabilities for agents and applications. It supports basic arithmetic, advanced mathematical functions, and common statistical operations. Designed to integrate into Java-based agent workflows, it focuses on correctness and predictable numerical behavior.
The skill exposes functions for arithmetic (add, subtract, multiply, divide), higher-level math (exponentiation, roots, trigonometry, logarithms), and statistical summaries (mean, median, variance, standard deviation). Inputs are validated and numeric edge cases (division by zero, NaN, infinities) are handled explicitly. Results are returned in primitive numeric types or structured summaries to fit downstream agent logic.
What numeric types does the skill return?
Results are typically returned as standard numeric types; when high precision is required choose or configure BigDecimal-based operations.
How are errors handled?
The skill validates inputs and returns clear error indicators or exceptions for invalid operations such as division by zero or out-of-domain inputs.