# Moodle privacy gdpr

> Moodle privacy gdpr is an open-source agent skill for developer tools. Guides building or reviewing a Moodle GDPR privacy provider for plugins. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/SaadRahman01/claude-moodle-dev/tree/main/skills/moodle-privacy-gdpr
- **Repository:** https://github.com/saadrahman01/claude-moodle-dev
- **GitHub stars:** 44
- **License:** MIT
- **Skill name:** moodle-privacy-gdpr
- **Collection:** https://github.com/SaadRahman01/claude-moodle-dev
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill walks an agent through Moodle's privacy API for plugins. It covers choosing between a null provider for plugins that store no personal data and a full provider when user data lives in the plugin's own tables or is linked to core subsystems such as files, comments or ratings. It sets out the methods to implement, including metadata declaration, context lookup for a user, export, and deletion for a user, a context or a set of users, along with the core userlist provider.

The skill includes example PHP for both provider types, the language strings that every declared table column and external field needs, and a table of subsystem constants. It also explains where the compliance report shows missing providers, how to write PHPUnit tests with the core privacy test case, and lists common mistakes to avoid.

It is aimed at developers working in a Moodle codebase who need PHP and the Moodle plugin structure, with PHPUnit available for the test examples.

## When your agent uses it

> Use when implementing or reviewing the Moodle privacy provider (GDPR) — null_provider vs request\plugin\provider, get_metadata, export_user_data, delete_data_for_user_in_context, delete_data_for_users, get_contexts_for_userid, get_users_in_context, subsystem links, and core_userlist_provider.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/SaadRahman01/claude-moodle-dev/tree/HEAD/skills/moodle-privacy-gdpr)
- [License: MIT](https://github.com/SaadRahman01/claude-moodle-dev/tree/HEAD/skills/moodle-privacy-gdpr)

## Features

- **Provider type selection:** A decision guide for choosing a null provider, a subsystem-only provider or a full provider.
- **Metadata declaration:** Examples for declaring database tables, external locations and subsystem links.
- **Export and deletion methods:** Sample code for exporting user data and deleting it by user, by context or by user list.
- **Required language strings:** Lists the privacy:metadata strings that each declared field needs.
- **Subsystem link reference:** A table of core subsystem constants such as files, comments, ratings and tags.
- **Privacy test guidance:** Shows a PHPUnit test class built on the core privacy test case and the command to run privacy tests.

## Good for

- Add a GDPR privacy provider to a new Moodle plugin
- Review an existing Moodle plugin's privacy implementation
- Declare a database table's personal data fields for the privacy registry
- Implement user data export for a data subject request
- Write PHPUnit tests for a Moodle privacy provider

## Install

### Claude Code

This skill ships in the `moodle-dev` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add SaadRahman01/claude-moodle-dev
/plugin install moodle-dev@moodle-dev
```

Or copy only this skill to `~/.claude/skills/moodle-privacy-gdpr`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/moodle-privacy-gdpr &&
cp -R "$tmp/skills/moodle-privacy-gdpr" ~/.claude/skills/moodle-privacy-gdpr &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/moodle-privacy-gdpr` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/moodle-privacy-gdpr` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/moodle-privacy-gdpr &&
cp -R "$tmp/skills/moodle-privacy-gdpr" ~/.agents/skills/moodle-privacy-gdpr &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/moodle-privacy-gdpr` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/moodle-privacy-gdpr` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/moodle-privacy-gdpr &&
cp -R "$tmp/skills/moodle-privacy-gdpr" ~/.cursor/skills/moodle-privacy-gdpr &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/moodle-privacy-gdpr` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/SaadRahman01/claude-moodle-dev.git --path skills/moodle-privacy-gdpr
```

Or copy the folder to `~/.gemini/skills/moodle-privacy-gdpr` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/moodle-privacy-gdpr`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/moodle-privacy-gdpr &&
cp -R "$tmp/skills/moodle-privacy-gdpr" ~/.copilot/skills/moodle-privacy-gdpr &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/moodle-privacy-gdpr` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev.git
```

Then copy `claude-moodle-dev/skills/moodle-privacy-gdpr` into your agent's skills folder as `moodle-privacy-gdpr`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Moodle privacy gdpr need to run?

It is a set of instructions and examples for PHP code in a Moodle plugin. The skill itself has no scripts; the tests example uses vendor/bin/phpunit with the core_privacy group.

### When should I use the null provider instead of the full provider?

Use the null provider when the plugin stores no user-identifying data. If the plugin has its own tables holding user data, implement the full provider along with the plugin and userlist providers.

### Which Moodle functions does Moodle privacy gdpr cover?

It covers get_metadata, get_contexts_for_userid, get_users_in_context, export_user_data, delete_data_for_user, delete_data_for_users and delete_data_for_all_users_in_context.

### Where does the compliance problem show up?

Plugins without a provider appear as Not yet implemented in Site admin under Users, Privacy and policies, in the plugin privacy registry.

### How do I install Moodle privacy gdpr in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/moodle-privacy-gdpr to use it in all your projects, or to .claude/skills/moodle-privacy-gdpr in one project. Or install the moodle-dev plugin, which includes it: /plugin marketplace add SaadRahman01/claude-moodle-dev, then /plugin install moodle-dev@moodle-dev.

### Does Moodle privacy gdpr run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Moodle privacy gdpr?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Moodle privacy gdpr?

The closest alternatives to Moodle privacy gdpr are Moodle plugin development, Moodle phpunit testing, Moodle web services, Moodle security audit and Moodle behat testing.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Moodle plugin development](https://ai-powered.com/skills/moodle-plugin-development): Moodle plugin development is an open-source agent skill for developer tools.
- [Moodle phpunit testing](https://ai-powered.com/skills/moodle-phpunit-testing): Moodle phpunit testing is an open-source agent skill for developer tools.
- [Moodle web services](https://ai-powered.com/skills/moodle-web-services): Moodle web services is an open-source agent skill for developer tools.
- [Moodle security audit](https://ai-powered.com/skills/moodle-security-audit): Moodle security audit is an open-source agent skill for security.
- [Moodle behat testing](https://ai-powered.com/skills/moodle-behat-testing): Moodle behat testing is an open-source agent skill for developer tools.
- [Moodle accessibility](https://ai-powered.com/skills/moodle-accessibility): Moodle accessibility is an open-source agent skill for developer tools.
- [Moodle mobile app](https://ai-powered.com/skills/moodle-mobile-app): Moodle mobile app is an open-source agent skill for developer tools.
- [Moodle upgrade migration](https://ai-powered.com/skills/moodle-upgrade-migration): Moodle upgrade migration is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/moodle-privacy-gdpr
