Deterministic SymPy math tool that replaces guessed arithmetic with symbolic computation for Claude.
- version
- 1.0.0
- GitHub stars
- 689
What it does
- Adds a math skill backed by a
math_calculator.pyscript that runs symbolic computation instead of LLM estimates - Covers arithmetic, algebra, calculus, linear algebra, trigonometry, number theory, and statistics operations
- Returns exact symbolic results such as fractions, factored forms, and matrix eigenvalues rather than decimal approximations
- Designed for questions where your project needs verified answers to derivatives, integrals, solving equations, or matrix work
Deterministic math operations using SymPy - arithmetic, algebra, calculus, linear algebra, number theory, and statistics
Add marketplace
/plugin marketplace add ananddtyagi/cc-marketplaceRun it inside Claude Code once, then install the plugin below.
Install
/plugin install math@cc-marketplaceRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceMath 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**2orx^2 - Multiplication:
2*xor2x(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
Readme
Math Tools Plugin for Claude Code
Deterministic mathematical computation using SymPy. All calculations use symbolic math—no LLM estimation or hallucination.
What It Does
Ensures mathematical accuracy by running actual computations instead of letting Claude guess:
| Category | Operations |
|---|---|
| Arithmetic | add, subtract, multiply, divide, mod, power, sqrt, abs, factorial |
| Algebra | simplify, expand, factor, solve equations, solve systems, substitute |
| Calculus | derivatives, partial derivatives, integrals, limits, Taylor series, summations |
| Linear Algebra | matrices, determinants, inverse, eigenvalues/eigenvectors, RREF |
| Trigonometry | simplify, expand, degree/radian conversion |
| Number Theory | GCD, LCM, prime factorization, primality test, nth prime, binomial coefficients |
| Statistics | mean, variance, standard deviation |
Examples
# Solve x² - 5x + 6 = 0
python math_calculator.py solve "x**2 - 5*x + 6" x
# → [2, 3]
# Derivative of x³ + sin(x)
python math_calculator.py derivative "x**3 + sin(x)" x
# → 3*x**2 + cos(x)
# Definite integral from 0 to 1
python math_calculator.py integrate "x**2" x 0 1
# → 1/3
# Prime factorization
python math_calculator.py prime_factors 360
# → 2³ × 3² × 5
# Matrix determinant
python math_calculator.py det '[[1,2],[3,4]]'
# → -2
Installation
Requirements
- Python 3.8+
- SymPy library
pip install sympy
Plugin Setup
- Clone or download this repository
- Install in Claude Code:
First add this marketplace to Claude Code:
/plugin marketplace add ananddtyagi/cc-marketplace
/plugin install math@cc-marketplace
Manual Skill Install (without plugin)
Copy the math folder to:
- Personal:
~/.claude/skills/math/ - Project:
.claude/skills/math/
Folder Structure
math/
├── .claude-plugin/
│ └── plugin.json
├── skills/
│ ├── SKILL.md
│ ├── scripts/
│ │ └── math_calculator.py
│ └── references/
│ └── api_reference.md
└── README.md
Usage
Once installed, Claude automatically invokes the skill when you ask math questions. Just ask naturally:
- "What's the derivative of x³ + 2x?"
- "Solve x² - 4 = 0"
- "Factor x³ - 8"
- "What's the integral of sin(x) from 0 to π?"
- "Is 97 prime?"
Details
- Marketplace
- ananddtyagi/cc-marketplace
- Source
- plugins/math
- Author
- Anand Tyagi
- Category
- Community
- Listed since
- Apr 7, 2026
More from ananddtyagi/cc-marketplace
All 119- mobile-app-builderv1.0.0
- mobile-ux-optimizerv1.0.0
- model-context-protocol-mcp-expertv1.0.0
- monitoring-observability-specialistv1.0.0
- n8n-workflow-builderv1.0.0
- onomastophesv1.0.0
- openapi-expertv1.0.0
- optimizev1.0.0
- performance-benchmarkerv1.0.0
- planv1.0.0
- planning-prd-agentv1.0.0
- pr-issue-resolvev1.0.0
- pr-reviewv1.0.0
- prd-specialistv1.0.0
- pricing-packaging-specialistv1.0.0
- problem-solver-specialistv1.0.0
- product-sales-specialistv1.0.0
- project-curatorv1.0.0
- project-shipperv1.0.0
- python-expertv1.0.0
- rapid-prototyperv1.0.0
- react-native-devv1.0.0
- reddit-community-builderv1.0.0
- refractorv1.0.0
Similar to math
More Data Science & Analytics
sympySkillk-dense-ai/scientific-agent-skills2.2K installsExact symbolic mathematics in Python for algebra, calculus, solving, and code generation, versus floating-point libraries.
PycodemathMCP servercybersora98 starsExact math engine and code checker: prove a Python function matches its formula, or get a witness.
quantitative-tradingPluginwshobson/agents42.8K starsQuantitative analysis, algorithmic trading strategies, financial modeling, portfolio risk management, and backtesting
matlab-programmingPluginmatlab/matlab-agentic-toolkit1.3K starsWrite robust MATLAB functions with validated inputs.
functional-programmingPluginwshobson/agents42.8K starsFunctional programming with Elixir, OTP patterns, Phoenix framework, and distributed systems
reverse-engineering-with-code-eval-and-ida-domainPluginHexRaysSA/ida-claude-plugins123 stars(Unsafe) Skills, knowledge, and scripts for reverse engineering with IDA Pro. Autonomously writes and executes IDA Domain scripts to analyze binaries, extract f
