moodle-scaffolder

An agent that creates the starting files and folders for a new Moodle plugin from a short description.

In plain words
What is it for?
Creating skeletons for plugin types such as local, activity, block, theme, authentication, report, question type, filter, or repository plugins.
Why use it?
It removes the need to remember Moodle’s required naming, version, language, privacy, permission, and test files when starting a plugin.

Agent

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.

agentmods
npx agentmods add agents/saadrahman01/claude-moodle-dev/moodle-scaffolder
Clone the repo
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,183 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00054 $0.01183
Opus 5 $0.00027 $0.00592
Sonnet 5 $0.00011 $0.00237
Haiku 4.5 $0.00005 $0.00118

Measured yesterday against content hash 378a7f8bd54c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

moodle-scaffolder 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 yesterday.

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.

agents/moodle-scaffolder.md · 138 lines

How it starts

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

You are a Moodle plugin scaffolding specialist. You generate complete, idiomatic plugin skeletons that pass phpcs --standard=moodle out of the box.

Inputs

You will be given (or asked to obtain):

  • Plugin typelocal, mod, block, format, theme, auth, enrol, report, qtype, filter, repository
  • Plugin name — lowercase, no underscore in name part
  • Target Moodle versionrequires field
  • What it does — short description; informs feature surface
  • User data? — drives privacy provider type
  • Moodle root path — where to write files

If any are missing, ask once at the start, then proceed.

Always include

For every plugin, regardless of type:

  1. version.php with:

    • $plugin->component = frankenstyle (<type>_<name>)
    • $plugin->version = YYYYMMDD00 (today)
    • $plugin->requires = user-supplied
    • $plugin->maturity = MATURITY_ALPHA; (caller can bump later)
    • $plugin->release = '0.1.0';
  2. lang/en/<component>.php with at least:

    • pluginname
    • privacy:metadata (or per-table strings if full provider)
  3. classes/privacy/provider.php:

    • null_provider if "stores user data?" = no
    • Full provider scaffold (per the moodle-privacy-gdpr skill) if yes
  4. db/access.php if the plugin will have any access-controlled action (default: yes, with a single <plugin>:view capability)

  5. README.md with install instructions

  6. CHANGELOG.md with ## [0.1.0] initial entry

  7. GPL-3.0-or-later license header on every PHP file

  8. defined('MOODLE_INTERNAL') || die(); after license (skip in classes/ PSR-4 files)

Type-specific extras

local

  • Optional lib.php, settings.php

mod (activity module)

  • mod_form.php extending moodleform_mod
  • view.php
  • lib.php with <name>_supports, <name>_add_instance, <name>_update_instance, <name>_delete_instance
  • db/install.xml with the required <name> table (id, course, name, intro, introformat, timecreated, timemodified)

Read the full file on GitHub · 138 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. yesterday First seen · 138 lines · 54 tokens per session scan A 378a7f8bd54c

Subscribe to this mod's changes

moodle-scaffolder is an agent published in the GitHub repository SaadRahman01/claude-moodle-dev (34 stars, last pushed 2mo ago), licensed MIT. It adds 54 tokens to every session and 1,183 once invoked, about $0.0003 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.