moodle-upgrade-migration

moodle-upgrade-migration is a skill for Claude Code from SaadRahman01/claude-moodle-dev. It costs 95 tokens per session (3,331 once invoked), scanned A, original, MIT.

Guidance for updating Moodle plugins between releases and replacing older APIs with newer ones.

In plain words
What is it for?
Modernising plugin code, supporting Moodle 4.x or 5.x, updating PHP usage, adding upgrade notes, changing database schemas, and running style checks.
Why use it?
It helps developers handle deprecations, stricter PHP versions, database upgrades, and compatibility requirements without leaving undocumented migration work.

Skill 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 Modernising plugin code, supporting Moodle 4.x or 5.x, updating PHP usage, adding upgrade notes, changing database schemas, and running style checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/saadrahman01/claude-moodle-dev/moodle-upgrade-migration
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.

Any agent
npx skills add SaadRahman01/claude-moodle-dev --skill moodle-upgrade-migration
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-upgrade-migration

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/saadrahman01/claude-moodle-dev/moodle-upgrade-migration"><img src="https://agentmods.dev/badge/skills/saadrahman01/claude-moodle-dev/moodle-upgrade-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,331 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.00095 $0.03331
Opus 5 $0.00048 $0.01665
Sonnet 5 $0.00019 $0.00666
Haiku 4.5 $0.00010 $0.00333

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

Security

Grade A, and why

moodle-upgrade-migration 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 10d 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.

skills/moodle-upgrade-migration/SKILL.md · 323 lines

How it starts

The opening of the file, as written. The whole thing — 323 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Moodle Upgrade & Migration

Overview

Moodle deprecates aggressively but rarely removes. Code from Moodle 2.x often still runs in 4.5 — but uses APIs that emit warnings, fail PHP 8 strict checks, or block plugin directory acceptance. This skill catalogs the migration path from each generation.

When to Use

  • Upgrading a plugin to support a newer Moodle version
  • Resolving deprecation warnings
  • Migrating to PHP 8.1 / 8.2 / 8.3 / 8.4
  • Plugin directory submission rejection ("uses deprecated API")
  • Cross-version compat ($plugin->requires bump)

Strategy

  1. Bump $plugin->requires to your minimum target Moodle version
  2. Replace deprecated APIs (table below)
  3. Add upgrade.txt to document changes
  4. Run phpcs --standard=moodle + visual smoke test
  5. Bump $plugin->version + add db/upgrade.php step if schema changed

Deprecation table

Old New Since
print_error('errkey', 'comp') throw new \moodle_exception('errkey', 'comp') 3.7
add_to_log() Trigger an event class 2.7
notify('text', 'notifyproblem') \core\notification::error('text') 3.0
redirect($url, 'msg', 0) redirect($url, 'msg', null, \core\notification::INFO) 3.0
external_api (bare) \core_external\external_api 4.2
external_function_parameters etc. \core_external\... 4.2
$mform->setHelpButton() $mform->addHelpButton() 2.0
Magic callbacks <comp>_extend_navigation Hooks API \core\hook\... (where applicable) 4.4
\core\session\manager::write_close() Same — but check if needed
mtrace() in non-CLI Use debugging() or proper logger
cleardoubleslashes Use clean_param($url, PARAM_URL)
addslashes() for DB Use $DB->... placeholders 2.0
mysql_* functions $DB always 2.0
userdate($t, '', false) (no timezone) Pass timezone or use core_date::get_user_timezone_object() 3.2
create_function() Closures function() { } PHP 7.2 removed
each($array) foreach PHP 7.2 removed
assert($string) Real expression PHP 7.2+
(unset) cast Plain unset() PHP 7.2+
\Mustache_Engine direct $OUTPUT->render_from_template
cm_info::get_modinfo second arg API change in 3.4 3.4
format_text no context Always pass ['context' => $context] 2.0
\html_writer::nonempty_tag Use html_writer::tag with check 3.5
\stdClass w/o : \stdClass return type in PHP 8.1+ Add return types 8.1

Read the full file on GitHub · 323 lines

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. 10d ago First seen · 323 lines · 95 tokens per session scan A 2187323a928e

Subscribe to this mod's changes

moodle-upgrade-migration is a skill published in the GitHub repository SaadRahman01/claude-moodle-dev (36 stars, last pushed 2mo ago), licensed MIT. It adds 95 tokens to every session and 3,331 once invoked, about $0.0005 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 skills, from other repositories

education-expert

Expert-level education technology, learning management systems, and ed-tech platforms. Use when the user mentions edtech, lms, e learning, or assessment, or when the task involves Educational Technology or Standards.

personamanagmentlayer/pcl · 45 tokens

humanizer

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague…

classroomio/classroomio · 93 tokens

apple-design

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading)…

classroomio/classroomio · 80 tokens

emil-design-eng

This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.

classroomio/classroomio · 35 tokens

add-landing-template

Add a new org landing-page template to the ClassroomIO monorepo. Use when the user asks to "create/add a new landing template", "add a new template like X to the org landing pages", "build a new theme for the org landing page", or hands over a design reference (image, URL, prototype) for a new landing visual style.

classroomio/classroomio · 78 tokens

animation-vocabulary

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and…

classroomio/classroomio · 98 tokens