Guide · Agent skill
How to use the SymPy Symbolic Math agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The SymPy skill gives an AI agent the ability to do exact symbolic mathematics with the SymPy Python library, so answers stay as expressions like sqrt(2) instead of rounded decimals. This guide is for anyone who has not used agent skills before. By the end you will know how to install the skill, how to phrase requests that trigger it, and what it needs and where to be careful.
Quick start
- 1Download and unzip. Download the sympy skill ZIP from this page and unzip it to produce a sympy folder.
- 2Place the folder. Move it to ~/.claude/skills/ for personal use or to .claude/skills/ in a project.
- 3Or upload in the apps. In the Claude apps, open Settings → Capabilities → Skills and upload the ZIP.
- 4Install SymPy 1.14.0. Run uv pip install "sympy==1.14.0" and add NumPy, SciPy and Matplotlib if you need the optional examples.
- 5Check your environment. Confirm Python 3.9+ and print sympy.__version__ to verify the version.
- 6Ask in plain language. Describe the exact result, derivation or code conversion you need, and state any domain such as real numbers.
What the SymPy skill makes the agent do
Once installed, the agent works with exact mathematical expressions. It can solve algebraic and differential equations, take derivatives, integrals and limits, manipulate matrices, run physics and mechanics calculations, and turn formulas into Python, C, Fortran or LaTeX output.
The skill also points the agent to careful practice: declaring assumptions such as positive or real, and stating the solution domain, so results are mathematically sound.
- Solve equations symbolically, including systems and ODEs
- Calculus: derivatives, integrals, limits, series
- Symbolic linear algebra and matrices
- Physics and mechanics calculations
- Code generation with lambdify, codegen and LaTeX output
Install the SymPy skill from the ZIP
Download the ZIP for skills/sympy from this page and unzip it. Place the resulting sympy folder in one of these locations: ~/.claude/skills/ for personal use across projects, or .claude/skills/ inside a specific project folder.
Alternatively, in the Claude apps go to Settings → Capabilities → Skills and upload the ZIP there.
The skill's own instructions cover installing SymPy itself. Use uv to install the pinned version.
- Personal: ~/.claude/skills/sympy/
- Project only: .claude/skills/sympy/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
uv pip install "sympy==1.14.0"
# Optional: for lambdify and plotting examples
uv pip install numpy scipy matplotlibCheck what you need before you start
The skill requires Python 3.9 or newer and SymPy 1.14.0, which needs mpmath>=1.1,<1.4. The tested NumPy and SciPy stack needs Python 3.12 or newer. NumPy, SciPy, Matplotlib, IPython/ipywidgets and the ANTLR 4.11 runtime are optional and only needed for certain examples.
Compiled wrappers need a C or Fortran compiler plus backend packages. Emitting source code needs no compiler.
- Python 3.9+ (3.12+ for the tested NumPy/SciPy stack)
- SymPy 1.14.0 with mpmath>=1.1,<1.4
- Optional: NumPy, SciPy, Matplotlib, IPython/ipywidgets, ANTLR 4.11 runtime
- C/Fortran compiler only for compiled wrappers
import sympy
print(sympy.__version__)Trigger the skill with natural requests
You do not need special syntax. Ask for an exact result, a symbolic derivation or a formula conversion in plain language. The skill is meant for tasks that need symbolic results, explicit assumptions or exact arithmetic.
If your work is purely numerical on large datasets, the skill itself recommends NumPy or SciPy instead.
- "Solve x^2 - 5x + 6 = 0 exactly and check each root."
- "Differentiate sin(x)*exp(x) and simplify the result."
- "Find the real solutions of this equation, using real numbers only."
- "Convert this formula to a lambdify function I can use with NumPy arrays."
- "Give me the LaTeX for this integral."
Examples of what the agent does
A typical solve-and-verify task finds the roots of a polynomial and substitutes each back into the equation to confirm it equals zero. For a pipeline task, the agent builds a symbolic expression, differentiates it, then converts the result to a NumPy function so it can be evaluated on an array.
When you ask for a real-only answer, the agent should state the domain, because solveset defaults to complex numbers. A ConditionSet means the solution is unresolved, not that there are no solutions.
from sympy import symbols, solve, simplify
x = symbols('x')
equation = x**2 - 5*x + 6
solutions = solve(equation, x) # [2, 3]
for sol in solutions:
assert simplify(equation.subs(x, sol)) == 0Safety notes: scripts and input trust
This skill runs scripts (Bash is an allowed tool) and does not use the network during normal operation. Network access is needed only for installation or reading documentation.
Do not feed untrusted user input to parse_expr, string sympify or lambdify. These can execute code. A regex, local_dict or evaluate=False is not a security boundary; untrusted input needs a separate allowlisted grammar and resource limits.
- Runs scripts: yes
- Uses network: no (except installation and docs)
- Use only trusted expressions with parse_expr, sympify and lambdify
Tips for better results
Define symbols first, and only add assumptions the problem actually justifies. An unconstrained symbol is treated as complex, so sqrt(x**2) need not equal x. Use Rational or S(1)/2 instead of 0.5 when you want exact values.
Use evalf when you need decimals, and remember that high precision cannot recover precision lost in the inputs. A numerical nsolve result is only a local root.
- Use Rational(1, 2) or S(1)/2 for exact fractions
- Choose solveset, linsolve, nonlinsolve or dsolve based on the problem
- Verify candidate solutions in the original expression and requested domain
- Use Eq to build an equation; == compares structure
What people use it for
- Students checking algebra, calculus or physics homework with exact answers
- Engineers converting symbolic formulas into lambdify or code-generation output
- Researchers who want symbolic derivations rather than numerical approximations
- Verifying that a candidate root satisfies an equation exactly
Frequently asked questions
How do I install the SymPy agent skill?
Download the ZIP for skills/sympy from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
What does the SymPy skill require?
It requires Python 3.9 or newer and SymPy 1.14.0 with mpmath>=1.1,<1.4. NumPy, SciPy, Matplotlib and other packages are optional, and compiled wrappers need a C or Fortran compiler.
Is the SymPy skill free to use?
The skill is listed under the MIT licence on this page. SymPy itself is licensed under the terms linked from the skill's licence field, which points to the SymPy LICENSE file on GitHub.
When should I use NumPy or SciPy instead?
Use NumPy or SciPy for purely numerical workloads, especially on large datasets. The skill is designed for tasks that need symbolic results, explicit assumptions or exact arithmetic.
Does the skill use the internet?
According to the skill's metadata, it does not use the network. Network access is only needed to install packages or read documentation.
Is it safe to let the agent evaluate user-supplied expressions?
Not without care. parse_expr, sympify and lambdify can execute code, and a regex or local_dict is not a security boundary. Accept only trusted expressions, or build a separate allowlisted grammar with resource limits.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Choose this skill if you need exact symbolic results, such as homework checks, derivations, or converting formulas to code, and you are comfortable installing Python packages. Pick NumPy or SciPy, or a different tool, for large numerical workloads or for evaluating untrusted user input.
Download the skill