cmd-moodle-privacy-audit

cmd-moodle-privacy-audit is a cursor rule for Cursor from SaadRahman01/claude-moodle-dev. It costs 27 tokens per session (504 once invoked), scanned A, original, MIT.

A privacy review for Moodle plugins that compares the plugin’s database fields with its privacy provider. A privacy provider is the code that tells Moodle what personal data exists, how users can export it, and how it can be deleted.

In plain words
What is it for?
Use it to inspect database tables and privacy-provider code for user IDs, authored text, file references, and external identifiers, then check metadata, context lookup, export, and deletion handling.
Why use it?
It helps reveal personal data that the plugin stores but does not properly document, export, or remove. This supports more complete privacy handling for Moodle users.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to inspect database tables and privacy-provider code for user IDs, authored text, file references, and external identifiers, then check metadata, context lookup, export, and deletion handling.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/saadrahman01/claude-moodle-dev/cmd-moodle-privacy-audit
Install

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.

Clone the repo
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev

Made for: Cursor.

Wrote 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.

agentmods badge for cmd-moodle-privacy-audit

README.md
[![agentmods](https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/cmd-moodle-privacy-audit/github.svg)](https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/cmd-moodle-privacy-audit)
Your own site
<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/cmd-moodle-privacy-audit"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/cmd-moodle-privacy-audit/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.

agentmods 80×15 button for cmd-moodle-privacy-audit

Your own site · 80×15
<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/cmd-moodle-privacy-audit"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/cmd-moodle-privacy-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 504 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.00504
Opus 5 $0.00014 $0.00252
Sonnet 5 $0.00005 $0.00101
Haiku 4.5 $0.00003 $0.00050

Measured 9d ago against content hash 65055084be7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

cmd-moodle-privacy-audit 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.

adapters/cursor/.cursor/rules/cmd-moodle-privacy-audit.mdc · 39 lines

What it actually says

You will audit the privacy provider of a Moodle plugin.

User's input: {user_input}

Activate the moodle-privacy-gdpr skill for context.

Steps:

  1. Locate the plugin directory. If unclear, ask.
  2. Read db/install.xml (or db/upgrade.php if no install.xml) — list every table and column.
  3. Identify columns that store user-identifying data:
    • userid, user_id, createdby, modifiedby, usermodified, relateduserid
    • Free-text fields a user authored (content, comment, description, note)
    • File pointers (itemid referencing mdl_files)
    • Identifiers from external systems linked to a user
  4. Read classes/privacy/provider.php.
  5. For each user-identifying column, check:
    • It is declared in get_metadata() via add_database_table with a lang string
    • The column has an entry in lang/en/<component>.php of the form privacy:metadata:<table>:<column>
    • get_contexts_for_userid returns contexts where the user has data
    • get_users_in_context returns users who have data in a given context
    • export_user_data exports the data per context
    • delete_data_for_user and delete_data_for_users delete it correctly
    • delete_data_for_all_users_in_context honors context level
  6. Check for subsystem usage:
    • If plugin attaches files via the Moodle Files API, add_subsystem_link('core_files', ...) must be present
    • Same for core_comment, core_rating, core_tag if used
  7. If plugin stores no user data, check it implements null_provider correctly (get_reason returns lang string key, privacy:metadata lang string defined).
  8. Output findings:
    • GREEN: present and correct
    • YELLOW: present but incomplete / missing lang strings
    • RED: missing entirely

Propose a fixed provider.php and the missing lang strings if there are issues. Don't write the changes without user confirmation if the plugin is non-trivial.

Changes

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.

  1. 9d ago First seen · 39 lines · 504 tokens per session scan A 65055084be7c

Subscribe to this mod's changes

cmd-moodle-privacy-audit is a cursor rule published in the GitHub repository SaadRahman01/claude-moodle-dev (36 stars, last pushed 2mo ago), licensed MIT. It adds 27 tokens to every session and 504 once invoked, about $0.0001 per session on Opus 5. 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.

Related

Other cursor rules, from other repositories

standard-integration-tests-structure-and-patterns

Define testing patterns for integration tests in the Packmind monorepo to ensure consistent organization, proper resource management, and comprehensive test coverage using hexagonal architecture princ... .

PackmindHub/packmind · 0 tokens

standard-back-end-repositories-sql-queries-using-typeorm

This standard provides guidelines for writing SQL queries using TypeORM in back-end repositories located in /infra/repositories/\Repository.ts. TypeORM offers multiple approaches to query data, but f... .

PackmindHub/packmind · 216 tokens

standard-scoped-repository-patterns

Enforce data isolation and consistent query patterns in repositories extending SpaceScopedRepository or OrganizationScopedRepository, ensuring tenant-safe data access across the Packmind codebase. .

PackmindHub/packmind · 0 tokens

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.

classroomio/classroomio · 0 tokens

ecoconception-sql

Règles d'écoconception pour SQL et PL/SQL, sobriété des lectures, index, pagination, traitements ensemblistes, cycle de vie des données.

Institut-du-Numerique-Responsable/skill-nr · 888 tokens

ponytail

Ponytail, lazy senior dev mode. Always pick the simplest solution that works.

DietrichGebert/ponytail · 576 tokens