cmd-moodle-new-plugin

cmd-moodle-new-plugin is a cursor rule for Cursor from SaadRahman01/claude-moodle-dev. It costs 24 tokens per session (499 once invoked), scanned A, original, MIT.

Rules for a command that scaffolds a new Moodle plugin after collecting its type, name, minimum Moodle version, and user-data requirements.

In plain words
What is it for?
Creating the initial files for supported Moodle plugin types and placing them in the correct directory under a Moodle installation.
Why use it?
They make the command’s questions and generated files consistent with Moodle plugin conventions, including versioning, language strings, and privacy handling.

Cursor rule for Cursor

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 rules/saadrahman01/claude-moodle-dev/cmd-moodle-new-plugin
Clone the repo
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-dev

Made for: Cursor.

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/cmd-moodle-new-plugin.svg)](https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/cmd-moodle-new-plugin)
Your own site
<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/cmd-moodle-new-plugin"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/cmd-moodle-new-plugin.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 499 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.1 $0.00024 $0.00499
Opus 5 $0.00012 $0.00249
Sonnet 5 $0.00005 $0.00100
Haiku 4.5 $0.00002 $0.00050

Measured 5d ago against content hash 1c1b7a3ba4e5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

cmd-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 5d 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/cursor/.cursor/rules/cmd-moodle-new-plugin.mdc · 32 lines

What it actually says

You will scaffold a new Moodle plugin.

User's input: {user_input}

If {user_input} 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. 5d ago First seen · 32 lines · 499 tokens per session scan A 1c1b7a3ba4e5

Subscribe to this mod's changes

cmd-moodle-new-plugin is a cursor rule published in the GitHub repository SaadRahman01/claude-moodle-dev (35 stars, last pushed 2mo ago), licensed MIT. It adds 24 tokens to every session and 499 once invoked, about $0.0001 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.