Edu Solid Geometry logo

Edu Solid Geometry

Community
mingchen666
edu-solid-geometry

把一道立体几何题解成一个自包含的交互教学网页:左侧 MathJax 分步解析, 右侧 Three.js 可交互 3D 模型(分步高亮 + 镜头切换)。支持三种入口——给定文字题目、 随机出题、上传题目图片识别后解题。覆盖正方体/长方体、棱锥/棱柱、圆柱/圆锥上的线面角、 二面角、异面直线夹角、点到平面距离、体积等题型,统一用"建系+向量法",并由 sympy 精确 计算驱动(答案、3D 坐标、步骤数值同源一致)。其他 agent 也可调用本技能生成此类网页。 触发词:立体几何, 线面角, 二面角, 异面直线, 点到平面距离, 正四棱锥, 正方体求角, 解这道几何题, 随机出一道立体几何题, 这张图里的立体几何题; solid geometry, line-plane angle, dihedral angle, angle between skew lines, distance to plane, interactive geometry solution page.

Overview

Publishermingchen666
RepositoryReviva
Skill nameedu-solid-geometry
Stars
301
Forks
32
Bundled files
7
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by mingchen666 on GitHub. Read the source before you install it.

Installation

Install the Edu Solid Geometry AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/mingchen666/Reviva/tree/main/electron/builtin-assets/skills/edu-solid-geometry
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mingchen666/Reviva.git /tmp/Reviva
mkdir -p .claude/skills
cp -r /tmp/Reviva/electron/builtin-assets/skills/edu-solid-geometry .claude/skills/edu-solid-geometry
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Edu Solid Geometry in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Edu Solid Geometry on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Edu Solid Geometry is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

立体几何解题 → 交互网页

这个技能产出什么

一个可直接用浏览器打开的单页 HTML:左侧题面/答案/分步解析(公式用 MathJax), 右侧是题目对应的 3D 模型(Three.js,可旋转缩放,分步高亮关键元素并切换镜头)。 形态与 template/lesson.html 一致。

3D 可视化质量要求

立体几何图必须先像一个正确的立体图形,再谈解题步骤。生成 model 时优先提供:

  • faces:低透明度实体面。不要只画线框。
  • edges:骨架棱;背面/隐藏棱标记 hidden:true 或 dashed:true。
  • elements:分步强调用的目标线、目标面、法向量、投影线、截面线、角标、长度标注。
  • cameraPos:每一步都给合理镜头,默认视角应能一眼看出空间结构。

常见三维结构必须使用确定性拓扑与坐标:

  • 正方体/长方体:用 bodies.cuboid + geometry_kernel.cuboid/cube。
  • 三棱锥/正四面体:用 bodies.tri_pyramid + geometry_kernel.regular_tetrahedron 或题面坐标。
  • 四棱锥:用 bodies.quad_pyramid + geometry_kernel.regular_quad_pyramid。
  • 棱柱:用 bodies.prism。

不要让模型临时想象哪些边/面存在。点、边、面、辅助线、垂足、投影、角标都应来自同一份 problem spec 和 kernel 计算结果。

依赖(重要)

计算核心 lib/geometry_kernel.py 依赖 sympy。运行脚本前先确认有一个能 import sympy 的 python3:跑 python3 -c "import sympy"。

缺库时的处理(Reviva 内置默认):若 import 报错(sympy 或后续用到的任何库都同理), 可以自动尝试安装(python3 -m pip install <库名>),或换一个已装该库的解释器。 下文命令里的 python3 均指这个能跑通依赖的解释器。

工作流程

第 1 步:得到 problem spec(三入口归一)

把题目整理成结构化 spec(格式见 references/problem-schema.md):几何体类型与尺寸、 已知构造点/条件、所求类型与对象、语言。

  • 文字题目:直接抽取。
  • 图片:用视觉读图抽取,并把识别到的题目回显给用户确认(题面/几何体/尺寸/所求/语言)后再继续。
  • 随机出题:选定几何体与题型,用 kernel 随机参数求解,答案不规整就重抽。

输出语言跟随提示词语言:英文提示 → 英文网页,中文 → 中文。spec 里记下 language。

第 2 步:用 kernel 精确计算(不要心算)

按 references/conventions.md 的建系约定与解法配方,调用 lib/geometry_kernel.py: 得到精确坐标、关键向量、法向量、最终答案,以及各步骤要展示的中间量(均为 LaTeX 字符串)。 顶点的 three.js 坐标用 kernel.to_three(points, scale) 得到。

可先在命令行跑 kernel 验证答案,例如:

bash
python3 lib/geometry_kernel.py    # 内置样例自检

第 3 步:组装 lesson data 并注入模板

📍 输出位置(重要):成品 HTML 一律写到用户当前工作目录(Path.cwd()),除非用户显式指定路径。 绝不要写进技能自身目录(skills/edu-solid-geometry/output/ 等)——那是技能内部的开发样例目录。 临时构建脚本也放到 cwd 或临时目录(如 /tmp),用完可删。

写一个临时构建脚本,导入 kernel、bodies、generate,拼出 lesson / steps / model 数据 (schema 见 references/problem-schema.md),再调用 generate.render_html(data, out) 注入模板产出 HTML。 out 用 cwd 下的绝对路径:

python
from pathlib import Path
out = Path.cwd() / "solution-<题目简述>.html"   # 落在用户当前目录,而非技能目录
generate.render_html(data, out)
  • steps[*].content 里的所有数值直接引用 kernel 的计算结果,模型只负责组织讲解文字(按目标语言书写)。
  • model.points 用 kernel.to_three(...) 的结果;model.spheres/edges 用 lib/bodies.py 的拓扑 (quad_pyramid / tri_pyramid / cuboid / cube / prism),罕见几何体可手写 edges。
  • model.faces 优先使用 lib/bodies.py 返回的 faces;罕见几何体也要手写 faces,避免只显示线框。
  • 每步配 highlight(该步可见元素的绝对集合)与 cameraPos。
  • 题面给出线段长度时:为对应棱加 measure 元素(label 用 LaTeX,如 2\sqrt{2}), 并把它放进"建系/列已知条件"那步的 highlight,在 3D 图中点处标出长度(见 problem-schema)。
  • 英文输出时填 lesson.ui 英文文案并设 lesson.language="en"。

可直接参考的范例:scripts/generate.py 里的 build_data()(正四棱锥·线面角)、 build_cube_data()(正方体·线面角)、build_box_volume_data()(长方体·体积)都是完整范本,照着改即可。

generate.py 可直接出已注册的题;不传路径时默认写到当前工作目录(cwd),也可显式给 cwd 下的文件名 (用技能目录里的 scripts/generate.py,输出落在 cwd):

bash
python3 <技能目录>/scripts/generate.py cube ./cube.html
python3 <技能目录>/scripts/generate.py box  ./box.html

随机出题:generate.py random <seed> [输出.html],内部用 kernel.is_clean(...) 判答案规整、不过重抽:

bash
python3 <技能目录>/scripts/generate.py random 7 ./random.html   # 不给路径则默认 ./random.html(cwd)

扩展随机题型时沿用"随机参数 → 求解 → is_clean 不过就重抽"。

第 4 步:自检(对应正确性方案)

  • kernel 答案 == 答案卡 answerValue == 末步骤展示的最终值(generate.py 已有断言示例)。
  • 3D 顶点坐标来自 kernel.to_three(与解题同源)。
  • 起本地静态服务(服务输出文件所在目录,即 cwd)用预览检查:无控制台报错、公式渲染正常、分步高亮/镜头符合预期。 (技能仓库内开发时可用 .claude/launch.json 的 geom-preview;在别处运行就对 cwd 起一个临时静态服务。)

⚠️ 必须关闭你开过的端口/服务:预览检查一结束就立即停掉本地服务,绝不留下占用端口的进程。

  • 用 preview 工具开的:检查完马上 preview_stop(传对应 serverId)。
  • 直接起的 http.server:用完 kill 掉,或核对 lsof -nP -iTCP:<port> -sTCP:LISTEN 确认已释放。
  • 交付前确认端口已释放,再告诉用户结果。开了不关 = 未完成自检。

第 5 步:交付

成品写在用户当前工作目录(cwd),命名形如 solution-<题目简述>.html,把(cwd 下的)路径告诉用户,可直接浏览器打开。 交付前确认:(1) 成品在 cwd、不在技能目录;(2) 没有遗留任何由本次预览开启的本地服务/端口。

扩展

  • 加题型:在 geometry_kernel.py 加求解函数(见 conventions 配方表),在 generate.py 加一个 build_*。
  • 加几何体:在 geometry_kernel.py 加坐标构建函数,在 bodies.py 加棱拓扑。

目录

  • template/lesson.html — 数据驱动模板(通用 3D 渲染器 + 数据岛 __LESSON_DATA__)
  • lib/geometry_kernel.py — sympy 精确计算核心
  • lib/bodies.py — 几何体棱拓扑库
  • scripts/generate.py — 注入模板 + 范例构建函数
  • references/problem-schema.md — 数据格式
  • references/conventions.md — 建系约定、解法配方、自检

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Edu Solid Geometry AI skill do?

把一道立体几何题解成一个自包含的交互教学网页:左侧 MathJax 分步解析, 右侧 Three.js 可交互 3D 模型(分步高亮 + 镜头切换)。支持三种入口——给定文字题目、 随机出题、上传题目图片识别后解题。覆盖正方体/长方体、棱锥/棱柱、圆柱/圆锥上的线面角、 二面角、异面直线夹角、点到平面距离、体积等题型,统一用"建系+向量法",并由 sympy 精确 计算驱动(答案、3D 坐标、步骤数值同源一致)。其他 agent 也可调用本技能生成此类网页。 触发词:立体几何, 线面角, 二面角, 异面直线, 点到平面距离, 正四棱锥, 正方体求角, 解这道几何题, 随机出一道立体几何题, 这张图里的立体几何题; solid geometry, line-plane angle, dihedral angle, angle between skew lines, distance to plane, interactive geometry solution page.

Why use Edu Solid Geometry on TypingMind?

Because you install it once and use it with any model. Edu Solid Geometry is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Edu Solid Geometry in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mingchen666/Reviva/tree/main/electron/builtin-assets/skills/edu-solid-geometry. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Edu Solid Geometry?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Edu Solid Geometry?

As many as you like. As long as a model supports skills, you can use Edu Solid Geometry with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Edu Solid Geometry AI skill free?

It is published on GitHub by mingchen666. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇