math-help by parcadei/continuous-claude-v3
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill math-help用于精确数学计算的认知辅助工具。本指南帮助您为数学任务选择合适的工具。
| 我想... | 使用这个 | 示例 |
|---|---|---|
| 解方程 | sympy_compute.py solve | solve "x**2 - 4 = 0" --var x |
| 积分/微分 | sympy_compute.py | integrate "sin(x)" --var x |
| 计算极限 | sympy_compute.py limit | limit "sin(x)/x" --var x --to 0 |
| 矩阵运算 | sympy_compute.py / numpy_compute.py | det "[[1,2],[3,4]]" |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 验证推理步骤 | math_scratchpad.py verify | verify "x = 2 implies x^2 = 4" |
| 检查证明链 | math_scratchpad.py chain | chain --steps '[...]' |
| 获取渐进式提示 | math_tutor.py hint | hint "Solve x^2 - 4 = 0" --level 2 |
| 生成练习题 | math_tutor.py generate | generate --topic algebra --difficulty 2 |
| 证明定理(约束) | z3_solve.py prove | prove "x + y == y + x" --vars x y |
| 检查可满足性 | z3_solve.py sat | sat "x > 0, x < 10, x*x == 49" |
| 带约束优化 | z3_solve.py optimize | optimize "x + y" --constraints "..." |
| 绘制 2D/3D 函数 | math_plot.py | plot2d "sin(x)" --range -10 10 |
| 任意精度计算 | mpmath_compute.py | pi --dps 100 |
| 数值优化 | scipy_compute.py | minimize "x**2 + 2*x" "5" |
| 形式化机器证明 | Lean 4 (lean4 skill) | /lean4 |
适用场景: 精确代数计算 - 求解、微积分、化简、矩阵代数。
关键命令:
# 解方程
uv run python -m runtime.harness scripts/sympy_compute.py \
solve "x**2 - 5*x + 6 = 0" --var x --domain real
# 积分
uv run python -m runtime.harness scripts/sympy_compute.py \
integrate "sin(x)" --var x
# 定积分
uv run python -m runtime.harness scripts/sympy_compute.py \
integrate "x**2" --var x --bounds 0 1
# 微分(二阶)
uv run python -m runtime.harness scripts/sympy_compute.py \
diff "x**3" --var x --order 2
# 化简(三角策略)
uv run python -m runtime.harness scripts/sympy_compute.py \
simplify "sin(x)**2 + cos(x)**2" --strategy trig
# 极限
uv run python -m runtime.harness scripts/sympy_compute.py \
limit "sin(x)/x" --var x --to 0
# 矩阵特征值
uv run python -m runtime.harness scripts/sympy_compute.py \
eigenvalues "[[1,2],[3,4]]"
最适合: 闭式解、微积分、精确代数。
适用场景: 证明定理、检查可满足性、约束优化。
关键命令:
# 证明交换律
uv run python -m runtime.harness scripts/cc_math/z3_solve.py \
prove "x + y == y + x" --vars x y --type int
# 检查可满足性
uv run python -m runtime.harness scripts/cc_math/z3_solve.py \
sat "x > 0, x < 10, x*x == 49" --type int
# 优化
uv run python -m runtime.harness scripts/cc_math/z3_solve.py \
optimize "x + y" --constraints "x >= 0, y >= 0, x + y <= 100" \
--direction maximize --type real
最适合: 逻辑证明、约束满足、带约束的优化。
适用场景: 验证逐步推理、检查推导链。
关键命令:
# 验证单步
uv run python -m runtime.harness scripts/cc_math/math_scratchpad.py \
verify "x = 2 implies x^2 = 4"
# 带上下文验证
uv run python -m runtime.harness scripts/cc_math/math_scratchpad.py \
verify "x^2 = 4" --context '{"x": 2}'
# 验证推理链
uv run python -m runtime.harness scripts/cc_math/math_scratchpad.py \
chain --steps '["x^2 - 4 = 0", "(x-2)(x+2) = 0", "x = 2 or x = -2"]'
# 解释步骤
uv run python -m runtime.harness scripts/cc_math/math_scratchpad.py \
explain "d/dx(x^3) = 3*x^2"
最适合: 检查工作、验证推导、逐步验证。
适用场景: 学习、获取提示、生成练习题。
关键命令:
# 分步解答
uv run python scripts/cc_math/math_tutor.py steps "x**2 - 5*x + 6 = 0" --operation solve
# 渐进式提示(1-5级)
uv run python scripts/cc_math/math_tutor.py hint "Solve x**2 - 4 = 0" --level 2
# 生成练习题
uv run python scripts/cc_math/math_tutor.py generate --topic algebra --difficulty 2
最适合: 学习、辅导、练习。
适用场景: 严格的机器验证数学证明、范畴论、类型论。
访问方式: 使用 /lean4 skill 获取完整文档。
最适合: 发表级证明、依赖类型、范畴论。
用于数值(非符号)计算:
# 矩阵运算
uv run python scripts/cc_math/numpy_compute.py det "[[1,2],[3,4]]"
uv run python scripts/cc_math/numpy_compute.py inv "[[1,2],[3,4]]"
uv run python scripts/cc_math/numpy_compute.py eig "[[1,2],[3,4]]"
uv run python scripts/cc_math/numpy_compute.py svd "[[1,2,3],[4,5,6]]"
# 解线性系统
uv run python scripts/cc_math/numpy_compute.py solve "[[3,1],[1,2]]" "[9,8]"
# 函数最小化
uv run python scripts/cc_math/scipy_compute.py minimize "x**2 + 2*x" "5"
# 求根
uv run python scripts/cc_math/scipy_compute.py root "x**3 - x - 2" "1.5"
# 曲线拟合
uv run python scripts/cc_math/scipy_compute.py curve_fit "a*exp(-b*x)" "0,1,2,3" "1,0.6,0.4,0.2" "1,0.5"
# Pi 到 100 位小数
uv run python scripts/cc_math/mpmath_compute.py pi --dps 100
# 任意精度平方根
uv run python -m scripts.mpmath_compute mp_sqrt "2" --dps 100
# 2D 绘图
uv run python scripts/cc_math/math_plot.py plot2d "sin(x)" \
--var x --range -10 10 --output plot.png
# 3D 曲面
uv run python scripts/cc_math/math_plot.py plot3d "x**2 + y**2" \
--xvar x --yvar y --range 5 --output surface.html
# 多个函数
uv run python scripts/cc_math/math_plot.py plot2d-multi "sin(x),cos(x)" \
--var x --range -6.28 6.28 --output multi.png
# LaTeX 渲染
uv run python scripts/cc_math/math_plot.py latex "\\int e^{-x^2} dx" --output equation.png
| 级别 | 类别 | 您将获得 |
|---|---|---|
| 1 | 概念性 | 总体方向、主题识别 |
| 2 | 策略性 | 使用的方法、技术选择 |
| 3 | 战术性 | 具体步骤、中间目标 |
| 4 | 计算性 | 中间结果、部分解 |
| 5 | 答案 | 带解释的完整解答 |
用法:
# 从概念性提示开始
uv run python scripts/cc_math/math_tutor.py hint "integrate x*sin(x)" --level 1
# 获取更具体的指导
uv run python scripts/cc_math/math_tutor.py hint "integrate x*sin(x)" --level 3
uv run python scripts/cc_math/math_tutor.py steps "x**2 - 5*x + 6 = 0" --operation solve
返回结构化步骤,包含:
# 求解
uv run python -m runtime.harness scripts/sympy_compute.py \
solve "x**2 - 4 = 0" --var x
# 验证解是否有效
uv run python -m runtime.harness scripts/cc_math/math_scratchpad.py \
verify "x = 2 implies x^2 - 4 = 0"
# 生成问题
uv run python scripts/cc_math/math_tutor.py generate --topic calculus --difficulty 2
# 渐进式获取提示
uv run python scripts/cc_math/math_tutor.py hint "..." --level 1
uv run python scripts/cc_math/math_tutor.py hint "..." --level 2
# 完整解答
uv run python scripts/cc_math/math_tutor.py steps "..." --operation integrate
# 用 Z3 快速检查
uv run python -m runtime.harness scripts/cc_math/z3_solve.py \
prove "x*y == y*x" --vars x y --type int
# 对于形式化证明,使用 /lean4 skill
是符号计算(精确答案)吗?
└─ 是 → 使用 SymPy
├─ 方程 → sympy_compute.py solve
├─ 微积分 → sympy_compute.py integrate/diff/limit
└─ 化简 → sympy_compute.py simplify
是证明或约束问题吗?
└─ 是 → 使用 Z3
├─ 真/假定理 → z3_solve.py prove
├─ 查找值 → z3_solve.py sat
└─ 优化 → z3_solve.py optimize
是数值计算(近似答案)吗?
└─ 是 → 使用 NumPy/SciPy
├─ 线性代数 → numpy_compute.py
├─ 优化 → scipy_compute.py minimize
└─ 高精度 → mpmath_compute.py
需要验证推理吗?
└─ 是 → 使用数学草稿本
├─ 单步 → math_scratchpad.py verify
└─ 链式 → math_scratchpad.py chain
想要学习/练习吗?
└─ 是 → 使用数学导师
├─ 提示 → math_tutor.py hint
└─ 练习 → math_tutor.py generate
需要机器验证的形式化证明吗?
└─ 是 → 使用 Lean 4(参见 /lean4 skill)
/math 或 /math-mode - 快速访问编排技能/lean4 - 使用 Lean 4 进行形式化定理证明/lean4-functors - 范畴论函子/lean4-nat-trans - 自然变换/lean4-limits - 极限与余极限所有数学脚本通过以下方式安装:
uv sync
依赖项:sympy, z3-solver, numpy, scipy, mpmath, matplotlib, plotly
每周安装次数
220
代码仓库
GitHub 星标数
3.6K
首次出现
2026年1月22日
安全审计
已安装于
opencode213
codex210
gemini-cli208
cursor207
github-copilot206
amp200
Cognitive prosthetics for exact mathematical computation. This guide helps you choose the right tool for your math task.
| I want to... | Use this | Example |
|---|---|---|
| Solve equations | sympy_compute.py solve | solve "x**2 - 4 = 0" --var x |
| Integrate/differentiate | sympy_compute.py | integrate "sin(x)" --var x |
| Compute limits | sympy_compute.py limit | limit "sin(x)/x" --var x --to 0 |
| Matrix operations | sympy_compute.py / numpy_compute.py | det "[[1,2],[3,4]]" |
| Verify a reasoning step | math_scratchpad.py verify | verify "x = 2 implies x^2 = 4" |
| Check a proof chain | math_scratchpad.py chain | chain --steps '[...]' |
| Get progressive hints | math_tutor.py hint | hint "Solve x^2 - 4 = 0" --level 2 |
| Generate practice problems | math_tutor.py generate | generate --topic algebra --difficulty 2 |
| Prove a theorem (constraints) | z3_solve.py prove | prove "x + y == y + x" --vars x y |
| Check satisfiability | z3_solve.py sat | sat "x > 0, x < 10, x*x == 49" |
| Optimize with constraints | z3_solve.py optimize | optimize "x + y" --constraints "..." |
| Plot 2D/3D functions | math_plot.py | plot2d "sin(x)" --range -10 10 |
| Arbitrary precision | mpmath_compute.py | pi --dps 100 |
| Numerical optimization | scipy_compute.py | minimize "x**2 + 2*x" "5" |
| Formal machine proof | Lean 4 (lean4 skill) | /lean4 |
When: Exact algebraic computation - solving, calculus, simplification, matrix algebra.
Key Commands:
# Solve equation
uv run python -m runtime.harness scripts/sympy_compute.py \
solve "x**2 - 5*x + 6 = 0" --var x --domain real
# Integrate
uv run python -m runtime.harness scripts/sympy_compute.py \
integrate "sin(x)" --var x
# Definite integral
uv run python -m runtime.harness scripts/sympy_compute.py \
integrate "x**2" --var x --bounds 0 1
# Differentiate (2nd order)
uv run python -m runtime.harness scripts/sympy_compute.py \
diff "x**3" --var x --order 2
# Simplify (trig strategy)
uv run python -m runtime.harness scripts/sympy_compute.py \
simplify "sin(x)**2 + cos(x)**2" --strategy trig
# Limit
uv run python -m runtime.harness scripts/sympy_compute.py \
limit "sin(x)/x" --var x --to 0
# Matrix eigenvalues
uv run python -m runtime.harness scripts/sympy_compute.py \
eigenvalues "[[1,2],[3,4]]"
Best For: Closed-form solutions, calculus, exact algebra.
When: Proving theorems, checking satisfiability, constraint optimization.
Key Commands:
# Prove commutativity
uv run python -m runtime.harness scripts/cc_math/z3_solve.py \
prove "x + y == y + x" --vars x y --type int
# Check satisfiability
uv run python -m runtime.harness scripts/cc_math/z3_solve.py \
sat "x > 0, x < 10, x*x == 49" --type int
# Optimize
uv run python -m runtime.harness scripts/cc_math/z3_solve.py \
optimize "x + y" --constraints "x >= 0, y >= 0, x + y <= 100" \
--direction maximize --type real
Best For: Logical proofs, constraint satisfaction, optimization with constraints.
When: Verifying step-by-step reasoning, checking derivation chains.
Key Commands:
# Verify single step
uv run python -m runtime.harness scripts/cc_math/math_scratchpad.py \
verify "x = 2 implies x^2 = 4"
# Verify with context
uv run python -m runtime.harness scripts/cc_math/math_scratchpad.py \
verify "x^2 = 4" --context '{"x": 2}'
# Verify chain of reasoning
uv run python -m runtime.harness scripts/cc_math/math_scratchpad.py \
chain --steps '["x^2 - 4 = 0", "(x-2)(x+2) = 0", "x = 2 or x = -2"]'
# Explain a step
uv run python -m runtime.harness scripts/cc_math/math_scratchpad.py \
explain "d/dx(x^3) = 3*x^2"
Best For: Checking your work, validating derivations, step-by-step verification.
When: Learning, getting hints, generating practice problems.
Key Commands:
# Step-by-step solution
uv run python scripts/cc_math/math_tutor.py steps "x**2 - 5*x + 6 = 0" --operation solve
# Progressive hint (level 1-5)
uv run python scripts/cc_math/math_tutor.py hint "Solve x**2 - 4 = 0" --level 2
# Generate practice problem
uv run python scripts/cc_math/math_tutor.py generate --topic algebra --difficulty 2
Best For: Learning, tutoring, practice.
When: Rigorous machine-verified mathematical proofs, category theory, type theory.
Access: Use /lean4 skill for full documentation.
Best For: Publication-grade proofs, dependent types, category theory.
For numerical (not symbolic) computation:
# Matrix operations
uv run python scripts/cc_math/numpy_compute.py det "[[1,2],[3,4]]"
uv run python scripts/cc_math/numpy_compute.py inv "[[1,2],[3,4]]"
uv run python scripts/cc_math/numpy_compute.py eig "[[1,2],[3,4]]"
uv run python scripts/cc_math/numpy_compute.py svd "[[1,2,3],[4,5,6]]"
# Solve linear system
uv run python scripts/cc_math/numpy_compute.py solve "[[3,1],[1,2]]" "[9,8]"
# Minimize function
uv run python scripts/cc_math/scipy_compute.py minimize "x**2 + 2*x" "5"
# Find root
uv run python scripts/cc_math/scipy_compute.py root "x**3 - x - 2" "1.5"
# Curve fitting
uv run python scripts/cc_math/scipy_compute.py curve_fit "a*exp(-b*x)" "0,1,2,3" "1,0.6,0.4,0.2" "1,0.5"
# Pi to 100 decimal places
uv run python scripts/cc_math/mpmath_compute.py pi --dps 100
# Arbitrary precision sqrt
uv run python -m scripts.mpmath_compute mp_sqrt "2" --dps 100
# 2D plot
uv run python scripts/cc_math/math_plot.py plot2d "sin(x)" \
--var x --range -10 10 --output plot.png
# 3D surface
uv run python scripts/cc_math/math_plot.py plot3d "x**2 + y**2" \
--xvar x --yvar y --range 5 --output surface.html
# Multiple functions
uv run python scripts/cc_math/math_plot.py plot2d-multi "sin(x),cos(x)" \
--var x --range -6.28 6.28 --output multi.png
# LaTeX rendering
uv run python scripts/cc_math/math_plot.py latex "\\int e^{-x^2} dx" --output equation.png
| Level | Category | What You Get |
|---|---|---|
| 1 | Conceptual | General direction, topic identification |
| 2 | Strategic | Approach to use, technique selection |
| 3 | Tactical | Specific steps, intermediate goals |
| 4 | Computational | Intermediate results, partial solutions |
| 5 | Answer | Full solution with explanation |
Usage:
# Start with conceptual hint
uv run python scripts/cc_math/math_tutor.py hint "integrate x*sin(x)" --level 1
# Get more specific guidance
uv run python scripts/cc_math/math_tutor.py hint "integrate x*sin(x)" --level 3
uv run python scripts/cc_math/math_tutor.py steps "x**2 - 5*x + 6 = 0" --operation solve
Returns structured steps with:
# Solve
uv run python -m runtime.harness scripts/sympy_compute.py \
solve "x**2 - 4 = 0" --var x
# Verify the solutions work
uv run python -m runtime.harness scripts/cc_math/math_scratchpad.py \
verify "x = 2 implies x^2 - 4 = 0"
# Generate problem
uv run python scripts/cc_math/math_tutor.py generate --topic calculus --difficulty 2
# Get hints progressively
uv run python scripts/cc_math/math_tutor.py hint "..." --level 1
uv run python scripts/cc_math/math_tutor.py hint "..." --level 2
# Full solution
uv run python scripts/cc_math/math_tutor.py steps "..." --operation integrate
# Quick check with Z3
uv run python -m runtime.harness scripts/cc_math/z3_solve.py \
prove "x*y == y*x" --vars x y --type int
# For formal proof, use /lean4 skill
Is it SYMBOLIC (exact answers)?
└─ Yes → Use SymPy
├─ Equations → sympy_compute.py solve
├─ Calculus → sympy_compute.py integrate/diff/limit
└─ Simplify → sympy_compute.py simplify
Is it a PROOF or CONSTRAINT problem?
└─ Yes → Use Z3
├─ True/False theorem → z3_solve.py prove
├─ Find values → z3_solve.py sat
└─ Optimize → z3_solve.py optimize
Is it NUMERICAL (approximate answers)?
└─ Yes → Use NumPy/SciPy
├─ Linear algebra → numpy_compute.py
├─ Optimization → scipy_compute.py minimize
└─ High precision → mpmath_compute.py
Need to VERIFY reasoning?
└─ Yes → Use Math Scratchpad
├─ Single step → math_scratchpad.py verify
└─ Chain → math_scratchpad.py chain
Want to LEARN/PRACTICE?
└─ Yes → Use Math Tutor
├─ Hints → math_tutor.py hint
└─ Practice → math_tutor.py generate
Need MACHINE-VERIFIED formal proof?
└─ Yes → Use Lean 4 (see /lean4 skill)
/math or /math-mode - Quick access to the orchestration skill/lean4 - Formal theorem proving with Lean 4/lean4-functors - Category theory functors/lean4-nat-trans - Natural transformations/lean4-limits - Limits and colimitsAll math scripts are installed via:
uv sync
Dependencies: sympy, z3-solver, numpy, scipy, mpmath, matplotlib, plotly
Weekly Installs
220
Repository
GitHub Stars
3.6K
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode213
codex210
gemini-cli208
cursor207
github-copilot206
amp200
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
43,400 周安装