Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-devWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/moodle-web-services)<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/moodle-web-services"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/moodle-web-services/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/moodle-web-services"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/moodle-web-services.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02429 |
| Opus 5.5 | $0.00000 | $0.00972 |
| Sonnet 5.5 | $0.00000 | $0.00486 |
| Haiku 4.5 | $0.00000 | $0.00243 |
Grade A, and why
moodle-web-services scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -X POST "$SITE/webservice/rest/server.php" \ How it starts
The opening of the file, as written. The whole thing — 284 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Moodle Web Services
Overview
Moodle exposes plugin functions as web services via db/services.php + classes/external/<fn>.php. Same function is callable as REST, AJAX, SOAP, or XMLRPC. Authentication is token-based for external clients, session-based for AJAX. All inputs/outputs are typed via external_value / external_single_structure / external_multiple_structure.
When to Use
- Adding a function callable from mobile app, AMD JS, or external system
- Defining a service (bundle of functions) for an external client
- Issuing/managing tokens
- Returning files via web service
- Debugging "Invalid response value" or "Missing required parameter"
Skip when: building UI-only PHP (no remote callers) — use moodle-plugin-development.
File layout
<plugin>/
db/services.php # function + service definitions
classes/external/get_items.php # one file per external function
classes/external/get_items_returns.php # (optional) split returns
lang/en/<component>.php # service descriptions
db/services.php
<?php
defined('MOODLE_INTERNAL') || die();
$functions = [
'local_example_get_items' => [
'classname' => 'local_example\external\get_items',
'methodname' => 'execute', // default: 'execute'
'description' => 'Return items in a course',
'type' => 'read', // 'read' or 'write'
'ajax' => true, // callable from core/ajax
'capabilities' => 'local/example:view', // checked in addition to per-method checks
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE], // expose to mobile
],
'local_example_mark_present' => [
'classname' => 'local_example\external\mark_present',
'description' => 'Mark a user present',
'type' => 'write',
'ajax' => true,
'capabilities' => 'local/example:mark',
],
];
$services = [
'Example REST API' => [
'functions' => array_keys($functions),
'restrictedusers' => 1, // require explicit user assignment
'enabled' => 1,
'shortname' => 'local_example_api',
'downloadfiles' => 1,
'uploadfiles' => 0,
],
];
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 284 lines · 0 tokens per session scan A a59242ebd0eb
moodle-web-services is a cursor rule published in the GitHub repository SaadRahman01/claude-moodle-dev (43 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,429 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
moodle-web-services compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| moodle-web-servicesSaadRahman01/claude-moodle-dev | Cursor rule | 43 | 5mo ago | MIT | A | 0 | Cursor |
| standard-use-case-architecture-patternsPackmindHub/packmind | Cursor rule | 327 | 20d ago | Apache-2.0 | A | 513 | Cursor |
| standard-nestjs-module-hierarchyPackmindHub/packmind | Cursor rule | 327 | 20d ago | Apache-2.0 | A | 314 | Cursor |
| add-landing-templateclassroomio/classroomio | Cursor rule | 1.8k | today | AGPL-3.0 | A | 0 | Cursor |
| arcjet-nextjsarcjet/arcjet-plugin | Cursor rule | 1 | 19d ago | Apache-2.0 | A | 0 | Cursor |
| arcjet-expressarcjet/arcjet-plugin | Cursor rule | 1 | 19d ago | Apache-2.0 | A | 0 | Cursor |
| ecoconception-backendInstitut-du-Numerique-Responsable/skill-nr | Cursor rule | 8 | 19d ago | CC-BY-SA-4.0 | A | 652 | Cursor |