Agent skill
math
Compute a value from a Python math expression string.
Install this agent skill to your Project
npx add-skill https://github.com/chaddm/ad-astra-per-aspera/tree/main/skills/math
SKILL.md
What I do
Run the following command to evaluate a Python math expression:
~/.config/opencode/skills/math/compute.py "<expression>"
Replace <expression> with any valid Python math expression, such as:
- Simple arithmetic: "2+2", "10*5", "100/4"
- More complex: "2**8", "sqrt(16)", "sin(3.14159/2)"
- With parentheses: "(5+3)*2", "((10-2)/4)+1"
When to use me
Use me when you need to:
- Evaluate mathematical expressions programmatically
- Perform calculations with arithmetic operators (+, -, *, /, //, %, **)
- Use mathematical functions (sin, cos, tan, sqrt, log, etc.)
- Get precise numeric results from complex expressions
Examples
# Simple arithmetic
./compute.py "2+2"
# Output: 4
# Exponentiation
./compute.py "2**10"
# Output: 1024
# Complex expression
./compute.py "(25 + 15) * 2 / 4"
# Output: 20.0
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
launch-opencode
Launch an instance of OpenCode in a specified directory, run a prompt using the task-runner agent, and return the result. Uses bash to execute the command.
ip-whitelist
Manage IP whitelist for Provider Nexus API clients using TypeScript scripts that make curl calls to the admin API endpoints.
apple-xcode
list-project-import-files
Find all Provider Nexus API project import files for a specific project number in the nexus-import S3 bucket. Results sorted by build ID in TOON format.
weather
Return information about the weather for a given location.
toolbox-uuid
Create a UUID (Universally Unique Identifier).
Didn't find tool you were looking for?