Moodle plugin skeleton generator

Admin tools ::: tool_pluginskel
Maintained by David Mudrák
Allows developers to quickly generate code skeleton for a new Moodle plugin.
Latest release:
405 sites
58 fans
Moodle 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8

This tool allows developers to quickly generate code skeleton for Moodle plugins. Relevant code is generated according to defined list of requested plugin features.


Plugin features and other properties are described in so called recipe files. Recipes use YAML syntax.

    name: Moodle demo plugin
    component: tool_demo
    release: "0.1.0"
    requires: "3.9"
    maturity: MATURITY_ALPHA
    copyright: 2021 David Mudrák 

      readme: true
      license: true
      settings: true

      haspersonaldata: false

For full list of supported options, see cli/example.yaml file.

To generate skeleton of the plugin described in ./myplugin.yaml:

    $ php cli/generate.php myplugin.yaml

Run generate.php --help for more options and features.


See the page Plugin skeleton generator at moodle docs site.

Installing from Git

  1. Go to the folder with your Moodle development installation:

    $ cd {your/moodle/dirroot}

  2. Clone this repository to the correct location folder:

    $ git clone admin/tool/pluginskel

  3. Complete the installation:

    $ sudo -u www-data php admin/cli/upgrade.php

or just log in to your Moodle development site as an admin.


This plugin is part of set Moodle development.


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4


David Mudrák (Lead maintainer)
Alexandru Elisei: Original author (GSOC 2016 student)
Geoffrey Van Wyk
Ferran Recio Calderó
Daniel Neis Araujo
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Tue, Apr 25, 2017, 10:03 PM
    It currently doesn't allow you to use 3.2 as the required Moodle version (dropdown). Does that mean we should not use it for 3.2 (or higher) plugin development?
  • Tue, Apr 25, 2017, 11:00 PM

    I believe it just needs to be updated. A pull request at github will be appreciated, or an issue created there at least. Thanks in advance.

  • Fri, Jun 1, 2018, 10:14 PM

    Version 1.1.0 released, allowing to generate privacy API scaffolding. No UI at the moment, manually edited input YAML recipes only. Refer to cli/example.yaml.

  • Thu, Apr 25, 2019, 6:09 PM
    I'm probably missing something really obvious here but my generated mod skeleton does not have an install.xml file so has no means to create initial tables. Many thanks in advance.
  • Fri, Apr 26, 2019, 4:49 PM

    Hi Steve. IIRC that is expected behaviour as the XMLDB editor is more appropriate tool to create this file. What I used to do was (1) generate the module's skeleton inside a Moodle installation (2) go directly to the site's /admin/tool/xmldb/ address (that is the annoying part where you have to avoid visiting the Notifications page that would trigger the plugin installation) and (3) create the module's install.xml using the XMLDB and (4) finally install the plugin.

    I agree this is rather cumbersome workflow. Please feel encouraged to report a new feature request so that plugins come with a bare-minimal working install.xml out of the box.

  • Fri, Oct 11, 2019, 6:45 PM

    For the record, the most recent version 1.2.3 has (among other things) the support for generating a minimal db/install.xml implemented. Thanks again Steve for raising it.

Please login to post comments