Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

SymPy - Symbolic Mathematics in Python

Guides Claude to use SymPy for exact symbolic algebra, calculus, equation solving, and code generation.

Dev & CodingIntermediate33,0303,248AI score 8/10Last updated: Aug 9, 2026

What it does

This skill teaches Claude how to use SymPy, Python's symbolic math library, so results stay exact (sqrt(2)) instead of floating-point approximations (1.414...). It covers:

  • Declaring symbols and applying assumptions (positive=True, integer=True) for cleaner simplification
  • Calculus: derivatives, integrals, limits, series expansions
  • Picking the right solver: solveset, linsolve, nonlinsolve, dsolve, and legacy solve
  • Symbolic linear algebra (matrices, eigenvalues) plus physics, number theory, geometry via modular reference files
  • Output paths: lambdify to NumPy, latex()/pprint() for documentation, C/Fortran codegen

A troubleshooting section covers undefined symbols, accidental float contamination, slow subs() loops, and stubborn simplifications.

Who it's for

  • Researchers and grad students who want derivations plus a verification step
  • Engineers who need closed-form answers, not just numerical estimates
  • Developers turning derived formulas into fast Python/C functions
  • Teachers and students who want clean LaTeX write-ups of solutions

Example uses

  1. Solve and verify: "Solve x²−5x+6=0 and substitute each root back in" → returns [2, 3] with a simplify(expr.subs(...)) assertion.
  2. Symbolic-to-numeric pipeline: "Differentiate sin(x)/x and plot it from −10 to 10" → diff, then lambdify(..., 'numpy') and a Matplotlib snippet.
  3. Publication-ready output: "Compute ∫₀¹ x² dx and show LaTeX plus the decimal value" → combines Integral().doit(), latex(), and evalf().

· · · Install guide · · ·

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the skills/sympy folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/sympy/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/sympy ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Open a terminal (Terminal on macOS/Linux, WSL or Git Bash on Windows).
  2. Confirm Python 3.9+ is available: python3 --version.
  3. Install SymPy: pip install "sympy>=1.14". Optionally add pip install numpy scipy matplotlib for the lambdify and plotting examples.
  4. Clone the skill repository: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  5. Copy the skill into Claude's skills folder: mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/sympy ~/.claude/skills/
  6. Verify with ls ~/.claude/skills/sympy — you should see SKILL.md and a references directory.
  7. Restart Claude Code and try a prompt like "Use SymPy to solve x²−5x+6=0".
  8. Note: the docs reference both core_capabilities.md and core-capabilities.md; if a link fails, check the actual filenames inside the references folder.