Agent skill

Lecture to Homework

by vect-G in vect-G/lecture-to-hw

Turns course slides, homework files, class code and earlier solutions into concise student-style Markdown answers, with optional subagents for solving and review.

MITAuto-check passedEducation

SKILL.md written in Chinese; this summary is our English description.

Install Lecture to Homework

skills CLI
$ npx skills add vect-G/lecture-to-hw --skill lecture-to-hw -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vect-G/lecture-to-hw lecture-to-hw --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
lecture-to-hw
GitHub stars
127
Token cost
~729 tokens
SKILL.md length
159 words
Files
6
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Turns course slides, homework files, class code and earlier solutions into concise student-style Markdown answers, with optional subagents for solving and review.

  • Works in 9 steps: 扫描当前课程目录。 → 读取作业要求。 → 匹配课件和代码。 → …
  • Writing up a course assignment from lecture slides and class code
  • SKILL.md covers 工作流, 答案风格 and 最终回复
  • Calls rg, pdftotext and conda

What it does

The agent scans the course folder for assignments, slides, class code, notebooks, data and earlier solutions, and reads each homework file in a way that suits its format: `pdftotext` for PDFs, rendered pages to check formulas and tables in Word files, and OCR for images. It stops to ask you when a question or file is unclear. It then matches each problem to the course's own slides, terminology and code, avoids methods beyond the course, and copies only the format habits of earlier solutions, not their content.

The main agent acts as controller and may use up to four subagents on independent sub-questions, but only the controller edits the final Markdown. Symbolic problems are derived by hand, numerical ones get minimal reproducible code in a new solution folder, and the answer file uses Markdown with LaTeX, short headings and no filler. A review pass checks every sub-question, formulas, numbers and file names, and a critic subagent can look at larger jobs. The final reply gives a high, medium or low confidence level and points to what you should verify. The instructions are in Chinese.

When your agent uses it

  • Writing up a course assignment from lecture slides and class code
  • Splitting a multi-part assignment across subagents with a final review
  • Matching a new homework's formatting to earlier solution files

Example prompts

  • “Complete hw5 for my machine learning course using the slides in ./lectures and the style of hw4_solution.”
  • “Read the homework PDF, find the matching slides and tell me which problems use methods from class.”
  • “Run the review pass on my hw3 answers and rate the confidence for each problem.”

Requirements

  • Poppler tools such as `pdftotext` and `pdftoppm`
  • ripgrep (`rg`)
  • Python, for code-based solutions

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. 扫描当前课程目录。
  2. 读取作业要求。
  3. 匹配课件和代码。
  4. 学习历史答案风格。
  5. 决定单 agent 还是并行模式。
  6. 解题并验证。
  7. 生成输出。
  8. 提交前 review。
  9. 做组装后 review。

What it can do on your machine

Read from SKILL.md and the folder at commit 75654b2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rg
    • pdftotext
    • conda

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Lecture to Homework loads about 729 tokens when it runs. Until then it costs about 115 tokens; SKILL.md has 159 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~729

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vect-G/lecture-to-hw at commit 75654b2, republished under its MIT licence (© vect-G). 159 words, ~729 tokens.

Download SKILL.mdSave it as .claude/skills/lecture-to-hw/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
lecture-to-hw
description
将课程课件、作业文件(PDF、DOCX、Markdown、HTML、图片等)、课堂代码和历史答案格式转成简洁的大学生风格 Markdown 作业答案,并可由主 agent 按模块调度子代理解题与 review。Use when asked to complete course homework, read homework files in varied formats, match homework to lectures/slides/code, use methods taught in class, imitate previous hw*_solution Markdown style, create solution folders, decompose assignments across subagents, or generate necessary scripts, figures, or data files for homework submissions.

Lecture to HW

工作流

  1. 扫描当前课程目录。

    • 优先用 rg --files,必要时配合 find、ls 和定向 rg。
    • 找出作业文件、课件、课堂代码、notebook、HTML demo、数据、图片和历史 solution。
    • 作业题目可能是 PDF、DOCX、DOC、Markdown、HTML、notebook、纯文本、图片或压缩包中的文件。
    • 根据 hw 编号、课件编号、文件名关键词和目录结构推断对应关系,不假设命名一定规范。
  2. 读取作业要求。

    • PDF 作业优先用 pdftotext -layout 提取。
    • DOCX/DOC 作业不要只信纯文本提取;优先读取正文结构,并尽量转换成 PDF 或渲染页面检查公式、表格、图片和版面。可用 LibreOffice、pandoc、系统预览/打印、或现有文档工具链,选择当前环境可用且不破坏原文件的方法。
    • Markdown、HTML、notebook 和纯文本可以直接读取;图片题目需要 OCR 或视觉识别,并保留不确定处。
    • 如果公式、图、表格或版面可能被误读,用 pdftoppm 渲染页面或做视觉检查。
    • 提取每道题的任务、给定数据、输出要求、方法限制、保留小数规则,以及是否需要代码或图片。
    • 如果题目识别不完整、公式/表格无法确认、多个文件可能都是作业要求,先向用户说明不确定点并请求确认,不要一气乱写。
  3. 匹配课件和代码。

    • 用题目关键词搜索课件和代码,例如搜索、CSP、博弈、线性回归、逻辑回归、MLP、CNN、强化学习等。
    • 优先采用匹配课件里的术语、公式、算法、记号和解题粒度。
    • 如果课堂代码、HTML demo、实验报告、notebook 或数据能直接支持答案,优先复用。
    • 除非题目要求,不引入明显超出课程范围的高级方法。
  4. 学习历史答案风格。

    • 读取最近或最相关的历史 Markdown,例如 作业/hw*_solution/*.md。
    • 只提取格式习惯,不照抄内容:标题、姓名/学号/班级行、标题层级、公式写法、表格风格、图片引用和答案长度。
    • 默认写成认真大学生提交作业的口吻:简洁、只踩采分点、有必要中间步骤、不写废话。
  5. 决定单 agent 还是并行模式。

    • 先由主 agent 充当 controller,负责读题、拆题、调度、验收和最终组装。
    • 如果题目能按独立小问、实验模块、课件章节或数据流程清楚解耦,并且各部分没有强依赖,就可以开启并行模式。
    • 默认最多同时 4 个子代理;如果用户明确需要更多,且任务仍然能安全拆分,可少量增加,但不要为了并行而并行。
    • 如果题面不清楚、格式识别不稳、题目很短、或多个小问彼此强耦合,就用单 agent 模式。
    • 子代理只做边界清楚的任务,例如某道题的草稿、某个实验复现、某份课件对应关系确认、或独立 critic。
    • 不要让多个子代理同时改同一个最终 Markdown;主 agent 统一收口、去重和定稿。
  6. 解题并验证。

    • 符号推导题用手算推导。
    • 数值、实验、绘图、模型、搜索或仿真题,在 solution 文件夹里写最小可复现代码。
    • 优先使用用户指定环境,例如 conda run -n PR python ...;未指定时使用当前可用 Python。
    • 代码保持短小,只服务于作业结果。运行后把必要结果写入 Markdown。
  7. 生成输出。

    • 每次作业创建独立目录,例如 作业/hw5_solution/。
    • 至少输出一个 Markdown 答案文件,例如 hw5 姓名.md,文件名尽量匹配历史习惯。
    • 只添加必要附件:脚本、图片、数据或题目要求的文件。
    • 不生成无关 README、日志、空模板或没用上的脚手架。
  8. 提交前 review。

    • 重新阅读作业、对应课件、生成的 Markdown 和支持代码。
    • 检查每个小问是否回答完整。
    • 检查公式、正负号、维度、索引、小数、表格、图片、文件名和题号。
    • 检查代码能运行,Markdown 中的数值来自验证结果。
    • 删掉明显 AI 味:长背景、空泛总结、过多小标题、夸张解释、无依据结论。
  9. 做组装后 review。

    • 先看主 agent 自己的把握:如果工程量大、题目复杂、或仍有不确定点,就再开一个老师/助教视角的 critic 子代理。
    • critic 先读作业和对应课件,再检查生成的 Markdown 与代码,重点看是否漏题、是否有逻辑/公式/数值错误、是否用了不符合课件的方法、是否有明显 AI 味。
    • 主 agent 根据 critic 意见修正后再交付。
    • 最终回复里给出可信度分级(高/中/低)和需要用户手动复核的地方。

答案风格

  • 使用 Markdown 和 LaTeX 公式。
  • 小标题短而少。
  • 优先用直接计算、紧凑表格和必要的最终结论。
  • 写必要中间步骤,但不过度解释常规定义。
  • 如果历史答案里有姓名、学号、班级,沿用对应格式。
  • 语气朴素、认真,像学生自己写的作业。
  • 避免“本文将”“综上所述”“作为 AI”、大段背景介绍、动机说明和装饰性总结。

最终回复

简短说明:

  • 生成了哪些文件、在哪里;
  • 跑了哪些验证或检查;
  • review 后修了什么;
  • 当前作业可信度:高/中/低,并说明原因;
  • 需要用户手动复核的地方,如果有。

© vect-G, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files in the repository root of vect-G/lecture-to-hw.

  • SKILL.md
  • .gitignore
  • LICENSE
  • README.md
  • README_EN.md
  • agents/openai.yaml

Open the folder on GitHubat commit 75654b2

Compare with similar skills

Lecture to Homework next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Lecture to Homework compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lecture to Homework this skillvect-G/lecture-to-hw127—~729Automated safety check: PassMIT
PDF Processing GuideshareAI-lab/learn-claude-code78k4 repos~646Automated safety check: PassMIT
DOCX ToolkitXiaomiMiMo/MiMo-Code14k—~2.4kAutomated safety check: PassApache-2.0
Aigc Detectorfree-revalution/AIGC-Detector-Pro142—~2.8kAutomated safety check: PassMIT
DOCX Processing Toolkittelagod/code-abyss244—~668Automated safety check: NotesMIT
PowerPoint PPTX ToolkitXiaomiMiMo/MiMo-Code14k—~6.8kAutomated safety check: NotesApache-2.0

Similar skills

  • PDF Processing Guide

    shareAI-lab/learn-claude-code

    Gives the agent command-line and Python recipes for reading, creating, merging and splitting PDF files, plus tips for large and scanned documents.

    78k GitHub starsUsed in 4 repos~646 tokens
    Documents & OfficeAuto-check passed
  • DOCX Toolkit

    XiaomiMiMo/MiMo-Code

    Produces, edits and reads Microsoft Word files through python-docx and lxml, with a decision table for picking the lightest workflow for a given task.

    14k GitHub stars~2.4k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed
  • Aigc Detector

    free-revalution/AIGC-Detector-Pro

    Academic paper AI content detection, rewriting, and thesis writing assistant.

    142 GitHub stars~2.8k tokensUpdated 4 mo ago
    EducationAuto-check passed
  • DOCX Processing Toolkit

    telagod/code-abyss

    Routes Word document tasks to the right tool: pandoc for text, raw OOXML for structure and comments, docx-js for new files, and a mandatory redlining flow for edits to others' documents.

    244 GitHub stars~668 tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes
  • PowerPoint PPTX Toolkit

    XiaomiMiMo/MiMo-Code

    Creates, edits and reads PowerPoint .pptx files with python-pptx or PptxGenJS, with scripts for XML edits, text dumps, PDF and image rendering, and thumbnails.

    14k GitHub stars~6.8k tokensUpdated 2 days ago
    Documents & OfficeAuto-check: notes
  • Builds a scoring-aligned outline for a mathematical modeling paper and a model selection plan with baseline, improvement and validation experiments.

    454 GitHub starsUsed in 1 repo~1.8k tokens
    EducationAuto-check passed

Questions about Lecture to Homework

What does Lecture to Homework do?

Turns course slides, homework files, class code and earlier solutions into concise student-style Markdown answers, with optional subagents for solving and review. The agent scans the course folder for assignments, slides, class code, notebooks, data and earlier solutions, and reads each homework file in a way that suits its format: `pdftotext` for PDFs, rendered pages to check formulas and tables in Word files, and OCR for images. It stops to ask you when a question or file is unclear.

When should I use Lecture to Homework?

Lecture to Homework fits situations like: writing up a course assignment from lecture slides and class code; splitting a multi-part assignment across subagents with a final review; matching a new homework's formatting to earlier solution files.

How do I install Lecture to Homework in Claude Code?

Run `npx skills add vect-G/lecture-to-hw --skill lecture-to-hw -a claude-code`. Or copy the skill folder (the vect-G/lecture-to-hw repository) into .claude/skills/lecture-to-hw in your project. Claude Code loads it when a task matches its description.

How do I install Lecture to Homework in Codex?

Run `npx skills add vect-G/lecture-to-hw --skill lecture-to-hw -a codex`. Or copy the skill folder (the vect-G/lecture-to-hw repository) into .agents/skills/lecture-to-hw in your project. Codex loads it when a task matches its description.

Can I use Lecture to Homework in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vect-G/lecture-to-hw --skill lecture-to-hw -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lecture-to-hw, .gemini/skills/lecture-to-hw, .github/skills/lecture-to-hw and .opencode/skills/lecture-to-hw in your project.

What does Lecture to Homework need to run?

Going by SKILL.md and its folder, Lecture to Homework needs the command-line tools its instructions call (rg, pdftotext and conda). Our summary lists: Poppler tools such as `pdftotext` and `pdftoppm`; ripgrep (`rg`); Python, for code-based solutions.

Does Lecture to Homework access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Lecture to Homework safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Lecture to Homework use?

Lecture to Homework is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lecture to Homework use?

About 729 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Lecture to Homework?

Skills that share tags, products or a category with Lecture to Homework: PDF Processing Guide (shareAI-lab/learn-claude-code, 78k stars), DOCX Toolkit (XiaomiMiMo/MiMo-Code, 14k stars), Aigc Detector (free-revalution/AIGC-Detector-Pro, 142 stars) and DOCX Processing Toolkit (telagod/code-abyss, 244 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lecture to Homework?

vect-G (a GitHub user) maintains it in vect-G/lecture-to-hw, which has 127 GitHub stars. The repository was last updated on May 8, 2026.

Source: vect-G/lecture-to-hw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.