Skip to content

weishao2/tizhuang-agent-skills / skills/tizhuang-local-bank

tizhuang-local-bank

Verified

老师的本地题库(Obsidian 兼容,不需要账号或插件):把 PDF 试卷还原成可编辑题目入库、下载题庄知识树并给题目分类、按教材/章节/考点/标签检索、核对后组卷并生成无答案 Word/打印稿与教师答案稿。用于“本地题库、Obsidian 题库、PDF 试卷入库、题目分类、找题、组卷、出 Word 试卷、导出题目包”。仅供教师备课打印,不做学生端。在线取题属于可选的旧 question-bank skill。Teacher-side local question bank: PDF import, knowledge-tree classification, search, paper assembly (DOCX/HTML).

references/paper-basket.md

View on GitHub
# 本地可视化组卷篮

插件和新 skill 共用 `.bank/paper-basket.json`,无需安装旧 question-bank。老师在“我的题目”中勾选,跨教材、知识点和标签筛选保留选择;组卷篮里可拖动或上下移、设每题分值、试卷标题、考试时间与作答留白。最多 200 题。重复勾选不重复加题。

```json
{
  "schema": "tizhuang.paper-basket/v1",
  "title": "一次函数随堂练习",
  "duration_minutes": 40,
  "answer_space_mm": 25,
  "items": [
    {"question_id": "local-question-id-2", "score": 7.5},
    {"question_id": "local-question-id-1", "score": 5}
  ]
}
```

ID 来自本地题目,不是网站题号。`items` 顺序即打印题序;本卷分值允许 0—1000,不写回题目默认分值。时长为 1—600 整数分钟,留白为 0—100 整数毫米。网站题和 PDF 题可混用;不要凭空添加题目 ID,不静默跨老师指定的教材范围补题。

```text
<python> <cli> --vault <vault> paper --basket <basket.json> --plan
<python> <cli> --vault <vault> paper --basket <basket.json>
```

生成必须使用已核对的题目。插件只在老师主动勾选“我已逐题核对…”后,才传入 `--confirm-reviewed`。Agent 不能因为“组卷”或“导入”请求就自动添加此参数;需要老师已经明确核对题干、答案和图片。该选项会备份并修改所选草稿的审核状态,保留自定义属性、正文及批注。缺题、无效分值、未登记/损坏图片、生成期间笔记变化均报错。

只输出已有答案;未提供答案的题在教师版标明“原题未提供答案”。PDF 按可编辑 v2 流程去除原卷题号,保留独立配图中的数学标注;原题号仅保留在来源记录,组卷时按当前顺序重新编号。

插件生成前将不可变请求写入 `.bank/paper-requests/<request_id>.json`,编号为 32 位十六进制。响应丢失时用同一请求重试,可恢复已生成结果,不创建重复卷。内容改变必须使用新编号;`--plan` 不写入题库。CLI 可省略编号,表示每次有意生成新卷。

输出沿用 `tizhuang.paper/v1`,包括本卷题序、分值、生成时完整快照和输出哈希:

- `试卷/<名称 · 编号>/打印稿/试卷.html`:无答案试卷,只携带题干使用的图片。
- `打印稿/试卷.docx`:无答案 Word,文字、常见公式、表格可编辑,图片直接嵌入文件。
- `教师稿/试卷.docx`:可编辑的教师答案 Word,包含原答案及解析。
- `教师稿/试卷.html`:题干、原答案及解析,包括答案需要的本地图。
- `试卷.md` 和 `manifest.json`:本地试卷记录和含答案的内部快照。

两版可分别在浏览器打开打印或保存为 PDF。不把教师稿、manifest 或整个父目录当作无答案版交付。页面没有远程字体、模型或数学排版依赖;TeX 沿用新 skill 的离线 MathML 渲染。

## 题庄能力复用

插件内置的学科学段建议时长直接来自网站 `site/app/builder/paperStandards.ts`,复制时记录文件哈希。每题 0—1000 分、时长 1—600 分钟、题序与题目快照规则对齐网站 Builder;纸张标题、考生信息、分值、白纸打印样式按网站纸张视图适配成本地模板。

网站当前 `POST /v1/account/papers/{paper_id}/items` 需要账号会话、云端题目 ID,且会扣一次题目额度。它不是本地已下载题/PDF 题的免费渲染接口。因此本地生成使用随插件携带的同一新 skill 引擎,不上传私人题库,不调用该接口,不读取旧 skill 凭证。网站在线组卷仍是可选的独立入口;本版本不声称已同步云端试卷。

## Agent 组卷和 Word 编辑

Agent 可直接使用本地 skill,不依赖旧 question-bank。先 `search` 限定用户指定教材/章节/标签并读取候选题,再用 `paper ... --plan` 检查题量;需要定序、分值时创建上述 basket JSON,`items` 按最终题序排列,最后执行 `paper --basket <JSON>`。先检查每题分值之和是否满足总分,不随意编题补足或擅自改变教材范围。按难度排序需查看真实难度及题干;无难度数据时说明依据。

例如老师说“从我的一次函数题库选 10 道已核对题,基础题在前,每题 10 分,生成学生卷和教师答案 Word”,Agent 检索、挑选后可以生成同样的双版。若老师希望先在插件调整,在插件空闲时保存符合协议的 `.bank/paper-basket.json`(变更时移除旧 request_id、last_result),再提示刷新本地题库。默认用独立的 Agent 请求文件,不覆盖老师尚在编辑的篮子。

所有新卷默认同时生成 Word 与 HTML,不需要 Word 软件参与生成。打开和编辑 DOCX 需要本机已关联的文档软件。常见 TeX 使用离线 MathML → OMML 转为 Word 原生公式;原图公式、配图、扫描题仍是图片,不假称全可编辑。图片按原色嵌入,可单独传送 DOCX。旧图片草稿中的题号与答案提示不会自动擦除,应先按 PDF 升级流程还原为可编辑正文并裁出独立配图;正式发放前仍需核对。

生成结果新增 `student_docx` 和 `teacher_docx`。旧版请求重试返回原有 HTML;插件升级后首次新生成使用新请求号,保留旧卷。老师在 Word 中的修改仅作用于该文件,不自动回写题库;如需再次组卷,开始新一版,不覆盖手工编辑版。同一请求重试时会校验所有输出,发现修改则停止。

依赖见 scripts/requirements.txt。不支持的 Word 公式、图片或合并单元格会明确报错,不发布半份试卷。无答案 DOCX 不携带答案字段、答案图、原网站响应或内部 manifest。
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall