A symbolic math engine for exact arithmetic, algebra, and calculus operations.

Install

mkdir -p .claude/skills/math-tools && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/183" && unzip -o skill.zip -d .claude/skills/math-tools && rm skill.zip

Installs to .claude/skills/math-tools

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Deterministic mathematical computation using SymPy. Use for ANY math operation requiring exact/verified results - basic arithmetic, algebra (simplify, expand, factor, solve equations), calculus (derivatives, integrals, limits, series), linear algebra (matrices, determinants, eigenvalues), trigonometry, number theory (primes, GCD/LCM, factorization), and statistics. Ensures mathematical accuracy by using symbolic computation rather than LLM estimation.
455 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Perform symbolic arithmetic and algebra
  • Calculate derivatives, integrals, and limits
  • Execute linear algebra operations like determinants and eigenvalues
  • Solve polynomial and transcendental equations
  • Compute number theory functions like GCD and prime factorization
  • Generate LaTeX representations of mathematical expressions

How it works

The tool utilizes the SymPy library to perform symbolic computation, ensuring exact mathematical results rather than relying on LLM estimation.

Inputs & outputs

You give it
Mathematical expression string or JSON-formatted matrix
You get back
JSON object containing result, LaTeX, and numeric fields

When to use math-tools

  • Solve a complex system of linear equations
  • Calculate the exact derivative of a polynomial function
  • Perform high-precision fraction arithmetic
  • Simplify complex algebraic expressions

About this skill

Math Tools

Deterministic mathematical computation engine using SymPy. All calculations use symbolic math - no LLM estimation.

When to Use

Use this skill whenever mathematical accuracy matters:

  • Arithmetic involving fractions, roots, or large numbers
  • Algebraic simplification, expansion, factoring
  • Solving equations (polynomial, transcendental, systems)
  • Calculus (derivatives, integrals, limits, series)
  • Linear algebra (matrices, eigenvalues, determinants)
  • Number theory (primes, factorization, GCD/LCM)
  • Statistical calculations

Quick Start

Run the calculator script with operation and arguments:

python scripts/math_calculator.py <operation> <args...>

All results return JSON with result, latex, and numeric fields.

Core Operations

Arithmetic

python scripts/math_calculator.py add 5 3 2          # 10
python scripts/math_calculator.py multiply 2 3 4    # 24
python scripts/math_calculator.py divide 10 4       # 5/2 (exact)
python scripts/math_calculator.py sqrt 8            # 2*sqrt(2)
python scripts/math_calculator.py factorial 10      # 3628800

Algebra

# Simplify
python scripts/math_calculator.py simplify "(x**2 - 1)/(x - 1)"
# → x + 1

# Expand
python scripts/math_calculator.py expand "(x + 1)**3"
# → x**3 + 3*x**2 + 3*x + 1

# Factor
python scripts/math_calculator.py factor "x**3 - 8"
# → (x - 2)*(x**2 + 2*x + 4)

# Solve equations
python scripts/math_calculator.py solve "x**2 - 5*x + 6" x
# → [2, 3]

python scripts/math_calculator.py solve "2*x + 3 = 7" x
# → [2]

Calculus

# Derivative
python scripts/math_calculator.py derivative "x**3 + sin(x)" x
# → 3*x**2 + cos(x)

# Second derivative
python scripts/math_calculator.py derivative "x**4" x 2
# → 12*x**2

# Indefinite integral
python scripts/math_calculator.py integrate "x**2" x
# → x**3/3

# Definite integral
python scripts/math_calculator.py integrate "x**2" x 0 1
# → 1/3

# Limit
python scripts/math_calculator.py limit "sin(x)/x" x 0
# → 1

# Limit at infinity
python scripts/math_calculator.py limit "(x**2 + 1)/(x**2 - 1)" x oo
# → 1

# Taylor series
python scripts/math_calculator.py series "exp(x)" x 0 5
# → 1 + x + x**2/2 + x**3/6 + x**4/24 + O(x**5)

Linear Algebra

# Determinant
python scripts/math_calculator.py det '[[1,2],[3,4]]'
# → -2

# Inverse
python scripts/math_calculator.py inverse '[[1,2],[3,4]]'

# Eigenvalues
python scripts/math_calculator.py eigenvalues '[[4,2],[1,3]]'
# → {5: 1, 2: 1}

# RREF
python scripts/math_calculator.py rref '[[1,2,3],[4,5,6]]'

Number Theory

python scripts/math_calculator.py gcd 24 36 48       # 12
python scripts/math_calculator.py lcm 4 6 8         # 24
python scripts/math_calculator.py prime_factors 360  # 2^3 × 3^2 × 5
python scripts/math_calculator.py is_prime 17       # true
python scripts/math_calculator.py nth_prime 100     # 541
python scripts/math_calculator.py binomial 10 3     # 120

Statistics

python scripts/math_calculator.py mean '[1,2,3,4,5]'      # 3
python scripts/math_calculator.py variance '[1,2,3,4,5]'  # 2
python scripts/math_calculator.py std_dev '[1,2,3,4,5]'   # sqrt(2)

Utilities

# Numerical evaluation with precision
python scripts/math_calculator.py evaluate "pi" 50

# LaTeX output
python scripts/math_calculator.py latex "x**2 + 1/x"
# → x^{2} + \frac{1}{x}

# Compare expressions
python scripts/math_calculator.py compare "(x+1)**2" "x**2 + 2*x + 1"
# → equal: true

Expression Syntax

  • Powers: x**2 or x^2
  • Multiplication: 2*x or 2x (implicit)
  • Functions: sin(x), cos(x), exp(x), log(x), sqrt(x)
  • Constants: pi, E, I (imaginary), oo (infinity)

Complex Operations (JSON Input)

For operations requiring structured input:

# Solve system of equations
python scripts/math_calculator.py solve_system \
  '{"equations": ["x + y = 10", "x - y = 2"], "variables": ["x", "y"]}'

# Substitute values
python scripts/math_calculator.py substitute \
  '{"expr_str": "x**2 + y", "substitutions": {"x": 3, "y": 2}}'

# Matrix multiplication
python scripts/math_calculator.py matrix_mult \
  '{"matrix_a": [[1,2],[3,4]], "matrix_b": [[5,6],[7,8]]}'

Full API Reference

See references/api_reference.md for complete documentation of all operations, including:

  • All operation names and aliases
  • Detailed parameter descriptions
  • Output format specifications
  • Additional examples

Dependencies

Requires SymPy:

pip install sympy

When not to use it

  • Tasks requiring non-mathematical text processing
  • Operations needing approximate floating-point results without symbolic verification

Prerequisites

PythonSymPy library

Limitations

  • Requires specific Python script execution
  • Limited to operations supported by the SymPy engine

How it compares

Unlike manual calculation or LLM-based estimation, this tool provides deterministic, verifiable symbolic results.

Compared to similar skills

math-tools side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
math-tools (this skill)268moReviewIntermediate
quant-analyst1032moNo flagsAdvanced
stock-analyzer712moReviewBeginner
google-analytics436moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by ananddtyagi

View all by ananddtyagi

chief-architect

ananddtyagi

PERSONAL APP ARCHITECT - Strategic development orchestrator for personal productivity applications. Analyzes project context, makes architectural decisions for single-developer projects, delegates to specialized skills, and ensures alignment between user experience goals and technical implementation. Optimized for personal apps targeting 10-100 users.

617

plugin-creator

ananddtyagi

Create, validate, and publish Claude Code plugins and marketplaces. Use this skill when building plugins with commands, agents, hooks, MCP servers, or skills.

538

safe-project-organizer

ananddtyagi

Safely analyze and reorganize project structure with multi-stage validation, dry-run previews, and explicit user confirmation. Use when projects need cleanup, standardization, or better organization.

411

data-safety-auditor

ananddtyagi

Comprehensive data safety auditor for Vue 3 + Pinia + IndexedDB + PouchDB applications. Detects data loss risks, sync issues, race conditions, and browser-specific vulnerabilities with actionable remediation guidance.

38

document-sync

ananddtyagi

A robust skill that analyzes your app's actual codebase, tech stack, configuration, and architecture to ensure ALL documentation is current and accurate. It never assumes—always verifies and compares the live system with every documentation file to detect code-doc drift and generate actionable updates.

217

api-contract-sync-manager

ananddtyagi

Validate OpenAPI, Swagger, and GraphQL schemas match backend implementation. Detect breaking changes, generate TypeScript clients, and ensure API documentation stays synchronized. Use when working with API spec files (.yaml, .json, .graphql), reviewing API changes, generating frontend types, or validating endpoint implementations.

18

You might also like

quant-analyst

zenobi-us

Expert quantitative analyst specializing in financial modeling, algorithmic trading, and risk analytics. Masters statistical methods, derivatives pricing, and high-frequency trading with focus on mathematical rigor, performance optimization, and profitable strategy development.

103355

stock-analyzer

FrancyJGLisboa

Provides comprehensive technical analysis for stocks and ETFs using RSI, MACD, Bollinger Bands, and other indicators. Activates when user requests stock analysis, technical indicators, trading signals, or market data for specific ticker symbols.

71214

google-analytics

davila7

Analyze Google Analytics data, review website performance metrics, identify traffic patterns, and suggest data-driven improvements. Use when the user asks about analytics, website metrics, traffic analysis, conversion rates, user behavior, or performance optimization.

43193

data-engineering

pluginagentmarketplace

ETL pipelines, Apache Spark, data warehousing, and big data processing. Use for building data pipelines, processing large datasets, or data infrastructure.

13192

crawl4ai

basher83

This skill should be used when users need to scrape websites, extract structured data, handle JavaScript-heavy pages, crawl multiple URLs, or build automated web data pipelines. Includes optimized extraction patterns with schema generation for efficient, LLM-free extraction.

21137

data-cleaning-pipeline

aj-geddes

Build robust processes for data cleaning, missing value imputation, outlier handling, and data transformation for data preprocessing, data quality, and data pipeline automation

13143

Search skills

Search the agent skills registry