sympy

sympy is a skill for Claude Code, Codex from synthetic-sciences/openscience. It costs 98 tokens per session (3,848 once invoked), scanned A, a copy of sympy, Apache-2.0.

A Python library for doing exact mathematics with symbols, such as solving equations, differentiating expressions, and manipulating formulas without rounding to decimal values.

In plain words
What is it for?
It helps solve equations, calculate derivatives and integrals, work with symbolic matrices and physics formulas, generate LaTeX, and turn mathematical expressions into code.
Why use it?
It handles algebra and calculus symbolically, so results can remain exact—for example, keeping √2 instead of replacing it with an approximation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps solve equations, calculate derivatives and integrals, work with symbolic matrices and physics formulas, generate LaTeX, and turn mathematical expressions into code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/synthetic-sciences/openscience/sympy
About the project

synthetic-sciences/openscience is an AI workbench that carries out scientific research by reading papers, forming hypotheses, writing and running code, conducting experiments, analyzing results, and preparing reports. Researchers use it for work in machine learning, biology, physics, and chemistry with remote or local models. Catalogue add-ons extend its scientific workflows through skills and instructions.

synthetic-sciences/openscience · 3,501 stars · on GitHub · openscience.sh

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add synthetic-sciences/openscience --skill sympy
Clone the repo
git clone --depth 1 https://github.com/synthetic-sciences/openscience

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sympy

README.md
[![agentmods](https://agentmods.dev/badge/skills/synthetic-sciences/openscience/sympy.svg)](https://agentmods.dev/skills/synthetic-sciences/openscience/sympy)
Your own site
<a href="https://agentmods.dev/skills/synthetic-sciences/openscience/sympy"><img src="https://agentmods.dev/badge/skills/synthetic-sciences/openscience/sympy.svg" alt="Measured on agentmods" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,848 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00098 $0.03848
Opus 5 $0.00049 $0.01924
Sonnet 5 $0.00020 $0.00770
Haiku 4.5 $0.00010 $0.00385

Measured 4d ago against content hash e1262cc084ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

sympy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to sympy — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

backend/cli/skills/coding/sympy/SKILL.md · 500 lines

How it starts

The opening of the file, as written. The whole thing — 500 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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) not 1.414...)

Core Capabilities

1. Symbolic Computation Basics

Creating symbols and expressions:

from sympy import symbols, Symbol
x, y, z = symbols('x y z')
expr = x**2 + 2*x + 1

# With assumptions
x = symbols('x', real=True, positive=True)
n = symbols('n', integer=True)

Simplification and manipulation:

from sympy import simplify, expand, factor, cancel
simplify(sin(x)**2 + cos(x)**2)  # Returns 1
expand((x + 1)**3)  # x**3 + 3*x**2 + 3*x + 1
factor(x**2 - 1)    # (x - 1)*(x + 1)

For detailed basics: See references/core-capabilities.md

2. Calculus

Derivatives:

from sympy import diff
diff(x**2, x)        # 2*x
diff(x**4, x, 3)     # 24*x (third derivative)
diff(x**2*y**3, x, y)  # 6*x*y**2 (partial derivatives)

Integrals:

from sympy import integrate, oo
integrate(x**2, x)              # x**3/3 (indefinite)
integrate(x**2, (x, 0, 1))      # 1/3 (definite)
integrate(exp(-x), (x, 0, oo))  # 1 (improper)

Read the full file on GitHub · 500 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 500 lines · 98 tokens per session scan A e1262cc084ae

Subscribe to this mod's changes

sympy is a skill published in the GitHub repository synthetic-sciences/openscience (3,501 stars, last pushed today), licensed Apache-2.0. It adds 98 tokens to every session and 3,848 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to sympy, differing in 3 lines, and is treated as a copy.