interactive-problem-solver

Generate an interactive problem-solving web page (single-page HTML) based on a user-uploaded problem, with an option to add the problem to a mistake notebook (saved to a local Excel file).

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "interactive-problem-solver" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-3ba138ff7a0c5d543ccd8f3077c641c46eb807c7a2aa11ca2fa6173b23f76e4e. Verify the upstream source and version against https://skillhub.cn/skills/user_d82e0b43/interactive-problem-solver before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Generate an interactive problem-solving web page (single-page HTML) based on a user-uploaded problem, with an option to add the problem to a mistake notebook (saved to a local Excel file).

0 Downloads

Introduction source: third_party · user_d82e0b43 · 1.2.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Limits and differences
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: interactive-problem-solver
description: 根据用户上传的题目,生成交互式解题网页(单页HTML),并可选择将题目加入错题本(保存到本地Excel文件)
trigger:
  - 上传题目
  - 生成交互式解题
  - 交互式讲题
  - 题目动画
  - 错题本

交互式讲题 Skill

当用户上传题目时,自动生成单页 HTML 文件,包含交互式解题过程、动画演示和错题本功能。

功能特性

  • 📱 响应式设计,完美适配手机和电脑
  • 🎬 交互式动画演示(几何图形、函数图像等)
  • 📝 分步解题过程(可折叠/展开)
  • 📚 一键加入错题本(保存到本地 Excel 文件)
  • 🎨 支持数学公式(KaTeX)、图片、代码高亮
  • 📤 单文件 HTML,可离线打开和分享

使用流程

1. 用户上传题目

用户可以通过以下方式提供题目:

  • 直接输入题目文本
  • 上传题目图片(需要 OCR 识别)
  • 提供题目文件(PDF、Word、图片)

2. Skill 分析题目

识别题目类型:

  • 数学:代数、几何、函数、概率统计
  • 物理:力学、电学、光学、热学
  • 化学:化学反应、计算题
  • 其他:根据内容判断

3. Skill 生成解题网页

根据用户需求和题目类型,生成包含以下内容的 HTML 文件:

  • 题目展示区(支持公式、图片)
  • 分步解题过程(可交互展开)
  • 动画演示区(如果适用)
  • "加入错题本" 按钮

生成的 HTML 文件保存到工作目录

4. Skill 询问是否加入错题本

生成 HTML 后,Skill 会询问:

"是否将此题加入错题本?如果是,请告诉我是哪个孩子的错题(如:大宝、二宝)。"

如果用户确认,Skill 会:

  1. 将题目和答案添加到本地 Excel 文件(wrong-book.xlsx)
  2. Excel 文件包含:错题人、题目、答案、学科、难度、添加时间等字段
  3. 用户可以用 Excel/WPS 打开查看和编辑
  4. 通过"错题人"字段区分不同孩子的错题

5. 输出文件

  • 生成的 HTML 文件(可预览、可分享)
  • 更新的 Excel 错题本(如果选择加入)

错题本管理

Excel 文件结构

文件路径:wrong-book.xlsx(位于 Skill 目录下)

列名 说明 示例
ID 唯一标识 1719638400000
错题人 哪个孩子的错题 大宝 / 二宝
题目 题目名称 行程问题 - 相遇问题
学科 所属学科 数学
难度 简单/中等/困难 中等
题目内容 完整题目 甲、乙两城相距 240 公里...
答案/解析 详细解答 2.4 小时后相遇。步骤:...
错误原因 用户填写 公式记错
添加时间 时间戳 2026-06-29 09:00:00
日期 日期 2026/6/29

💡 提示:通过"错题人"字段可以筛选查看某个孩子的所有错题,方便针对性复习。

📁 文件路径:

  • 错题本文件保存在项目根目录下的 wrong-book.xlsx
  • 脚本会自动向上查找包含 .workbuddy 的目录作为项目根目录,无需手动指定路径
  • 运行 list 命令时可以确认文件路径是否正确

管理脚本

使用 scripts/wrong_book_manager.py 管理错题本:

# 添加错题(指定错题人)
python scripts/wrong_book_manager.py add --title "行程问题" --subject "数学" --content "题目内容..." --answer "答案..." --student "大宝"

# 查询错题
python scripts/wrong_book_manager.py list

# 搜索错题
python scripts/wrong_book_manager.py search --keyword "行程"

# 导出错题(JSON格式)
python scripts/wrong_book_manager.py export --output wrong-book.json

# 清空错题本
python scripts/wrong_book_manager.py clear

动画模板库

小学数学

模板文件 题型 特色
chicken-rabbit.html 鸡兔同笼 假设法/抬腿法动画、三种解法对比
fraction-word-problem.html 分数应用题 单位"1"分析、可视化条形图

初中数学

模板文件 题型 特色
journey.html 行程问题(相遇/追及) SVG 动画演示运动过程
function-graph.html 函数图像 Canvas 绘制函数曲线、参数滑块
pythagorean.html 勾股定理应用 直角三角形示意图、交互绘图
linear-function.html 一次函数应用题 分段函数绘图(如出租车计费)
gcd-problem.html 最大公约数 质因数分解可视化

初中物理

模板文件 题型 特色
speed-problem.html 速度/时间/路程 公式 v=s/t、单位换算、过程示意图

扩展(待添加)

题型 学科 计划动画
和差问题 小学数学 线段图
植树问题 小学数学 点线图
年龄问题 小学数学 时间轴
二元一次方程组 初中数学 代入法/消元法动画
不等式 初中数学 数轴表示
欧姆定律 初中物理 电路图、电流动画
密度计算 初中物理 天平/量筒图示

HTML 生成规范

文件结构

生成的 HTML 文件应包含:

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>题目名称</title>

    <!-- KaTeX 公式渲染 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
    <script src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>

    <!-- 样式 -->
    <style>
        /* 响应式布局 */
    </style>
</head>
<body>
    <div class="container">
        <!-- 1. 题目展示 -->
        <div class="problem-section">...</div>

        <!-- 2. 动画演示(如果适用) -->
        <div class="animation-section">...</div>

        <!-- 3. 解题步骤 -->
        <div class="solution-section">...</div>

        <!-- 4. 错题本按钮 -->
        <button onclick="addToWrongBook()">加入错题本</button>
    </div>

    <script>
        // 动画逻辑
        // 错题本功能(复制到剪贴板,提示用户运行 Skill 命令)
    </script>
</body>
</html>

"加入错题本" 按钮实现

由于浏览器安全限制,HTML 文件无法直接写入本地 Excel 文件。

实现方式(两步走):

第一步(HTML 页面中):

  1. 点击"加入错题本"按钮
  2. 将题目信息(题目、答案、学科等)以纯文本格式复制到剪贴板
  3. 提示用户:"题目信息已复制,请回到 WorkBuddy 对我说「将刚才的题目加入错题本」"

第二步(WorkBuddy Skill 中):

  1. 用户回到 WorkBuddy,发送"将刚才的题目加入错题本"
  2. Skill 运行 wrong_book_manager.py add ... 命令
  3. 将题目添加到本地 wrong-book.xlsx Excel 文件
  4. 返回确认信息

HTML 中的代码示例:

function addToWrongBook() {
    // 构建纯文本格式的题目信息
    const text = [
        '【题目】行程问题 - 相遇问题',
        '【学科】数学',
        '【难度】中等',
        '',
        '【题目内容】',
        '甲、乙两城相距 240 公里...',
        '',
        '【答案/解析】',
        '2.4 小时后相遇。步骤:...'
    ].join('\n');

    // 复制到剪贴板
    navigator.clipboard.writeText(text).then(() => {
        // 显示提示
        statusEl.innerHTML = '✅ 题目信息已复制!<br>请回到 WorkBuddy 对我说:<strong>「将刚才的题目加入错题本」</strong>';
    });
}

Skill 收到用户请求后执行的命令:

python scripts/wrong_book_manager.py add \
  --title "行程问题 - 相遇问题" \
  --subject "数学" \
  --difficulty "中等" \
  --content "甲、乙两城相距 240 公里..." \
  --answer "2.4 小时后相遇。步骤:..."

开发指南

添加新动画模板

  1. 在 templates/ 对应学科目录下创建 HTML 文件
  2. 使用 SVG + GSAP 或 Canvas 实现动画
  3. 提供参数化接口,方便根据题目数据动态生成
  4. 在本文档的"动画模板库"部分添加说明

测试生成的网页

  1. 用浏览器打开生成的 HTML 文件
  2. 测试手机端适配(Chrome DevTools 设备模拟)
  3. 验证动画交互是否正常
  4. 测试"加入错题本"功能(复制粘贴到 Skill)

注意事项

  • 生成的 HTML 文件应该是单文件,不依赖外部资源(除了 CDN 链接)
  • 动画性能考虑:避免过于复杂的动画导致手机端卡顿
  • 公式渲染:优先使用 KaTeX(速度快),复杂公式才用 MathJax
  • Excel 文件:使用 openpyxl 库操作,确保兼容性

示例

完整工作流程

  1. 用户输入:"上传题目:甲、乙两城相距 240 公里..."
  2. Skill 分析题目(数学 - 行程问题)
  3. Skill 生成 HTML 文件 journey-problem.html
  4. Skill 询问:"是否将此题加入错题本?"
  5. 用户确认
  6. Skill 运行 python scripts/wrong_book_manager.py add ...
  7. 题目已保存到 wrong-book.xlsx

文件列表

  • examples/journey-problem.html - 行程问题示例
  • examples/function-graph.html - 函数图像示例
  • scripts/wrong_book_manager.py - 错题本管理脚本
  • wrong-book.xlsx - 错题本 Excel 文件(自动生成)

版本:v2.0
最后更新:2026-06-29

Current listing version

1.2.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 直接解决学生/家长的核心学习痛点,提供交互式解题和错题管理功能
  • 支持多学科题目类型,涵盖数学、物理、化学等
  • 提供完整的错题本管理方案,支持多孩子错题区分
Trigger Precision85/100

Highlights

  • 触发词覆盖全面,包含'上传题目'、'生成交互式解题'、'错题本'等核心功能
  • 边界清晰,不易与其他Skill混淆
Structure and Standards88/100

Highlights

  • 文档结构完整,包含功能特性、使用流程、错题本管理、动画模板库等
  • 提供详细的HTML生成规范和管理脚本说明
  • 包含完整的示例和工作流程说明
Execution Reliability82/100

Highlights

  • 提供详细的错题本管理脚本和参数说明
  • HTML生成规范清晰,包含完整的文件结构和实现方式
  • 考虑了浏览器安全限制,提供两步走的错题本添加方案
Evidence Verifiability (mean of the first four)87/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • cdn.jsdelivr.net

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.