Agent Skills
返回列表
十六进制作业发布与排版

十六进制作业发布与排版

教育学习 更新于 2026.08.30

将以下提示词粘贴到你的 AI 对话框中:

请根据 https://skillhub.cn/install/skillhub.md,安装 @user_1ffa0952/hex-publish-homework

技能介绍

What this skill solves

Turning homework into a platform-ready assignment usually means moving in four directions at once: parse Word, PDF, or scanned images; normalize recognized exercise structures into the remote question bank; build the selection basket for a single homework document; then open the typesetting page without losing question order. Copying from chat into another format, then re-uploading, is a reliable way to create duplicates, wrong line breaks, and 3am debugging sessions.

This is an orchestration skill for that path. It does not require an MCP connector. Internally, scripts/hex_mcp_proxy.py plus scripts/hex_tool.py speak HTTP JSON-RPC directly to the remote mcp-server.

How it works

Step 1 delegates parsing and batch saving to hex-batch-exercises-solo, which handles both input routes:

  • Source A: file input. The path is getlastcourse → getcourseinfo → parse or multimodal-recognize Word/PDF/images → upload pictures → wrap mathrc span → list aliases → build exerciseList. (Humor note: the skill pretends mathrc is a polite way to introduce LaTeX; LaTeX is not impressed.)
  • Source B: already confirmed conversation. The skill reuses the confirmed structured questions directly. It must not convert those questions into Word, PDF, screenshots, or OCR images first.

Before savebatchexercises, the skill generates a preview and waits for user confirmation. It also keeps courseId, subject fields, exerciseIds, content fields, alias metadata, and score data for Step 2, writing them into ~/hex_work/ files such as exerciseList.json, ids.json, aliases.json, and save_selected_request.json.

Step 2 builds saveselectedexercise payloads. The important route is zero-field submission: the platform fetches ExerciseSubject, AnswersOptions, FillBlankAnswers, and ChoiceFillBlankAnswers from the question bank, so the request omits those keys entirely instead of passing null or empty strings. The only rich text that remains is subjective answers; SubjectiveAnswer is sent as plaintext HTML, not URL-encoded by the caller.

The helper scripts/build_save_selected.py assembles the request from Step 1 output: flat resSearchExercises, grouped includeExerciseElementDTOs, homework metadata, and continuous global question numbers. scripts/hex_tool.py then calls the remote tool.

Large workloads are fine. Submission can be split by topic or question range, provided each batch keeps the same CourseId, HteName, and HTEType; exercises are appended in submission order.

Step 2.5 handles incremental basket edits: saveselectedexercise adds, removeselectedexercise removes, and replacement is the pair, remove first, then add. scripts/build_remove_selected.py supports removing by original question number range or by ExerciseId.

Step 3 requests the typesetting redirect URL and returns it to the user. Only that final URL query value uses normal URL encoding; the skill does not perform extra template encoding inside the tool scripts.

Operating boundaries

The machine-readable flow needs Python 3 and httpx. macOS and Linux use python3; Windows uses python or py in single-line PowerShell commands. Round time defaults to 0 unless explicitly set somewhere else. Login is browser-based and auto-retried on 401, but this is a remote-side action, not magic.

Internal IDs such as courseId, ExerciseId, and ExerciseTypeAliasID are engine values. By default, the skill shows human-readable fields to the user and hides IDs except on explicit request.

Batching must not duplicate the same exercise. Each ExerciseId must come from Step 1's savebatchexercises result, and each exercise appears in only one batch. If an exercise was not saved successfully yet, the skill should finish that save first instead of trying to invent an ExerciseId.

What this skill does not do

No product marketing; no invented functions; no extra capabilities outside the documented pipeline.

It will not invent fake structured content, fake question IDs out of thin air, or turn build helpers into quasi-OCR units, so if a payload fails, fix the Step 1 state or the Step 2 grouping before retrying blindly (Humor note: blind retries apply to umbrellas, not platform submissions.).

使用场景

  • 老师要把 Word 试卷发布到十六进制(hexreakout.net)平台并进入排版页
  • 老师要把已确认的对话习题发布成一份作业,随时新增、移除或替换题号
  • 团队要按题型分批提交大批量题目,但保持 CourseId、HteName、HTEType 一致
  • 助教要从当前选题篮删除指定题目,或清空重新选题

适合人员

  • 教师 / stepwise exam publisher: 我平时要把 Word、PDF、拍照试卷发布到平台,希望作业流程能直接进入排版页 FAQ
  • 助教 / question bank operator: 我需要按题型批量入库、调试题型别名,还要在学校排期变化时快速清空重选题目 FAQ
  • 备考软件维护者 / MCP orchestration developer: 我要把题库题干、选项、答案和解析组装为 saveselectedexercise 等工具的输入,尤其关心大 payload 和重头成功重试 FAQ
  • AI-assisted homework integrator / LLM agent engineer: 我在对话里确认题目后需要快速发布成作业,还要支持“再看一组”“删第五题”“清空重选”等编辑操作 FAQ