# Moodle plugin development

> Moodle plugin development is an open-source agent skill for developer tools. Guides an AI agent through building, upgrading and reviewing Moodle 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-plugin-development
- **Repository:** https://github.com/saadrahman01/claude-moodle-dev
- **GitHub stars:** 44
- **License:** MIT
- **Skill name:** moodle-plugin-development
- **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 gives a coding agent the conventions needed to work on Moodle plugins across many plugin types, from local and activity modules to themes, auth, enrolment and question types. It covers frankenstyle naming, the standard file layout, and the files that usually change together: version.php, the database schema and upgrade steps, capability definitions, web service registration, language strings, and the GDPR privacy provider.

The guide is organised as a set of checklists and templates. It explains when a schema or capability change requires a version bump, shows the shape of upgrade functions and access rules, and lists the required files for each plugin type. It also includes a common-mistakes table and a security checklist covering login and capability checks, sesskey verification, parameter typing, and output escaping.

The skill is documentation only and runs no scripts. It refers to Moodle tooling such as the XMLDB editor, the upgrade and cache CLI scripts, PHPUnit, Behat and phpcs with the Moodle ruleset, so a working Moodle installation and those tools are needed to act on its guidance.

## When your agent uses it

> Use when creating, modifying, upgrading, or reviewing Moodle plugins (local, mod, block, format, theme, auth, enrol, report, qtype, filter, repository) - covers version.php, db/install.xml + upgrade.php, db/access.php capabilities, db/services.php web services, lang strings, classes/ PSR-4 autoloading, lib.php hooks, settings.php, privacy provider, and Moodle coding standards.

## 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-plugin-development)
- [License: MIT](https://github.com/SaadRahman01/claude-moodle-dev/tree/HEAD/skills/moodle-plugin-development)

## Features

- **Plugin layout and naming:** Covers frankenstyle naming and the standard directory structure for each Moodle plugin type.
- **Database schema and upgrades:** Explains editing install.xml through the XMLDB editor and writing versioned upgrade steps.
- **Capabilities and web services:** Shows how to define capabilities in access.php and expose external functions via services.php.
- **Privacy and language strings:** Describes the GDPR provider minimum and how to add and use lang strings with get_string.
- **Security and coding standards:** Lists checks for login, sesskey, parameter handling, output escaping and phpcs compliance.
- **Testing commands:** Summarises PHPUnit and Behat test setup and the CLI commands for upgrades and caches.

## Good for

- Scaffold a new local plugin with version.php, language file and privacy provider
- Add a database table and write the matching upgrade step
- Define a new capability and check it in an entry script
- Expose a plugin function as an AJAX web service
- Review a Moodle plugin pull request for coding standard issues

## 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-plugin-development`:

```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-plugin-development &&
cp -R "$tmp/skills/moodle-plugin-development" ~/.claude/skills/moodle-plugin-development &&
rm -rf "$tmp"
```

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

### Codex

Copy the skill folder to `~/.agents/skills/moodle-plugin-development` 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-plugin-development &&
cp -R "$tmp/skills/moodle-plugin-development" ~/.agents/skills/moodle-plugin-development &&
rm -rf "$tmp"
```

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

### Cursor

Copy the skill folder to `~/.cursor/skills/moodle-plugin-development` 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-plugin-development &&
cp -R "$tmp/skills/moodle-plugin-development" ~/.cursor/skills/moodle-plugin-development &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/moodle-plugin-development` 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-plugin-development
```

Or copy the folder to `~/.gemini/skills/moodle-plugin-development` yourself.

### VS Code

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

```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-plugin-development &&
cp -R "$tmp/skills/moodle-plugin-development" ~/.copilot/skills/moodle-plugin-development &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/moodle-plugin-development` 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-plugin-development` into your agent's skills folder as `moodle-plugin-development`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should the version number be bumped?

The guide says to bump version.php for any database schema or capability change, and to add a matching upgrade step keyed on the old version.

### Does the skill run any scripts?

No. It includes no scripts; it provides reference templates and checklists for the agent to follow alongside Moodle's own CLI tools.

### Which plugin types does Moodle plugin development cover?

It has a cheatsheet covering local, activity module, block, course format, theme, auth, enrol, question type, filter and repository plugins.

### Is a privacy provider required?

The guide states that every plugin must declare privacy, and gives a minimal null provider for plugins that store no user data.

### How do I install Moodle plugin development in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/moodle-plugin-development to use it in all your projects, or to .claude/skills/moodle-plugin-development 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 plugin development 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 plugin development?

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 plugin development?

The closest alternatives to Moodle plugin development are Moodle upgrade migration, Moodle phpunit testing, Moodle security audit, Moodle accessibility and Moodle web services.

## Where this comes from

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

## Alternatives

- [Moodle upgrade migration](https://ai-powered.com/skills/moodle-upgrade-migration): Moodle upgrade migration 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 security audit](https://ai-powered.com/skills/moodle-security-audit): Moodle security audit is an open-source agent skill for security.
- [Moodle accessibility](https://ai-powered.com/skills/moodle-accessibility): Moodle accessibility 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 behat testing](https://ai-powered.com/skills/moodle-behat-testing): Moodle behat testing is an open-source agent skill for developer tools.
- [Moodle performance](https://ai-powered.com/skills/moodle-performance): Moodle performance 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.

---
Source: https://ai-powered.com/skills/moodle-plugin-development
