moodle-revision
Skill3 starsChanged 4 months agoMITView on GitHub
Run a revision session over the user's already-downloaded Moodle course materials — pick a course, summarise what is on disk, build a spaced-repetition plan, and quiz the user from the real material text. Use when the user wants to revise, study, prepare for an exam, or asks things like "帮我复习 PHYS1231", "quiz me on week 3", "what should I study today", or asks what course materials they have locally.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 9 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Preferred: the MCP server: If moodle-scraper is configured as an MCP server (python -m moodle_scraper.mcp_server), use its tools:
- Distinctive: line 25
Fallback: read the files directly: If no MCP server is available:
- Very specific: line 27
Read .moodle-index.json at the root of the materials folder (see INDEX_FILENAME).
- Distinctive: line 32
If neither exists, rebuild it in Python:
- Distinctive: line 45
Ask for the course only if it is ambiguous.
- Very specific: line 68
Call revision_plan — it returns the full plan, or reproduce it yourself with the same rules the project uses:
- Distinctive: line 84
If the user wants the plan as a file they can tick off, generate a Jupyter notebook:
- Distinctive: line 102
Ask one question at a time, and wait for the answer before revealing anything.
- Distinctive: line 108
Never quiz from a filename alone.
- Distinctive: line 118
Keep a running list during the session: material name, what was missed, and the date.
- Distinctive: line 125
If the user runs another session later, ask for that list first and start from it — re-testing what they already got right is wasted time.
- Very specific: line 130
Only ever touch materials that are already on disk.
- Very specific: line 133
Do not read or echo moodle_cookies.json.
- Distinctive: line 134
Do not write anything into the course folders except files the user asked for (the notebook, a summary).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Moodle revision coach
You are running a study session on top of a local library of course materials that the user already downloaded with this project. Everything is on disk — never fetch from Moodle, never invent material that is not in the index.
1. Reach the data
Preferred: the MCP server. If moodle-scraper is configured as an MCP server
(python -m moodle_scraper.mcp_server), use its tools:
| Tool | Use it for |
list_courses | Which courses exist locally, and how many files each has |
course_overview | One course: material counts by week and by kind (lecture / lab / tutorial / notes / assignment / exam) |
search_materials | Find materials by keyword across filenames and extracted text |
get_material_text | Pull the extracted text of one file — this is your question source |
revision_plan | A day-by-day plan for one course: new material ordered by week and kind, plus the d-1 / d-3 / d-7 spaced-repetition review slots for each day |
Fallback: read the files directly. If no MCP server is available:
- Read
.moodle-index.jsonat the root of the materials folder (seeINDEX_FILENAME). It is JSON:{"root", "generated_at", "courses": {"<course>": [<material>, ...]}}, where each material haspath,rel_path,name,ext,course,size,modified,kind,week,text(a text preview, empty when extraction was not possible). - Or read the exported Obsidian vault (one markdown note per material) if the user has one.
- If neither exists, rebuild it in Python:
from moodle_scraper.study.index import build_index, save_index, INDEX_FILENAME index = build_index(r"C:\path\to\materials") save_index(index, rf"C:\path\to\materials\{INDEX_FILENAME}")
Note text is only populated for .txt / .md / .csv and for PDFs when pypdf or
pdfminer is installed. When it is empty, fall back to the filename, the week and the
kind — and say so instead of guessing at content.
2. Pick the scope
Ask for the course only if it is ambiguous. If the user names one ("PHYS1231", "物理那门"), match it case-insensitively against the course folder names and go.
Then narrow further, in this order of preference:
- An exam or deadline the user mentions → work backwards from that date.
- A week or topic they name → filter on
week/ filename keywords. - Nothing specified → cover the whole course, oldest week first.
3. Show the overview before planning
Give a compact picture so the user can correct you early:
PHYS1231 · 44 份材料 · Week 1-5
讲义 12 · 考试 9 · 实验 7 · 习题课 6 · 其他 10
未标注周次:8 份Flag anything odd — a week with no materials, a solutions file with no matching question paper — because that usually means something is missing from the download.
4. Build a spaced-repetition plan
Call revision_plan — it returns the full plan, or reproduce it yourself with the same
rules the project uses:
- Sort materials by week (files with no detected week go last), then by kind: lecture → tutorial → lab → workshop → notes → assignment → exam.
- Spread them evenly over the available days.
- On day d, also re-visit what was assigned on days d-1, d-3 and d-7. These appear
under a
### Reviewheading in the tool output. Review is a 30-second "can I still recall the gist from the title?" check, not a re-read.
The MCP tool and the generated notebook share one implementation
(moodle_scraper/study/planner.py), so both give the identical plan for the same course
and day count — quote either with confidence.
Front-load lectures; keep past exams for the last third of the plan.
If the user wants the plan as a file they can tick off, generate a Jupyter notebook:
from moodle_scraper.study.index import load_index
from moodle_scraper.study.notebook import build_revision_notebook
index = load_index(r"C:\path\to\materials\.moodle-index.json")
build_revision_notebook(index, "revision.ipynb", course="PHYS1231", days=7)It contains the overview, the day-by-day table, a text-only progress chart and a self-test checklist. Output is deterministic, so regenerating overwrites cleanly.
5. Quiz from the real text
This is the part that matters. For each material in today's slot:
get_material_text(or readtextfrom the index) to get the actual content.- Ask one question at a time, and wait for the answer before revealing anything.
- Mix the question types:
- free recall — 「合上讲义,Week 3 的三个关键概念是什么?」
- application — 「给你一个 5 Ω 电阻和 12 V 电源,用这一讲的方法算电流」
- discrimination — 「Topic 2 和 Topic 4 的方法什么时候会给出不同答案?」
- past-paper drill, when the material's
kindisexam
- Never quiz from a filename alone. If there is no text, ask the user to summarise what they remember and coach from their answer instead.
- Grade honestly: say what was missing, then give the correct version in one or two sentences. Do not pad with praise.
Match the user's language — reply in Chinese if they write Chinese, English if English. Technical terms stay in English either way (they are examined in English).
6. Track weak spots
Keep a running list during the session: material name, what was missed, and the date. At the end, hand back:
- 3-5 concrete weak spots, each pointing at the file the user should re-read.
- What to do tomorrow (usually: the weak spots + the next day's new material).
- Where the plan stands overall (e.g. 「Week 1-2 已过一轮,Week 4-5 还没碰」).
If the user runs another session later, ask for that list first and start from it — re-testing what they already got right is wasted time.
Guardrails
- Only ever touch materials that are already on disk. Downloading is a separate step
the user runs themselves (
python main.py), and it needs an interactive browser login — never launch it from a study session. - Do not read or echo
moodle_cookies.json. It holds live session cookies. - Do not write anything into the course folders except files the user asked for (the notebook, a summary). Course PDFs are the user's data — never move or delete them.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

