Claude Skill

shuyicc/MathLens

MathLens is a Claude Skill that turns math problems into animated explanation videos. Paste an image or text, and it handles analysis, script, and Manim animation—all at low cost.

Overview

Stars362
Forks8
LanguagePython
Last pushed2026-03-10
Last synced2026-07-03
View on GitHub

Repository

Ownershuyicc
RepositoryMathLens
Full nameshuyicc/MathLens
Repo ID1,177,455,286

Install this Skill

pip install uv manim edge-tts

Registry

Typeopenclaw_skill
Quality score70/100
Verificationreadme_parsed
Last verified2026-06-13
Platforms
Cursor
Capabilities
pdfimagevideoworkflow
Detected files
README.mdSKILL.mdrequirements.txt

Summary

MathLens is a Claude Skill that automatically generates math problem explanation videos from pasted images or text, covering analysis, visualization, voiceover scripting, and Manim animation production.

Chinese description

MathLens 是一个专注于数学题目视频讲解的 Claude Skill。你只需粘贴一道数学题(图片或文字),它就能自动完成从题目分析、可视化讲解、配音脚本到 Manim 动画视频的全流程制作。单条视频时长1-10分钟,成本控制在0.2-1元以内。

Key features

  • Supports image and text input for math problems
  • Automated problem analysis and step-by-step explanation
  • Generates voiceover scripts for narration
  • Produces Manim animation videos (1-10 minutes each)
  • Low cost per video (0.2-1 CNY)

Use cases

  • Creating math tutorial videos for online courses
  • Automating homework explanation content for students
  • Producing animated math problem solutions for social media
  • Assisting teachers in generating visual teaching materials

README excerpt

# MathLens <div align="right"> <a href="#chinese">中文</a> | <a href="#english">English</a> </div> --- <a id="chinese"></a> # MathLens — AI 数学教学视频制作 > 将一道数学题,变成一支有声有画的教学视频。 MathLens 是一个运行在 Cursor AI 中的 **Agent Skill**。你只需粘贴一道数学题(图片或文字),它就能自动完成从题目分析、可视化讲解、配音脚本到 Manim 动画视频的全流程制作。 --- ## 演示 ### 输入:一道数学题截图 ![输入示例](resource/input.png) ### 输出:带配音的 Manim 教学动画 <video src="resource/output.mp4" controls width="100%"></video> > 提示:如视频无法预览,可直接下载 [output.mp4](resource/output.mp4) 观看。 --- ## 亮点 - **全自动流水线**:8 步工作流一气呵成,无需手动拼接工具 - **深入浅出**:AI 以一对一家教的方式拆解题目,适合普通学情的学生 - **SVG 可视化讲解**:自动生成带几何标注的 HTML 文档,随时预览 - **真人感配音**:基于 edge-tts 生成自然语音,支持选择音色(默认晓晓) - **画面音频精准同步**:`wait_for_narration(keyword)` 机制让动画在读白说出关键词时精准触发 - **几何自校验**:内置 `assert_geometry()` 验证坐标正确性,防止画出错误图形 - **Manim 动画视频**:渲染输出专业级数学教学视频 --- ## 核心工作流 ``` 题目输入 │ ▼ ① 数学分析 → 推导已知/结论,建立几何模型 │ ▼ ② HTML 可视化 → SVG 绘图 + 步骤标注,生成讲解页面 │ ▼ ③ 分镜脚本 → 定义幕结构,设计画面 / 字幕 / 读白 │ ▼ ④ TTS 生成 → 生成每幕 .wav 音频 + 同步点索引 │ ▼ ⑤ 音频验证 → 校验时长,回写分镜脚本 │ ▼ ⑥ 代码脚手架 → 生成 Manim 框架(几何建模 + 场景结构) │ ▼ ⑦ 动画实现 → 按分镜逐幕实现动画,对齐读白同步点 │ ▼ ⑧ 渲染验证 → 输出视频 + 关键帧截图,失败自动修复 ``` --- ## 快速开始 ### 前置依赖 ```bash pip install uv manim edge-tts ``` ### 初始化项目 ```bash python init.py ./my_math_problem ``` ### 触发 Skill 在 Cursor 对话中,直接粘贴题目图片或描述即可: ``` (粘贴数学题截图) 帮我讲解这道题,生成教学视频。 ``` AI 会自动按 8 步工作流完成制作。 --- ## 手动运行脚本 ```bash # 生成 TTS 音频 python scripts/generate_tts.py audio_list.csv ./audio --voice xiaoxiao # 验证音频并回写分镜时长 python scripts/validate_audio.py 分镜.md ./audio # 检查 Manim 代码结构 python scripts/check.py # 渲染视频 python scripts/render.py ``` --- ## 目录结构 ``` MathLens/ ├── README.md # 本文档 ├── SKILL.md # Agent Skill 主文件(给 Cursor AI 读的) ├── init.py # 项

Topics

No topics yet.

Explore more

Data from GitHub. Synced on 2026-07-03