Use when implementing or migrating to the Moodle 4.4+ Hooks API. Covers hook class authoring (db/hooks.php), callback registration, dispatching, replacing legacy magic callbacks (extendnavigation, beforehttpheaders, etc.), and testing hook listeners.
Use when integrating a Moodle plugin with the Moodle Mobile app — db/mobile.php remote templates, Ionic/Angular components delivered server-side, mobile.php view types, addons, push notifications, and offline support.
Use when writing, running, or debugging PHPUnit tests for Moodle plugins or core. Covers advancedtestcase, resetAfterTest, data generators, mocking $DB, testing events/tasks/external functions, and CLI invocation.
Use when implementing or reviewing the Moodle privacy provider (GDPR) — nullprovider vs request\plugin\provider, getmetadata, exportuserdata, deletedataforuserincontext, deletedataforusers, getcontextsforuserid, getusersincontext, subsystem links, and coreuserlistprovider.
Use when reviewing or hardening Moodle plugin code for security — capability checks, sesskey CSRF, input validation, SQL injection, XSS, file serving, SSRF, IDOR, secrets handling, and Moodle's specific anti-patterns.
Use when adding/calling Moodle web services or external functions — db/services.php, classes/external/, REST/SOAP/AJAX protocols, tokens, capabilities, parameters/returns schemas, file uploads, and rate limiting.
Use this agent for a deep, Moodle-specific code review of a plugin or PR diff. Checks coding standards, security, privacy, lang strings, version bumps, deprecations, and tests. Returns a structured report.
Use this agent to generate a complete Moodle plugin skeleton from a brief description. Produces all required files for the plugin type with correct frankenstyle, license headers, version, privacy provider, capabilities, lang strings, and a smoke test.
Use when ensuring Moodle plugin UI meets WCAG 2.1 AA — semantic HTML in Mustache, ARIA via core helpers, keyboard navigation, color contrast in SCSS, focus management in modals, screen reader testing, and Pa11y/axe automation.
Use when writing or running Behat acceptance tests for Moodle plugins. Covers feature files, custom step definitions, tags, data generators in Background, JavaScript scenarios, and Selenium/Chromedriver setup.
Use when implementing or migrating to the Moodle 4.4+ Hooks API. Covers hook class authoring (db/hooks.php), callback registration, dispatching, replacing legacy magic callbacks (extendnavigation, beforehttpheaders, etc.), and testing hook listeners.
Use when integrating a Moodle plugin with the Moodle Mobile app — db/mobile.php remote templates, Ionic/Angular components delivered server-side, mobile.php view types, addons, push notifications, and offline support.
Use when writing, running, or debugging PHPUnit tests for Moodle plugins or core. Covers advancedtestcase, resetAfterTest, data generators, mocking $DB, testing events/tasks/external functions, and CLI invocation.
Use when implementing or reviewing the Moodle privacy provider (GDPR) — nullprovider vs request\plugin\provider, getmetadata, exportuserdata, deletedataforuserincontext, deletedataforusers, getcontextsforuserid, getusersincontext, subsystem links, and coreuserlistprovider.
Use when reviewing or hardening Moodle plugin code for security — capability checks, sesskey CSRF, input validation, SQL injection, XSS, file serving, SSRF, IDOR, secrets handling, and Moodle's specific anti-patterns.