Moodle-Claw Skill
name: moodle-claw
by 4strium · published 2026-04-01
$ claw add gh:4strium/4strium-moodle-claw---
name: moodle-claw
description: Interact with Moodle LMS to browse courses, access learning materials, and answer questions about course content.
license: GPL-3.0
metadata:
author: Romain M.
version: "1.0"
homepage: https://github.com/4strium/moodle-claw
repository: https://github.com/4strium/moodle-claw
---
# Moodle-Claw Skill
This skill allows you to interact with a Moodle learning management system (LMS) to help users with their courses, assignments, and learning materials.
Setup
If `moodle-claw` binary is missing, download it:
URL="https://github.com/4strium/moodle-claw/releases/download/v1.0/moodle-claw"
SHA256="0ce9e6ad4e42c626ebe2c4ce79bde23da3386dc8e4b54a87da0a345a1a0252aa"
curl -L -o moodle-claw "$URL"
echo "$SHA256 moodle-claw" | sha256sum -c -
chmod +x moodle-claw
Configuration
Before using moodle-claw commands, the user needs to configure their Moodle connection:
moodle-claw configureThis will interactively prompt for:
1. **Moodle server URL** - e.g., `https://moodle.university.edu`
2. **Authentication method** - Token (direct), SSO (redirect URL), or Username/Password
3. **Download path** - Where to save downloaded files
Authentication Methods
#### Option 1: Direct Token
If you already have a 32-character hex token:
moodle-claw configure --url https://moodle.example.com --token YOUR_32_CHAR_TOKEN --path ~/Documents/Moodle#### Option 2: SSO Authentication (recommended for universities)
For institutions using SSO (Single Sign-On):
1. **Log into your Moodle account** in a web browser
2. **Open the developer console** (press F12) and go to the **Network** tab
3. **Visit this URL** in the same browser tab (replace with your Moodle URL):
```
https://YOUR_MOODLE_URL/admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=12345&urlscheme=moodlemobile
```
4. **The page will fail to load** - this is expected! An error will occur.
5. **In the Network tab**, find the failed request (it should be red/failed)
6. **Right-click** on the failed request > **Copy** > **Copy link address**
- The URL looks like: `moodlemobile://token=BASE64_ENCODED_STRING`
7. **Use the copied URL**:
```bash
moodle-claw configure --url https://moodle.example.com --sso-url "moodlemobile://token=..." --path ~/Documents/Moodle
```
Or use interactive mode and select "SSO (redirect URL)":
moodle-claw configure#### Option 3: Username/Password
For institutions allowing direct login:
moodle-claw configure --url https://moodle.example.com --username your_user --password your_pass --path ~/Documents/MoodleAvailable Commands
Check Status
moodle-claw status [--output json]Shows current configuration and connection status.
List Courses
moodle-claw courses [--filter "math"] [--refresh] [--output json]Lists all enrolled courses. Use `--refresh` to fetch latest from server.
View Course Content
moodle-claw content "Course Name" [--section "TD2"] [--output json]
moodle-claw content 12345 # by course IDShows the structure of a course (sections, modules, files).
Search Content
moodle-claw search "exercise" [--course "Physics"] [--type file] [--output json]Searches for content across courses.
Download Files
moodle-claw get "Course/Section/file.pdf" [--course "Math"] [--dest /tmp]
moodle-claw get --url "https://moodle.../pluginfile.php/..." [--dest /tmp]
# Extract text from PDF files (recommended for reading content)
moodle-claw get "file.pdf" --text --output jsonDownloads a file and returns its local path. Use `--text` (`-t`) to automatically extract text content from PDF files.
Sync Course
moodle-claw sync "Course Name" [--dest ~/Courses] [--no-confirm]
moodle-claw sync # syncs all enabled coursesDownloads all files from a course.
Usage Patterns
When user asks about a course
1. First, list courses to find the right one: `moodle-claw courses --filter "keyword"`
2. Then get its content: `moodle-claw content "Course Name"`
3. If needed, download specific files: `moodle-claw get "path/to/file.pdf"`
When user asks about specific content (e.g., "TD2", "exercise 3")
1. Search for the content: `moodle-claw search "TD2" --course "Course Name"`
2. Download and extract text from PDF: `moodle-claw get "path/to/file.pdf" --text`
3. The extracted text will be included in the output for you to analyze
When user wants to work offline
1. Sync the entire course: `moodle-claw sync "Course Name" --no-confirm`
2. Files will be available locally for reading
Output Formats
All commands support `--output json` for structured output, or the default markdown format for human readability.
Example Interactions
**User**: "Explique-moi le cours de mécanique"
# 1. Find the course
moodle-claw courses --filter "mécanique" --output json
# 2. Get course structure
moodle-claw content "Mécanique" --output json
# 3. Download relevant materials and explain
moodle-claw get "Mécanique/Chapitre 1/cours.pdf" --output json**User**: "Quel est l'exercice 3 du TD2 en maths?"
# 1. Search for TD2 in math course
moodle-claw search "TD2" --course "maths" --output json
# 2. Download the TD2 file and extract text
moodle-claw get "TD2.pdf" --course "maths" --text --output json
# The text content will be in the JSON output for you to analyze**User**: "Télécharge tous les fichiers du cours de physique"
moodle-claw sync "Physique" --no-confirmNotes
Security / Vetting
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...