agentleFS
Cassius2584Cassius2584/claude-uni-workspace/.claude/skills/sync-moodle/SKILL.md

sync-moodle

Skill5 starsChanged 25 days agoMITView on GitHub

Refresh the workspace from Moodle after setup. Reads each module's course page, compares with what was seen last time, adds or updates assessment notes for new or changed assignments, lists new files (downloads the ones the student picks), summarises new announcements, fills in weekly topics, and writes a short update digest. Use when the user says "refresh Moodle", "sync Moodle", "check Moodle for updates", "anything new on Moodle?", or at the start of a week.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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
  1. Distinctive:

    Run on demand, typically once a week.

    line 8
  2. Very specific:

    Read projects/PROFILE.md (VLE address) and every projects/*/MODULE.md with a moodle property (the course link).

    line 13
  3. Distinctive:

    No file means first sync: record everything as the baseline, and only report things that aren't already in the module's notes.

    line 22
  4. Very specific:

    Create an assessment note for each future sheet with item: "Problem Sheet N hand-in (predicted)", a blank due, and due_note: "Predicted …

    line 66
  5. Very specific:

    Update each module's .moodle-sync.json (seen, last_synced, announcements_seen_until).

    line 80
  6. Very specific:

    If any assessment note was added or changed, run python3 .claude/skills/create-study-timetable/scripts/sync_deadlines.py from the workspace …

    line 81
  7. Distinctive:

    Add one Log line to each MODULE.md that changed ("Moodle sync: 2 new files, GA1 brief released, …").

    line 84
  8. Very specific:

    Write projects/updates/<yyyy-mm-dd>.md (on the first sync, also copy projects/_template/MOODLE.md to projects/updates/MOODLE.md: the page …

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Sync Moodle

Run on demand, typically once a week. The student logs in; you never do. There's deliberately no automated version: Moodle sits behind the university's single sign-on (usually with 2FA), and its calendar export misses most of what changes (hidden assignments, dates written in page text, announcements, files).

0. Before you start

  • Read projects/PROFILE.md (VLE address) and every projects/*/MODULE.md with a moodle property (the course link). Modules without one (e.g. next semester's, not live yet) get a quick check on the VLE's course list: if the course has appeared, add its link to MODULE.md and treat it as new.
  • Each module keeps its sync state in a hidden file, projects/<module>/.moodle-sync.json:
    {"course_id": 12345, "last_synced": "2026-10-04",
     "seen": {"<activity id>": {"name": "…", "type": "assign|resource|page|forum|quiz|url|folder|…", "dates": "…"}},
     "announcements_seen_until": "2026-10-04T18:00:00Z"}
    No file means first sync: record everything as the baseline, and only report things that aren't already in the module's notes.

1. Log in (the student does this)

Open the VLE's course list (Moodle: /my/courses.php) in a browser tool the student can see. If you land on a login page, stop and ask them to sign in, making sure the browser is visible to them. Never type credentials. University single sign-on sessions can expire within hours, so expect to ask every time.

2. Read each course

Moodle tips (from real use):

  • Course pages lazy-load sections: request /course/view.php?id=<id>&section=<n> for n = 0…15 (stop after two empty sections) and collect /mod/<type>/view.php?id=<cmid> links with their names. Same-origin fetch() from a logged-in Moodle tab works; SSO-protected other sites (e.g. the unit catalogue) need real navigation instead.
  • Assignments (mod/assign): open each new or previously-dated one and read Opens / Due / Cut-off.
  • Dates in one place: Moodle's upcoming-events page, /calendar/view.php?view=upcoming (logged in), lists every dated item across courses, including "should be completed by" dates on weekly activities that don't show on the assignment page itself. Read it first, then fill gaps from the activity pages.
  • Announcements: open the course's Announcements forum (mod/forum) and read discussions newer than announcements_seen_until (title, date, author, gist). Forums are often reused year to year, so ignore posts from before the current academic year: they're last year's.
  • Resources (mod/resource): the real file is a pluginfile.php URL inside the page (load the view page in a hidden iframe or read its links).
  • Section text: look for dates written in prose ("spec released Thu 8 Oct", "register groups by Week 5").

Compare with seen and the module's assessment notes:

FoundDo
New assignment or dated activity that's graded, formative-with-deadline or adminCreate an assessment note from projects/_template/assessment.md in assessments/
Due date differs from its assessment noteUpdate the note's due/due_time, add a Log line "Moodle moved due date from X to Y", and flag it in the digest
Weekly ungraded activities (labs, quizzes, "should be completed" exercises)Don't make assessment notes (they'd flood the Board). Add them to the module's ## Weekly plan
A series of hand-ins (Problem Sheet 1, 2 …; fortnightly quizzes)See "Predicting recurring hand-ins" below
New filesList them in the digest with links. In a live session, offer to download (see step 3)
New announcementsSummarise in the digest (one line each); copy any dates or instructions into the relevant note
New weekly sections/topicsFill in the module's ## Weekly plan
Something disappeared or was renamedNote it; don't delete anything

Predicting recurring hand-ins

Problem sheets and similar hand-ins usually come on a cycle, but Moodle only shows what's been released. When a module has a numbered series:

  • Work out the cycle from what's visible: the interval between due dates, which chapters each sheet covers against the length of the notes, and any "sheets every two weeks" wording in the sheet, course page or handbook. One sheet is enough for a cautious guess: its chapter coverage against the total gives the likely number and spacing.
  • Create an assessment note for each future sheet with item: "Problem Sheet N hand-in (predicted)", a blank due, and due_note: "Predicted ~<date> (<pattern>); tbc on Moodle". The blank due keeps guesses out of date views, while the due_note still shows in "what's due?".
  • On each sync, when a predicted sheet appears: set due, drop "(predicted)", add a Log line, and flag it in the digest if the real date differs from the guess (so the study timetable's one-off blocks can move).
  • Record the pattern in MODULE.md (e.g. under ## Weekly plan), so it's visible and later syncs can check it.

3. Files (only if the student picks them)

Trigger downloads in the browser: they land in the student's Downloads folder. Browsers block rapid-fire downloads, so pace them (a hidden iframe per file, a few seconds apart). Move each into the module's resources/, lectures/ or coursework/<item>/ with a clear lowercase-hyphenated name, and log it. Course materials are the university's copyright: never commit or share them.

4. Write it down

  • Update each module's .moodle-sync.json (seen, last_synced, announcements_seen_until).
  • If any assessment note was added or changed, run python3 .claude/skills/create-study-timetable/scripts/sync_deadlines.py from the workspace root, so the calendar's all-day deadlines match.
  • Add one Log line to each MODULE.md that changed ("Moodle sync: 2 new files, GA1 brief released, …").
  • Write projects/updates/<yyyy-mm-dd>.md (on the first sync, also copy projects/_template/MOODLE.md to projects/updates/MOODLE.md: the page that lists every digest, linked from HOME):
    ---
    cssclasses: [notes]
    ---
    # Moodle update – <Sun 4 Oct 2026>
    ## Changed dates        ← first, because these matter most
    ## New deadlines
    ## Announcements
    ## New files            ← with "download?" in live sessions
    ## This week            ← weekly activities and topics, per module
    Link every item to its note with relative links. Skip empty sections, and if nothing changed, say so in one line.

5. Reply

Lead with changed dates and anything due within 7 days, then a one-line count per module. Offer the file downloads. Keep it short: the digest has the detail.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.