smartestu-homework-export is a reusable skill for exporting homework from smartestu.cn / 数你最灵 into a cleaner, reusable study format. It focuses on one practical path: find the latest unsubmitted homework, keep the original question order, preserve math formulas, and produce a readable PDF deliverable.
This repository packages a focused skill for one specific platform workflow:
- identify the latest unsubmitted Smartestu homework
- extract the questions in display order
- preserve formulas during export
- generate a PDF that is actually usable for reading or answering
It is not a generic LMS scraper and does not try to support every education platform.
The skill is designed around Smartestu's real homework workflow.
- resolves the school code first
- logs in with the expected Smartestu payload shape
- queries the homework list
- selects the latest unsubmitted assignment
- extracts ordered question content from the homework object itself
- exports the result through an HTML + KaTeX rendering path
- produces a printable PDF deliverable
- API-first workflow instead of fragile browser scraping
- question extraction in original display order
- formula-preserving HTML export with KaTeX
- PDF export standards that require real math rendering verification
- one-question-per-page output for answer-friendly handouts
- privacy-aware examples with placeholders instead of real account data
For this platform, API-first is more reliable than browser-first.
Browser automation is still useful for visual verification, but it should not be the primary extraction path when the underlying homework data can already be read from the API response. That keeps the workflow more stable and makes the exported output easier to control.
The skill follows this sequence:
GET /api/schoolsPOST /api/auth/loginPOST /api/homework/student/mark/queryHomeworks- flatten
courseHomeworkDTOList[].studentCourseHomeworkDTOList[] - filter
submission_status == "not_submitted" - sort by
endTimedescending - extract
exercises[].questions[]in array order - render formulas through HTML + KaTeX
- export a readable PDF
This repository keeps those platform-specific details because they are the whole point of the skill.
The PDF path is treated as part of the product, not as an afterthought.
The expected standard is:
- formulas must render as math, not raw
$...$ - server-side (Node.js) KaTeX pre-rendering is the verified method — Chrome headless
--print-to-pdfdoes NOT execute JavaScript - the default handout style should be readable instead of a continuous webpage dump
- prefer one question per page when the user wants to answer directly below each problem
- always HTML-escape
<,>,&in question text before rendering (LaTeX formulas like$P\{1<X<3\}$contain raw<that browsers interpret as HTML tags)
Place the skill directory where your skills are loaded.
A typical local layout is:
<your-skills-root>/smartestu-homework-export/
├── SKILL.md
├── README.md
└── README.zh-CN.md
If your environment uses a different skill discovery path, copy SKILL.md into the corresponding skills directory and keep the README files alongside it for maintenance.
Typical requests that should trigger this skill:
- "Export my latest unsubmitted Smartestu homework"
- "Get the newest 数你最灵 homework and package it for me"
- "Make this Smartestu homework into a PDF with formulas preserved"
- "Export the homework one question per page so I can answer below it"
The user will still need to provide live credentials during their own session when authentication is required. Those credentials should never be committed, documented in examples, or pasted into public issue threads.
{
"schoolCode": "<school_code>",
"schoolUserLocalId": "<student_local_id>",
"schoolUserId": "<school_user_id>",
"password": "<password>"
}{
"studentId": "<school_user_id>"
}These are placeholders only. This repository intentionally includes no real school, student, password, token, or session values.
- no live credentials, tokens, or session data are stored in this repository
- all examples should remain fictional placeholders
- credentials should be used only for the current session
- do not copy secrets into repository files, screenshots, GitHub issues, or chat logs
- if you fork or adapt this skill, keep the same sanitization standard
smartestu-homework-export/
├── SKILL.md
├── README.md
├── README.zh-CN.md
└── LICENSE
When updating the skill, keep these rules aligned:
- preserve the API-first workflow unless the platform itself changes
- update both English and Chinese READMEs together
- keep all examples sanitized
- keep the PDF rendering standard explicit
- verify that any new export path still preserves formulas correctly
This project is released under the MIT License. See LICENSE.