
Moodle upgrade migration
Guides an agent through upgrading Moodle plugins to newer Moodle and PHP versions
Moodle upgrade migration is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 44
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Moodle upgrade migration
This skill gives the agent a migration playbook for moving a Moodle plugin forward across releases. It lists deprecated functions and their replacements, such as print_error, add_to_log and the bare external_api class, and notes which changes arrived in each Moodle 4.x and 5.x release, including the Hooks API, the /public document root and the Routing Engine.
The material also walks through PHP 8.1 to 8.4 changes that affect plugin code, such as implicit nullable parameters and deprecated CSV and XML helpers. It shows how to write a db/upgrade.php file with cumulative version blocks, how to maintain upgrade.txt or per-component UPGRADING.md notes, and how to write compatibility shims for plugins that support several Moodle versions.
The skill suggests running phpcs with the Moodle standard, phpcompatinfo and phpstan as part of the check. It expects a Moodle plugin codebase and the relevant Moodle and PHP versions as input.
When your agent uses it
Use when upgrading a Moodle plugin across versions, fixing deprecated API usage, or migrating to Moodle 4.x/5.x (incl. 5.1/5.2) conventions — print_error, add_to_log, formslib changes, external_api namespace, Hooks API, /public doc-root, Routing Engine, PSR-4 migration, PHP 8.1–8.4 upgrades, and required upgrade.txt notes.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (12 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the moodle-dev plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add SaadRahman01/claude-moodle-dev
/plugin install moodle-dev@moodle-devOr copy only this skill to ~/.claude/skills/moodle-upgrade-migration:
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-upgrade-migration &&
cp -R "$tmp/skills/moodle-upgrade-migration" ~/.claude/skills/moodle-upgrade-migration &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/moodle-upgrade-migration inside it instead.
Copy the skill folder to ~/.agents/skills/moodle-upgrade-migration to use it in every repository:
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-upgrade-migration &&
cp -R "$tmp/skills/moodle-upgrade-migration" ~/.agents/skills/moodle-upgrade-migration &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/moodle-upgrade-migration inside it instead.
Copy the skill folder to ~/.cursor/skills/moodle-upgrade-migration to use it in every project:
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-upgrade-migration &&
cp -R "$tmp/skills/moodle-upgrade-migration" ~/.cursor/skills/moodle-upgrade-migration &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/moodle-upgrade-migration inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/SaadRahman01/claude-moodle-dev.git --path skills/moodle-upgrade-migrationOr copy the folder to ~/.gemini/skills/moodle-upgrade-migration yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/moodle-upgrade-migration:
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-upgrade-migration &&
cp -R "$tmp/skills/moodle-upgrade-migration" ~/.copilot/skills/moodle-upgrade-migration &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/moodle-upgrade-migration inside it instead.
Get the folder:
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev.gitThen copy claude-moodle-dev/skills/moodle-upgrade-migration into your agent's skills folder as moodle-upgrade-migration. Agents that support SKILL.md read one folder per skill.
What it does
- Deprecated API replacements
- A table mapping old Moodle functions and classes to their current equivalents, with the version each change arrived in.
- Moodle 4 and 5 changes
- Notes on Hooks API, external API namespaces, Bootstrap 5 class renames and 5.1 and 5.2 requirements.
- PHP 8.x upgrade notes
- Summaries of PHP 8.0 through 8.4 changes that affect plugin code and need fixing.
- Database upgrade steps
- An example db/upgrade.php with cumulative version blocks, field and index guards and savepoints.
- Upgrade notes documentation
- Format and placement guidance for upgrade.txt and per-component UPGRADING.md files.
- Multi-version compatibility shims
- Patterns for aliasing classes and branching on the Moodle major version.
- Lint and analysis commands
- Example commands for phpcs with the Moodle standard, phpcompatinfo and phpstan.
Good for
- Upgrade a Moodle plugin so it runs on Moodle 5.1
- Replace print_error and add_to_log calls with current APIs
- Prepare a plugin for PHP 8.4 compatibility
- Write a db/upgrade.php step that adds a field safely
- Draft upgrade.txt notes for a new plugin release
Moodle upgrade migration FAQ
Which Moodle and PHP versions does Moodle upgrade migration cover?
It covers Moodle 3.x to 5.x, including 5.1 and 5.2, and PHP 7.2 changes plus PHP 8.0 through 8.4.
Does Moodle upgrade migration change Moodle core or only plugins?
It targets plugin code. Its steps apply to a plugin's own files, such as db/upgrade.php, upgrade.txt and its class files.
What tools does Moodle upgrade migration use?
It refers to phpcs with the Moodle coding standard, phpcompatinfo and phpstan for checking code.
How do I install Moodle upgrade migration in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/moodle-upgrade-migration to use it in all your projects, or to .claude/skills/moodle-upgrade-migration 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 upgrade migration 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 upgrade migration?
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 upgrade migration?
The closest alternatives to Moodle upgrade migration are Moodle plugin development, Moodle hooks API, Moodle security audit, Moodle phpunit testing and Moodle mobile app.
Where this comes from
- Description: from the skill's own SKILL.md.
More from SaadRahman01/claude-moodle-dev

Guides building and calling Moodle web services: external functions, tokens and schemas
- Open source
- 44 GitHub stars
- Developer tools

Guides agents to build Moodle plugin UI that meets WCAG 2.1 AA accessibility rules
- Open source
- 44 GitHub stars
- Developer tools

Guides writing Moodle browser JavaScript as AMD modules with grunt builds and tests
- Open source
- 44 GitHub stars
- Developer tools

Guides writing and running Behat acceptance tests for Moodle plugins
- Open source
- 44 GitHub stars
- Developer tools

Guides building and migrating Moodle 4.4+ hook classes, listeners and tests
- Open source
- 44 GitHub stars
- Developer tools

Guides building Moodle plugin UI that renders inside the Moodle Mobile app
- Open source
- 44 GitHub stars
- Developer tools

