🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Moodle Connector Skill

by @jabir-srj

Moodle REST API client, batch downloader, and MCP server for Claude Code integration

πŸ’‘ Examples

1. Setup Moodle Token

cp config.template.json config.json

Edit config.json with your Moodle web service token

2. Use CLI

python moodle_connector.py courses        # List all courses
python moodle_connector.py grades         # Check grades
python moodle_connector.py assignments    # View assignments
python moodle_connector.py materials --course-id 44864
python moodle_connector.py download "https://mytimes.taylors.edu.my/..." --output myfile.pdf
python moodle_connector.py summary        # Full markdown export

3. Use Python Library

from moodle_connector import MoodleConnector
from pathlib import Path

connector = MoodleConnector( config_path=Path('config.json'), password='encryption-password' )

courses = connector.courses() grades = connector.grades() assignments = connector.assignments() materials = connector.materials() deadlines = connector.deadlines() announcements = connector.announcements() content = connector.summary()

Download with caching

file_content = connector.download("https://...")

4. Batch Download (Any Module)

cp downloads.example.json downloads.json

Edit downloads.json to add modules and file URLs

python batch_downloader.py

Output Structure:

downloads/
β”œβ”€β”€ Your_Module_Name_1/
β”‚   β”œβ”€β”€ file1.pdf
β”‚   β”œβ”€β”€ file2.zip
β”‚   └── ...
└── Your_Module_Name_2/
    β”œβ”€β”€ lecture.pdf
    └── ...

βš™οΈ Configuration

Moodle Token (config.json)

{
  "moodle": {
    "base_url": "https://mytimes.taylors.edu.my",
    "web_service_token": "YOUR_TOKEN_HERE"
  },
  "cache": {
    "api_ttl_seconds": 300
  }
}

Batch Downloader (downloads.json)

{
  "downloads": [
    {
      "module": "Machine Learning",
      "course_id": 44864,
      "files": [
        {
          "name": "Week1.zip",
          "url": "https://mytimes.taylors.edu.my/webservice/pluginfile.php/..."
        }
      ]
    }
  ]
}

πŸ“‹ Tips & Best Practices

"Invalid parameter value detected" for calendar API

Use assignments() instead β€” gets same deadline info.

Browser MFA not triggering

Run: python moodle_connector.py login for manual token retrieval.

File download stuck

Check network. Increase timeout in code or clear cache: rm -rf cache/

View on ClawHub
TERMINAL
clawhub install moodle-connector-skill

πŸ§ͺ Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

πŸ” Can't find the right skill?

Search 60,000+ AI agent skills β€” free, no login needed.

Search Skills β†’