sympy
Skill by K-Dense-AI
Performs exact symbolic mathematics with SymPy for algebra, calculus, equation solving, linear algebra, physics, and lambdify or LaTeX output. Built for tasks that need exact results and explicit assumptions.
Install sympy
Built from the published package, never by AI.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/sympy ~/.claude/skills/sympyRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/scientific-agent-skills/skills/sympy ~/.gemini/antigravity-cli/skills/sympyAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The sympy skill guides an AI assistant through exact symbolic mathematics with the SymPy Python library. It covers algebra, calculus, equation solving, symbolic linear algebra, physics and mechanics, number theory, geometry, and code or LaTeX output. Results stay exact, such as sqrt(2) rather than a decimal approximation, and the skill includes reference files for each capability area.
The skill sets out practices for declaring symbols, using assumptions, choosing solvers, and converting expressions to NumPy with lambdify. It also warns about solution domains, branch cuts, unknown assumptions, and the risk of parsing untrusted strings. It is aimed at users who need symbolic results, explicit assumptions, or exact arithmetic, and it points purely numerical work to NumPy or SciPy.
Written from the project's SKILL.md and checked against it.
What it can do
- Symbolic computation basicsDefines symbols and manipulates, simplifies, and substitutes into expressions.
- CalculusHandles differentiation, integration, limits, and series expansion.
- Equation solvingUses solve, solveset, linsolve, nonlinsolve, and dsolve for algebraic and differential equations.
- Matrices and linear algebraPerforms symbolic matrix operations, eigenvalues, and linear systems.
- Physics and mechanicsCovers classical mechanics, quantum mechanics, vector analysis, and units.
- Advanced mathematicsCovers geometry, number theory, combinatorics, logic, and statistics.
- Code generation and outputConverts expressions to Python, C, or Fortran code and LaTeX or pretty output.
What you need
- Python 3.9 or later
- SymPy 1.14.0
- Optional NumPy, SciPy, and Matplotlib for lambdify and plotting examples
- C or Fortran compiler for compiled wrappers
Try asking
- Solve x**2 - 5*x + 6 = 0 exactly and verify each root.
- Differentiate sin(x**2) symbolically and show the result as LaTeX.
- Create a NumPy function from a SymPy expression for fast evaluation.
Good to know
- An unconstrained symbol is treated as complex, so assumptions must be stated explicitly.
- parse_expr, sympify, and lambdify can execute code, so only trusted expressions should be used.
- A ConditionSet is an unresolved condition, and an nsolve result is only a local root.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/sympy/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Read Write Edit Bash
-
SKILL.md13 KB -
references/advanced-topics.md14 KB -
references/code-generation-printing.md15 KB -
references/core-capabilities.md9 KB -
references/core_capabilities.md5 KB
Show all 8 files
-
references/matrices-linear-algebra.md10 KB -
references/physics-mechanics.md15 KB -
references/review.md6 KB
Alternatives to sympy
All alternatives →Searches arXiv for scientific papers and preprints, extracts their metadata and abstracts, and downloads PDF or HTML full text. Suited to users who need research papers, literature or specific arXiv IDs.
Downloads AlphaFold predicted structures and PAE matrices for a UniProt ID, then reports pLDDT confidence, domain boundaries and disorder. Built for users who already have a UniProt accession.
Queries the QuickGO and Evidence & Conclusion Ontology REST API to map genes to Gene Ontology terms. Built for researchers doing functional annotation and GO hierarchy exploration.
Connects an AI assistant to Peloton to browse fitness classes, check live and archived schedules, and manage workouts. Built for Peloton users who want to plan rides from their assistant.
Queries NCBI Gene through the E-utilities and Datasets API. It helps researchers search genes by symbol or ID, retrieve gene details, and run batch lookups for annotation and functional analysis.
Prepares and launches nf-core/pacsomatic runs for matched tumor-normal PacBio HiFi data starting from unaligned BAM files. It generates samplesheets and pinned launch artifacts, then runs locally or submits to a scheduler.
Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database
sympy: common questions
What Python version does SymPy need for this skill?
The skill says core SymPy requires Python 3.9 or later. The tested NumPy and SciPy stack needs Python 3.12 or later.
Can this skill handle untrusted user input safely?
No. The skill warns that parse_expr, string sympify, and lambdify can execute code, and says untrusted input needs a separate allowlisted grammar and resource limits.
When should I use this skill instead of NumPy or SciPy?
The description says to use SymPy when a task needs symbolic results, explicit assumptions, or exact arithmetic. It says to use NumPy or SciPy for purely numerical workloads.
How do I install sympy?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is sympy free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is sympy safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to sympy?
Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.
