Agent skill

Math Computation

by tradecatlabs in tradecatlabs/vibe-coding-cn

Runs reproducible math computations and counterexample searches with SymPy, NumPy and mpmath, logging evidence without presenting results as proofs.

MITAuto-check passedResearch & Science

SKILL.md written in Chinese; this summary is our English description.

Install Math Computation

skills CLI
$ npx skills add tradecatlabs/vibe-coding-cn --skill math-computation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tradecatlabs/vibe-coding-cn math-computation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tradecatlabs/vibe-coding-cn.git skills-src && mkdir -p .claude/skills && cp -r skills-src/research/vibe-mathing-cn-public/.codex/skills/math-computation .claude/skills/math-computation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
math-computation
GitHub stars
17k
Token cost
~881 tokens
SKILL.md length
238 words
Files
7 (incl. references)
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

Runs reproducible math computations and counterexample searches with SymPy, NumPy and mpmath, logging evidence without presenting results as proofs.

  • Checking an algebraic identity exactly with SymPy
  • SKILL.md covers Position in the Method Map, When to Use This Skill, Not For / Boundaries and GPU 可行性预检(强制), plus 4 more sections
  • Calls python3
  • Searching a finite range for counterexamples to a conjecture

What it does

The skill uses mature libraries to produce evidence that can be rerun, and treats computation as a way to discover, refute and cross-check, never as a general proof. It covers exact simplification, solving, integrals, limits, series, matrices and polynomials, high-precision cross-checks, parameter sweeps, finite counterexample searches, integer sequence identification and tool choices for number theory, finite algebra, graph theory, SAT/SMT, algebraic geometry and PDE experiments. The SKILL.md is written in Chinese.

Boundaries are strict. Computation starts only on an explicit request, tools must pass a capability probe before their output counts as evidence, floating-point equality is not an identity, and finding no counterexample in a finite range proves nothing universal. Every run needs time, memory and output budgets, and a GPU feasibility check routes symbolic work to CPU and uses GPU only for coarse screening, with exact rechecks on CPU. Each record notes the expression, assumptions, library versions and claim level.

When your agent uses it

  • Checking an algebraic identity exactly with SymPy
  • Searching a finite range for counterexamples to a conjecture
  • Cross-checking a numeric result at high precision
  • Identifying an integer sequence or testing small cases of a conjecture

Example prompts

  • “Verify with SymPy that sin(x)^2 + cos(x)^2 simplifies to 1 and record the library version.”
  • “Search a bounded integer grid for a counterexample to this inequality and save the first hit.”
  • “Cross-check this integral at high precision with mpmath.”
  • “Identify this integer sequence from its first terms and log how you did it.”

Requirements

  • Python with SymPy, NumPy, SciPy and mpmath
  • A GPU only for large dense or batch numeric jobs

What it can do on your machine

Read from SKILL.md and the folder at commit 81fc7ae. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Math Computation loads about 881 tokens when it runs, and up to ~2.5k if it reads all its reference files. Until then it costs about 28 tokens; SKILL.md has 238 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~28
When it runs · the whole SKILL.md, loaded when a task matches
~881
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from tradecatlabs/vibe-coding-cn at commit 81fc7ae, republished under its MIT licence (© tradecatlabs). 238 words, ~881 tokens.

Download SKILL.mdSave it as .claude/skills/math-computation/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
math-computation
description
可重跑的数学计算与反例实验。用于 SymPy 精确代数/微积分/方程/矩阵、NumPy/SciPy 数值方法、mpmath 高精度交叉检查、OEIS 序列识别、有限范围反例搜索和计算证据记录。

Math Computation

用成熟计算库生成可重跑证据;计算用于发现、反驳和核对,不越权成为一般性证明。

Position in the Method Map

本 skill 覆盖形式化方法地图中的“SAT/SMT、符号执行和决策过程”横向自动化,以及有限的数值/符号实验;它不替代规格与语义、演绎证明、模型检查或抽象解释。需要 Lean proof term 和 kernel 检查时转交 math-formalization,需要精确定义和来源时先转交 math-discovery。完整地图见 FORMAL-METHODS-MAP.md。

When to Use This Skill

  • 需要精确化简、求解、积分、极限、级数、矩阵或多项式计算。
  • 需要高精度数值交叉检查、参数扫描或有限范围反例搜索。
  • 需要识别整数序列、测试猜想小规模实例或生成图表数据。
  • 需要为数论、有限代数、图论、SAT/SMT、代数几何或 PDE 实验选择成熟工具。

Not For / Boundaries

  • 只有明确用户计算请求或 active ProblemContract 才能启动研究计算;CandidateObservation 必须先回到 math-discovery 完成准入。
  • 工具只有达到 smoke_checked 才可生成计算证据,只有独立 verifier adapter 达到 verifier_admitted 才可作为验证器;survey 文档和固定源码不算运行能力。
  • 浮点相等不是数学恒等;优先 exact arithmetic。
  • SymPy 返回结果可能带分支、条件或未求值对象,必须检查。
  • 有限枚举“未发现反例”不证明全称命题。
  • 大规模矩阵/扫描必须先估算复杂度、内存和停止条件;任何计算、外部命令、solver、枚举或 Lean/CAS 子任务必须有 wall-time、内存/线程/输出预算、可登记的终止回执,禁止裸 solve() 或无 timeout heredoc。

GPU 可行性预检(强制)

任何计算动手前,先运行 python3 scripts/compute_plan.py --kind <类型> --n <规模> --dtype <精度>,批量搜索还必须提供 --ops-per-sample 或 --flops;按输出 route 选择 CPU 或 GPU,并把路由决策与原因写入执行记录:

工具族解释与说明
symbolic 与 mpmath固定走 CPU;精确或任意精度计算没有本项目 GPU route。
small-numeric固定走 CPU;单次小规模任务的 GPU 无收益。
dense-numeric只有规模/运算量达阈值、精度为 f32/f64 且 GPU 可用时才考虑 GPU;否则回退 CPU。
batch-search只有运算量达阈值且 GPU 可用时才考虑 GPU;GPU 只做粗筛,精确复核回 CPU。
  • GPU 不可用、GPU 队列忙或可用内存不足时回退 CPU,并在执行记录标注原因;COMPUTE_FORCE_CPU=1 可强制走 CPU,节点预算由 COMPUTE_MEMORY_BUDGET_GB / COMPUTE_MEMORY_HEADROOM_GB / COMPUTE_THREADS_MAX 运行时注入。
  • GPU 只做粗筛/预筛;结果只能作为 numeric-check 支持,不得提升证据等级;候选必须回 CPU 用 SymPy/mpmath/FP64 精确复核。
  • 多 Agent 并行时遵守项目 AGENTS.md「计算资源与 GPU 路由(强制)」:线程上限、GPU 全局串行锁、内存水位门禁。

Quick Reference

先按问题域运行能力探针;不得只凭包名、PATH 或 Agent 自报认定工具可用:

bash
python3 scripts/check_math_tools.py --profile <profile> --strict

profile 与具体工具入口见 references/tool-catalog.md。项目 .venv、系统 Python、Sage 和 Lean 是独立运行时,禁止跨运行时猜测 import。

python
import sympy as sp
x = sp.symbols("x", real=True)
delta = sp.simplify(lhs - rhs)
status = "symbolically-checked" if delta == 0 else "not-verified"

执行记录至少包含:输入表达式、假设、库版本、精确/近似模式、命令或脚本、输出、失败条件、claim level。

性能口径:符号表达式可能发生组合爆炸;矩阵稠密求解通常为 O(n^3)/O(n^2) 内存;批量数值优先 lambdify/向量化、稀疏结构和有界采样。

Examples

Example 1:恒等式检查
  • 输入:lhs = sin(x)^2 + cos(x)^2,rhs = 1。
  • 动作:使用实变量假设和 trigsimp/simplify。
  • 验收:记录 SymPy 版本与差值;状态最多 symbolically-checked。
Example 2:数值反例
  • 输入:带参数的不等式猜想。
  • 动作:先定义域,再用确定性网格与边界采样,保存首个反例。
  • 验收:找到反例即 refuted-for-stated-domain;未找到只报告覆盖范围。
Example 3:大矩阵
  • 输入:求解大型稀疏线性系统。
  • 动作:识别稀疏性和条件数,优先 SciPy sparse solver,记录残差。
  • 验收:没有构造不必要的稠密副本,报告时间/内存规模变量。
Example 4:GPU 预检与批量反例搜索
  • 输入:对 10^8 个格点批量验证数值不等式猜想。
  • 动作:先运行 python3 scripts/compute_plan.py --kind batch-search --n 1e8 --ops-per-sample 200 --dtype f32,按 route 选择 GPU 或 CPU;GPU 命中候选后用 SymPy/mpmath 精确复核。
  • 验收:执行记录含路由决策、库版本、命中样本与复核结果;GPU 结果只标 numeric-check。

References

  • references/source-map.md:CAS、数值方法和 OEIS 来源映射。
  • references/tool-catalog.md:数学工具、运行时、用法、profile 与证据边界。
  • references/pressure-tests.md:数值/符号证据越权压力场景。

Maintenance

  • Sources:wentor-research-plugins 数学技能、kdense-scientific-skills 的 SymPy skill。
  • Last updated:2026-08-16。
  • Verification:python3 scripts/smoke_math.py 与 python3 scripts/check_math_tools.py --profile <profile> --strict;库 API 以当前官方文档和实测为准。

© tradecatlabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in research/vibe-mathing-cn-public/.codex/skills/math-computation of tradecatlabs/vibe-coding-cn.

  • SKILL.md
  • CHANGELOG.md
  • VERSION
  • references/index.md
  • references/pressure-tests.md
  • references/source-map.md
  • references/tool-catalog.md

Open the folder on GitHubat commit 81fc7ae

Compare with similar skills

Math Computation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Math Computation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Math Computation this skilltradecatlabs/vibe-coding-cn17k—~881Automated safety check: PassMIT
SympyK-Dense-AI/scientific-agent-skills48k1 repos~3.3kAutomated safety check: NotesMIT
Sympy Symbolic Mathjaechang-hits/SciAgent-Skills3701 repos~3.9kAutomated safety check: PassBSD-3-Clause
Light Experiment CodingLight0305/Light-skills641—~2.3kAutomated safety check: PassMIT
SympyzLanqing/codex-claude-academic-skills4.6k16 repos~3.4kAutomated safety check: PassMIT
Edu Analytic Geometrywy51ai/edulab1.4k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Sympy

    K-Dense-AI/scientific-agent-skills

    Performs exact symbolic mathematics with SymPy for algebra, calculus, equation solving, symbolic linear algebra, physics, and lambdify or LaTeX code generation.

    48k GitHub starsUsed in 1 repo~3.3k tokens
    Research & ScienceAuto-check: notes
  • Sympy Symbolic Math

    jaechang-hits/SciAgent-Skills

    Symbolic math in Python: exact algebra, calculus (derivatives, integrals, limits), equation solving, symbolic matrices, ODEs, code gen (lambdify, C/Fortran).

    370 GitHub starsUsed in 1 repo~3.9k tokens
    Research & ScienceAuto-check passed
  • Light Experiment Coding

    Light0305/Light-skills

    Builds the code for a frozen research experiment test-first, with leakage controls, seed handling and saved evidence so results can be rerun and audited.

    641 GitHub stars~2.3k tokensUpdated 3 mo ago
    Research & ScienceAuto-check passed
  • Sympy

    zLanqing/codex-claude-academic-skills

    A skill your agent uses when working with symbolic mathematics in Python.

    4.6k GitHub starsUsed in 16 repos~3.4k tokens
    Research & ScienceAuto-check passed
  • 把一道解析几何题解成一个自包含的交互教学网页:左栏题面 + 动态控制台(一个 可变参数滑块驱动实时重算的几何量 + 理论范围/定值指示),中栏 KaTeX 分步解析,右栏 2D Canvas 动态几何画板(椭圆/双曲线/抛物线/圆 + 动直线/动点 + 向量 + 标注 + 画笔涂鸦)。

    1.4k GitHub starsUsed in 1 repo~1.6k tokens
    Research & ScienceAuto-check passed
  • Edu Solid Geometry

    wy51ai/edulab

    把一道立体几何题解成一个自包含的交互教学网页:左侧 MathJax 分步解析, 右侧 Three.js 可交互 3D 模型(分步高亮 + 镜头切换)。支持三种入口——给定文字题目、 随机出题、上传题目图片识别后解题。覆盖正方体/长方体、棱锥/棱柱、圆柱/圆锥上的线面角、 二面角、异面直线夹角、点到平面距离、体积等题型,统一用"建系+向量法",并由 sympy 精确 计算驱动(答案、3D…

    1.4k GitHub starsUsed in 1 repo~1.1k tokens
    Research & ScienceAuto-check passed

More from tradecatlabs/vibe-coding-cn

All 17 skills in this repo
  • Auto Skill Builder

    tradecatlabs/vibe-coding-cn

    Meta-skill that turns docs, APIs, code or specs into a reusable skill with references and a quality gate, and refactors skills that are unclear or misfire.

    17k GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Web3 Smart Contract Grep Arsenal

    tradecatlabs/vibe-coding-cn

    A master set of ten grep command blocks that surface likely vulnerability classes in Solidity source within the first 30 minutes of auditing a new protocol.

    17k GitHub starsUsed in 2 repos~3.3k tokens
    Auto-check passed
  • Auto tmux Operator

    tradecatlabs/vibe-coding-cn

    Operates tmux sessions like an administrator: reads pane output, sends keys, inspects many panes at once, and coordinates multiple AI terminals through a swarm state script, built on oh-my-tmux.

    17k GitHub stars~4.7k tokensUpdated today
    Auto-check passed
  • Web3 Bug Bounty AI Tools

    tradecatlabs/vibe-coding-cn

    A selection guide to AI-driven tools for Web3 bug bounty work, from autonomous web pentesters to smart contract bug finders, with notes on authorization.

    17k GitHub starsUsed in 2 repos~3.9k tokens
    Auto-check: warnings
  • Runs Slither and Mythril against Solidity contracts to find reentrancy, overflow and access-control bugs before mainnet deployment, then triages and reports findings.

    17k GitHub starsUsed in 1 repo~738 tokens
    Auto-check passed
  • DeFi Smart Contract Bug Classes

    tradecatlabs/vibe-coding-cn

    Reference for ten classes of DeFi smart contract bugs, each with root cause, vulnerable code, fix, grep patterns and paid examples, for audits and bug bounty reviews.

    17k GitHub starsUsed in 2 repos~10k tokens
    Auto-check passed

Works with

Questions about Math Computation

What does Math Computation do?

Runs reproducible math computations and counterexample searches with SymPy, NumPy and mpmath, logging evidence without presenting results as proofs. The skill uses mature libraries to produce evidence that can be rerun, and treats computation as a way to discover, refute and cross-check, never as a general proof. It covers exact simplification, solving, integrals, limits, series, matrices and polynomials, high-precision cross-checks, parameter sweeps, finite counterexample searches, integer sequence identification and tool choices for number theory, finite algebra, graph theory, SAT/SMT, algebraic geometry and PDE experiments.

When should I use Math Computation?

Math Computation fits situations like: checking an algebraic identity exactly with SymPy; searching a finite range for counterexamples to a conjecture; cross-checking a numeric result at high precision; identifying an integer sequence or testing small cases of a conjecture.

How do I install Math Computation in Claude Code?

Run `npx skills add tradecatlabs/vibe-coding-cn --skill math-computation -a claude-code`. Or copy the skill folder (research/vibe-mathing-cn-public/.codex/skills/math-computation in tradecatlabs/vibe-coding-cn) into .claude/skills/math-computation in your project. Claude Code loads it when a task matches its description.

How do I install Math Computation in Codex?

Run `npx skills add tradecatlabs/vibe-coding-cn --skill math-computation -a codex`. Or copy the skill folder (research/vibe-mathing-cn-public/.codex/skills/math-computation in tradecatlabs/vibe-coding-cn) into .agents/skills/math-computation in your project. Codex loads it when a task matches its description.

Can I use Math Computation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tradecatlabs/vibe-coding-cn --skill math-computation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/math-computation, .gemini/skills/math-computation, .github/skills/math-computation and .opencode/skills/math-computation in your project.

What does Math Computation need to run?

Going by SKILL.md and its folder, Math Computation needs the command-line tools its instructions call (python3). Our summary lists: Python with SymPy, NumPy, SciPy and mpmath; A GPU only for large dense or batch numeric jobs.

Does Math Computation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Math Computation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Math Computation use?

Math Computation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Math Computation use?

About 881 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to Math Computation?

Skills that share tags, products or a category with Math Computation: Sympy (K-Dense-AI/scientific-agent-skills, 48k stars), Sympy Symbolic Math (jaechang-hits/SciAgent-Skills, 370 stars), Light Experiment Coding (Light0305/Light-skills, 641 stars) and Sympy (zLanqing/codex-claude-academic-skills, 4.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Math Computation?

tradecatlabs (a GitHub user) maintains it in tradecatlabs/vibe-coding-cn, which has 17,236 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 8, 2026.

Source: tradecatlabs/vibe-coding-cn on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.