
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.
- Installs
- 714
- Last 24h
- +13
- Trending rank
- #7453
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/wy51ai/edulab --skill edu-solid-geometry- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads edu-solid-geometry automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
立体几何解题 → 交互网页
这个技能产出什么
一个可直接用浏览器打开的单页 HTML:左侧题面/答案/分步解析(公式用 MathJax),
右侧是题目对应的 3D 模型(Three.js,可旋转缩放,分步高亮关键元素并切换镜头)。
形态与 template/lesson.html 一致。
依赖(重要)
计算核心 lib/geometry_kernel.py 依赖 sympy。运行脚本前先确认有一个能 import sympy 的
python3:跑 python3 -c "import sympy"。
缺库时的处理(重要):若 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 验证答案,例如:
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 下的绝对路径:
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。- 每步配
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):
python3 <技能目录>/scripts/generate.py cube ./cube.html
python3 <技能目录>/scripts/generate.py box ./box.html
随机出题:generate.py random <seed> [输出.html],内部用 kernel.is_clean(...) 判答案规整、不过重抽:
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— 建系约定、解法配方、自检
FAQ
What does the edu-solid-geometry 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.
How do I install edu-solid-geometry?
Run npx skills add https://github.com/wy51ai/edulab --skill edu-solid-geometry in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/edu-solid-geometry/ (personal) or .claude/skills/edu-solid-geometry/ (project).
Which AI agents can use edu-solid-geometry?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is edu-solid-geometry safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains edu-solid-geometry?
It is published by wy51ai in wy51ai/edulab. It has 714 recorded installs.
More from wy51ai/edulab
edu-analytic-geometry
wy51ai/edulab
把一道解析几何题解成一个自包含的交互教学网页:左栏题面 + 动态控制台(一个 可变参数滑块驱动实时重算的几何量 + 理论范围/定值指示),中栏 KaTeX 分步解析,右栏 2D Canvas 动态几何画板(椭圆/双曲线/抛物线/圆 + 动直线/动点 + 向量 + 标注 + 画笔涂鸦)。 支持三入口——给定文字题、随机出题、上传题目图片识别后解题。覆盖求标准方程、弦长、向量 数量积范围/定值、三角形面积最值、定点、定值(斜率之积)、轨迹、离心率等题型,统一"设含参 直线 x=my+c + 联立 + 韦达 + 换元/常数分离",并由 sympy 精确计算驱动(答案、坐标、步骤 数值、交互引擎的理论范围同源一致)。其它 agent 也可调用本技能生成此类网页。形态与 edu-solid-geometry 平行,但用 Canvas-2D + KaTeX(非 Three.js)。 触发词:解析几何, 圆锥曲线, 椭圆, 双曲线, 抛物线, 直线与圆锥曲线, 焦点弦, 弦长, 数量积取值范围, 向量数量积, 定点问题, 定值问题, 斜率之积, 三角形面积最值, 轨迹方程, 离心率, 解这道解析几何题, 随机出一道圆锥曲线题, 这张图里的解析几何题; analytic geometry, conic sections, ellipse, hyperbola, parabola, chord length, dot product range, fixed point, fixed value, locus, eccentricity, interactive analytic geometry solution page.
edu-chem-reaction
wy51ai/edulab
把一个化学反应做成自包含的微观 3D 交互演示网页:左/上为 Three.js 可交互分子动画 (拖滑块看断键·成键·原子重组,分步高亮),右为 KaTeX 反应方程 + 分步讲解 + 原子守恒计数 + 可选能量-反应进程曲线。支持三入口——给定文字反应/方程、随机出题、上传图片识别后演示。 覆盖燃烧、化合/分解/置换/复分解、氧化还原(电子转移可视化)、有机机理(酯化等含催化剂·过渡态)。 统一由 sympy 精确驱动:自动配平方程、校验原子守恒与原子映射、推导键的断/成,答案与几何同源一致。 内置两套引擎并自动选择:morph(原子变形,展示原子守恒)与 mechanism(机理关键帧,展示催化/过渡态)。 混合几何:默认自建 VSEPR 分子库,环境装有 RDKit 则可用其由 SMILES 生成构象(绝不自动安装)。 其他 agent 也可调用本技能生成此类网页。形态与 edu-solid-geometry / edu-analytic-geometry 平行, 但用 Three.js + KaTeX 演示分子反应。 触发词:化学反应, 微观演示, 分子动画, 燃烧, 甲烷燃烧, 氢气燃烧, 电解水, 氧化还原, 电子转移, 酯化反应, 反应机理, 断键成键, 原子守恒, 质量守恒, 化学方程式配平, 解这个化学反应, 随机出一个化学反应, 这张图里的化学反应; chemistry reaction, microscopic/molecular animation, combustion, electrolysis, redox electron transfer, esterification mechanism, bond breaking and forming, atom conservation, balance equation, interactive chemistry reaction page.
edu-math-video
wy51ai/edulab
Open the skill to read its SKILL.md instructions.
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image