moodle-new-plugin

moodle-new-plugin is a command for Claude Code from SaadRahman01/claude-moodle-dev. It costs 0 tokens per session (485 once invoked), scanned A, original, MIT.

A command that creates the required starting structure for a new Moodle plugin after asking for its type, name, target version, and data needs.

In plain words
What is it for?
Starting local, activity, block, theme, authentication, enrolment, report, question-type, filter, or repository plugins in a Moodle installation.
Why use it?
It avoids manually assembling Moodle’s folder layout and required metadata, while choosing the appropriate privacy setup.

Command 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 Starting local, activity, block, theme, authentication, enrolment, report, question-type, filter, or repository plugins in a Moodle installation.

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

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-new-plugin

README.md
[![agentmods](https://agentmods.dev/badge/commands/saadrahman01/claude-moodle-dev/moodle-new-plugin.svg)](https://agentmods.dev/commands/saadrahman01/claude-moodle-dev/moodle-new-plugin)
Your own site
<a href="https://agentmods.dev/commands/saadrahman01/claude-moodle-dev/moodle-new-plugin"><img src="https://agentmods.dev/badge/commands/saadrahman01/claude-moodle-dev/moodle-new-plugin.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 485 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.00000 $0.00485
Opus 5 $0.00000 $0.00243
Sonnet 5 $0.00000 $0.00097
Haiku 4.5 $0.00000 $0.00049

Measured 8d ago against content hash 442cd3d40aa9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

moodle-new-plugin 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 8d 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.

adapters/aider/commands/moodle-new-plugin.md · 32 lines

What it actually says

/moodle-new-plugin

Scaffold a new Moodle plugin (asks for type + name).

You will scaffold a new Moodle plugin.

User's input:

If <args> is empty or missing required values, ask the user:

  1. Plugin type (one of: local, mod, block, format, theme, auth, enrol, report, qtype, filter, repository)
  2. Plugin name (lowercase, no underscores in the name part — frankenstyle becomes <type>_<name>)
  3. Target Moodle minimum version (default: latest LTS)
  4. Whether the plugin will store user data (affects privacy provider choice)

Then:

  1. Activate the moodle-plugin-development skill for conventions.
  2. Create the directory under <moodle-root>/<typedir>/<name>/ (e.g., local/attendance/). If <moodle-root> is unknown, ask.
  3. Generate the minimum required files for the chosen plugin type using the cheatsheet in the moodle-plugin-development skill.
  4. Always include:
    • version.php with correct frankenstyle component, today's date as version (YYYYMMDD00), and the user's requires value
    • lang/en/<component>.php with at least pluginname
    • classes/privacy/provider.phpnull_provider if no user data, otherwise scaffold the full provider per the moodle-privacy-gdpr skill
    • GPL-3.0-or-later license header on every PHP file
    • defined('MOODLE_INTERNAL') || die(); after the license block (skip in classes/ PSR-4 files)
  5. If the plugin type has type-specific required files (e.g., mod_form.php for activity modules, block_<name>.php for blocks), include them.
  6. Print a summary of what was created and the next steps the user should take (run php admin/cli/upgrade.php, register capabilities, write tests).

Coding standards: 4-space indent, no closing ?>, snake_case functions, PascalCase classes.

If unsure about a Moodle version difference, prefer the convention used in Moodle 4.5+ and note any back-compat concerns.

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. 8d ago First seen · 32 lines · 0 tokens per session scan A 442cd3d40aa9

Subscribe to this mod's changes

moodle-new-plugin is a command published in the GitHub repository SaadRahman01/claude-moodle-dev (36 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 485 tokens. 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.