sympy – Coding skill for AI agents
SymPy is a Python library for symbolic mathematics that enables exact computation using mathematical symbols rather than numerical approximations.
Install the sympy skill with one command
Pick the tool you use, copy the command and paste it in your terminal. The skill lands in that tool's skills folder and is ready in your next session.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/sympy-a6597.tgz | tar xz -C ~/.claude/skills
Call it in Claude Code: /sympy – then describe the task you want done.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/sympy-a6597.tgz | tar xz -C ~/.codex/skills
Call it in Codex: $sympy – then describe the task you want done.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/sympy-a6597.tgz | tar xz -C ~/.hermes/skills
Call it in Hermes Agent: /sympy – then describe the task you want done.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/sympy-a6597.tgz | tar xz -C ~/.deepcode/skills
Call it in DeepSeek: /sympy – then describe the task you want done.
SKILL.md content
SymPy - Symbolic Mathematics in Python
Detailed Guide
Read [the detailed guide](references/detailed-guide.md) before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
When to Use This Skill
Use this skill when:
- Solving equations symbolically (algebraic, differential, systems of equations)
- Performing calculus operations (derivatives, integrals, limits, series)
- Manipulating and simplifying algebraic expressions
- Working with matrices and linear algebra symbolically
- Doing physics calculations (mechanics, quantum mechanics, vector analysis)
- Number theory computations (primes, factorization, modular arithmetic)
- Geometric calculations (2D/3D geometry, analytic geometry)
- Converting mathematical expressions to executable code (Python, C, Fortran)
- Generating LaTeX or other formatted mathematical output
- Needing exact mathematical results (e.g.,
sqrt(2)not1.414...)
Getting Started Examples
Example 1: Solve Quadratic Equation
from sympy import symbols, solve, sqrt
x = symbols('x')
solution = solve(x**2 - 5*x + 6, x)
# [2, 3]Example 2: Calculate Derivative
from sympy import symbols, diff, sin
x = symbols('x')
f = sin(x**2)
df_dx = diff(f, x)
# 2*x*cos(x**2)Example 3: Evaluate Integral
from sympy import symbols, integrate, exp, oo
x = symbols('x')
integral = integrate(x * exp(-x**2), (x, 0, oo))
# 1/2Example 4: Matrix Eigenvalues
from sympy import Matrix
M = Matrix([[1, 2], [2, 1]])
eigenvals = M.eigenvals()
# {3: 1, -1: 1}Example 5: Generate Python Function
from sympy import symbols, lambdify
import numpy as np
x = symbols('x')
expr = x**2 + 2*x + 1
f = lambdify(x, expr, 'numpy')
f(np.array([1, 2, 3]))
# array([ 4, 9, 16])Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Related skills
- syncbook-discovery – Find reciprocal collaborators on Syncbook or prepare a private profile draft for human…
- systematic-debugging – Use when encountering any bug, test failure, or unexpected behavior, before proposing…
- systems-programming-rust-project – You are a Rust project architecture expert specializing in scaffolding production-ready…
- takeout-coupon – Call takeout coupon API to fetch hidden coupon lists, red packets and aggregated…
- tdd – Test-driven development. Use when the user wants to build features or fix bugs…
- tdd-workflows-tdd-green – Implement the minimal code needed to make failing tests pass in the TDD green phase.
- tdd-workflows-tdd-red – Generate failing tests for the TDD red phase to define expected behavior and edge cases.
- tdd-workflows-tdd-refactor – Use when working with tdd workflows tdd refactor