davila7/claude-code-templates/sympy
- community
Checking that the SKILL.md file is still in the repository.
Use this skill when working with symbolic mathematics in Python. This skill should be used for symbolic computation tasks including solving equations algebraically, performing calculus operations (derivatives, integrals, limits), manipulating algebraic expressions, working with matrices symbolically, physics calculations, number theory problems, geometry computations, and generating executable code from mathematical expressions. Apply this skill when the user needs exact symbolic results rather than numerical approximations, or when working with mathematical formulas that contain variables and parameters.
Install
npx vskill@latest install davila7/claude-code-templates/sympySKILL.md
SymPy - Symbolic Mathematics in Python
Overview
SymPy is a Python library for symbolic mathematics that enables exact computation using mathematical symbols rather than numerical approximations. This skill provides comprehensive guidance for performing symbolic algebra, calculus, linear algebra, equation solving, physics calculations, and code generation using SymPy.
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...)
Core Capabilities
1. Symbolic Computation Basics
Creating symbols and expressions:
Simplification and manipulation:
For detailed basics: See references/core-capabilities.md
2. Calculus
Derivatives:
Integrals:
Limits and Series:
For detailed calculus operations: See references/core-capabilities.md
3. Equation Solving
Algebraic equations:
Systems of equations:
Differential equations:
For detailed solving methods: See references/core-capabilities.md
4. Matrices and Linear Algebra
Matrix creation and operations:
Eigenvalues and eigenvectors:
Solving linear systems:
For comprehensive linear algebra: See references/matrices-linear-algebra.md
5. Physics and Mechanics
Classical mechanics:
Vector analysis:
Quantum mechanics:
For detailed physics capabilities: See references/physics-mechanics.md
6. Advanced Mathematics
The skill includes comprehensive support for:
- Geometry: 2D/3D analytic geometry, points, lines, circles, polygons, transformations
- Number Theory: Primes, factorization, GCD/LCM, modular arithmetic, Diophantine equations
- Combinatorics: Permutations, combinations, partitions, group theory
- Logic and Sets: Boolean logic, set theory, finite and infinite sets
- Statistics: Probability distributions, random variables, expectation, variance
- Special Functions: Gamma, Bessel, orthogonal polynomials, hypergeometric functions
- Polynomials: Polynomial algebra, roots, factorization, Groebner bases
For detailed advanced topics: See references/advanced-topics.md
7. Code Generation and Output
Convert to executable functions:
Generate C/Fortran code:
LaTeX output:
For comprehensive code generation: See references/code-generation-printing.md
Working with SymPy: Best Practices
1. Always Define Symbols First
2. Use Assumptions for Better Simplification
Common assumptions: real, positive, negative, integer, rational, complex, even, odd
3. Use Exact Arithmetic
4. Numerical Evaluation When Needed
5. Convert to NumPy for Performance
6. Use Appropriate Solvers
solveset: Algebraic equations (primary)linsolve: Linear systemsnonlinsolve: Nonlinear systemsdsolve: Differential equationssolve: General purpose (legacy, but flexible)
Reference Files Structure
This skill uses modular reference files for different capabilities:
- `core-capabilities.md`: Symbols, algebra, calculus, simplification, equation solving
- Load when: Basic symbolic computation, calculus, or solving equations
- `matrices-linear-algebra.md`: Matrix operations, eigenvalues, linear systems
- Load when: Working with matrices or linear algebra problems
- `physics-mechanics.md`: Classical mechanics, quantum mechanics, vectors, units
- Load when: Physics calculations or mechanics problems
- `advanced-topics.md`: Geometry, number theory, combinatorics, logic, statistics
- Load when: Advanced mathematical topics beyond basic algebra and calculus
- `code-generation-printing.md`: Lambdify, codegen, LaTeX output, printing
- Load when: Converting expressions to code or generating formatted output
Common Use Case Patterns
Pattern 1: Solve and Verify
Pattern 2: Symbolic to Numeric Pipeline
Pattern 3: Document Mathematical Results
Integration with Scientific Workflows
With NumPy
With Matplotlib
With SciPy
Quick Reference: Most Common Functions
Getting Started Examples
Example 1: Solve Quadratic Equation
Example 2: Calculate Derivative
Example 3: Evaluate Integral
Example 4: Matrix Eigenvalues
Example 5: Generate Python Function
Troubleshooting Common Issues
- "NameError: name 'x' is not defined"
- Solution: Always define symbols using
symbols()before use
- Unexpected numerical results
- Issue: Using floating-point numbers like
0.5instead ofRational(1, 2) - Solution: Use
Rational()orS()for exact arithmetic
- Slow performance in loops
- Issue: Using
subs()andevalf()repeatedly - Solution: Use
lambdify()to create a fast numerical function
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcli-tool/components/skills/scientific/sympy/SKILL.md
Popularity
- Repository stars
- 23,956
- Repository forks
- 2,333
- Repository npm downloads, 7 days
- 6,860
- 7-day trend score
- 71
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 1 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/davila7/claude-code-templates/sympy)