moodle-privacy-audit

moodle-privacy-audit is a command for Claude Code from SaadRahman01/claude-moodle-dev. It costs 0 tokens per session (491 once invoked), scanned A, original, MIT.

A command that checks whether a Moodle plugin correctly describes and handles the personal data stored in its database.

In plain words
What is it for?
Reviewing database tables and the plugin privacy provider, including user identifiers, written content, uploaded-file references, and data export or deletion.
Why use it?
It helps find missing privacy declarations, user-data locations, exports, or deletion handling required for privacy compliance.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the moodle-dev plugin — 13 skills, 8 commands, 2 agents shipped together

Good fit Reviewing database tables and the plugin privacy provider, including user identifiers, written content, uploaded-file references, and data export or deletion.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/saadrahman01/claude-moodle-dev/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: Claude Code.

Or install moodle-dev, the plugin that ships this one along with the rest of its 13 skills, 8 commands, 2 agents.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/saadrahman01/claude-moodle-dev/moodle-privacy-audit"><img src="https://agentmods.dev/badge/commands/saadrahman01/claude-moodle-dev/moodle-privacy-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 491 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.00000 $0.00491
Opus 5 $0.00000 $0.00246
Sonnet 5 $0.00000 $0.00098
Haiku 4.5 $0.00000 $0.00049

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

Security

Grade A, and why

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 12d 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/aider/commands/moodle-privacy-audit.md · 39 lines

What it actually says

/moodle-privacy-audit

Audit a Moodle plugin's privacy provider for completeness against its DB schema.

You will audit the privacy provider of a Moodle plugin.

User's 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. 12d ago First seen · 39 lines · 0 tokens per session scan A 2fcc602fc1d1

Subscribe to this mod's changes

moodle-privacy-audit is a command 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 491 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.