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-privacy-gdpr)<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/moodle-privacy-gdpr"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/moodle-privacy-gdpr/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-privacy-gdpr"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/moodle-privacy-gdpr.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.02390 |
| Opus 5 | $0.00000 | $0.01195 |
| Sonnet 5 | $0.00000 | $0.00478 |
| Haiku 4.5 | $0.00000 | $0.00239 |
Grade A, and why
moodle-privacy-gdpr scanned grade A with 0 findings 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 9d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 268 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Moodle Privacy / GDPR
Overview
Every Moodle plugin must declare a privacy provider in classes/privacy/provider.php. The provider tells Moodle what user data the plugin stores so that the data export and deletion workflows (Site admin > Users > Privacy) work correctly. Without a provider, the privacy compliance report flags the plugin.
When to Use
- Creating any new plugin (mandatory)
- Adding a DB table that stores user-identifying data
- Reviewing privacy compliance for plugin directory submission
- Responding to a GDPR data subject request
Skip when: the plugin only ships static files / no DB tables — still needs null_provider though.
Decision tree
Plugin stores no user-identifying data?
└── implement \core_privacy\local\metadata\null_provider
Plugin stores user data, all of it via core subsystems (files, comments, ratings)?
└── implement \core_privacy\local\metadata\provider
+ link subsystems via add_subsystem_link
Plugin stores user data in its own tables?
└── implement \core_privacy\local\metadata\provider
+ \core_privacy\local\request\plugin\provider
+ \core_privacy\local\request\core_userlist_provider
Null provider (no user data)
<?php
namespace local_example\privacy;
defined('MOODLE_INTERNAL') || die();
class provider implements \core_privacy\local\metadata\null_provider {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
Lang string lang/en/local_example.php:
$string['privacy:metadata'] = 'The Example plugin does not store any personal data.';
Full provider (plugin tables hold user data)
<?php
namespace local_example\privacy;
defined('MOODLE_INTERNAL') || die();
use core_privacy\local\metadata\collection;
use core_privacy\local\request\approved_contextlist;
use core_privacy\local\request\approved_userlist;
use core_privacy\local\request\contextlist;
use core_privacy\local\request\userlist;
use core_privacy\local\request\writer;
class provider implements
\core_privacy\local\metadata\provider,
\core_privacy\local\request\plugin\provider,
\core_privacy\local\request\core_userlist_provider {
public static function get_metadata(collection $collection): collection {
$collection->add_database_table('local_example_items', [
'userid' => 'privacy:metadata:items:userid',
'name' => 'privacy:metadata:items:name',
'content' => 'privacy:metadata:items:content',
'timecreated' => 'privacy:metadata:items:timecreated',
], 'privacy:metadata:items');
// External system call:
$collection->add_external_location_link('moodleorg', [
'username' => 'privacy:metadata:moodleorg:username',
], 'privacy:metadata:moodleorg');
// Subsystem link (files, comments):
$collection->add_subsystem_link('core_files', [], 'privacy:metadata:filepurpose');
return $collection;
}
public static function get_contexts_for_userid(int $userid): contextlist {
$contextlist = new contextlist();
$sql = "SELECT ctx.id
FROM {local_example_items} i
JOIN {context} ctx ON ctx.contextlevel = :ctxlevel
AND ctx.instanceid = i.courseid
WHERE i.userid = :userid";
$contextlist->add_from_sql($sql, [
'ctxlevel' => CONTEXT_COURSE,
'userid' => $userid,
]);
return $contextlist;
}
public static function get_users_in_context(userlist $userlist): void {
$context = $userlist->get_context();
if ($context->contextlevel !== CONTEXT_COURSE) {
return;
}
$sql = "SELECT userid FROM {local_example_items} WHERE courseid = :courseid";
$userlist->add_from_sql('userid', $sql, ['courseid' => $context->instanceid]);
}
public static function export_user_data(approved_contextlist $contextlist): void {
global $DB;
$user = $contextlist->get_user();
foreach ($contextlist->get_contexts() as $context) {
if ($context->contextlevel !== CONTEXT_COURSE) {
continue;
}
$rows = $DB->get_records('local_example_items', [
'courseid' => $context->instanceid,
'userid' => $user->id,
]);
$data = (object)[
'items' => array_map(fn($r) => [
'name' => $r->name,
'content' => $r->content,
'timecreated' => \core_privacy\local\request\transform::datetime($r->timecreated),
], $rows),
];
writer::with_context($context)->export_data(
[get_string('pluginname', 'local_example')],
$data
);
}
}
public static function delete_data_for_all_users_in_context(\context $context): void {
global $DB;
if ($context->contextlevel !== CONTEXT_COURSE) {
return;
}
$DB->delete_records('local_example_items', ['courseid' => $context->instanceid]);
}
public static function delete_data_for_user(approved_contextlist $contextlist): void {
global $DB;
$user = $contextlist->get_user();
foreach ($contextlist->get_contexts() as $context) {
if ($context->contextlevel !== CONTEXT_COURSE) {
continue;
}
$DB->delete_records('local_example_items', [
'courseid' => $context->instanceid,
'userid' => $user->id,
]);
}
}
public static function delete_data_for_users(approved_userlist $userlist): void {
global $DB;
$context = $userlist->get_context();
if ($context->contextlevel !== CONTEXT_COURSE) {
return;
}
[$insql, $params] = $DB->get_in_or_equal($userlist->get_userids(), SQL_PARAMS_NAMED);
$params['courseid'] = $context->instanceid;
$DB->delete_records_select('local_example_items',
"courseid = :courseid AND userid $insql", $params);
}
}
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.
- 9d ago First seen · 268 lines · 0 tokens per session scan A 83eb731edd8b
moodle-privacy-gdpr is a cursor rule published in the GitHub repository SaadRahman01/claude-moodle-dev (36 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,390 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
add-landing-template
Workflow for adding a new org landing-page template (editorial, vibrant, terminal, etc.) to the ClassroomIO monorepo. Activate when the user asks to add/create/build a new landing template or theme, or hands over a design reference for a new landing visual style.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.