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.
git clone --depth 1 https://github.com/SaadRahman01/claude-moodle-devWrote 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.
[](https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/cmd-moodle-security-review)<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/cmd-moodle-security-review"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/cmd-moodle-security-review.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00026 | $0.00704 |
| Opus 5 | $0.00013 | $0.00352 |
| Sonnet 5 | $0.00005 | $0.00141 |
| Haiku 4.5 | $0.00003 | $0.00070 |
Grade A, and why
cmd-moodle-security-review scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
15. Uses `\curl` wrapper, not raw `curl_exec()` / `file_get_contents($url)` What it actually says
You will perform a Moodle-specific security review.
User's input: {user_input}
Activate the moodle-security-audit skill for context.
If {user_input} is empty, ask for a file or plugin path.
Audit each PHP file in scope against this checklist. Report findings as:
[FILE]:[LINE] [SEVERITY] [CATEGORY] — [issue]
FIX: [actionable fix]
Severities: CRITICAL (exploitable now), HIGH (privilege escalation / data leak), MEDIUM (defense in depth), LOW (style / hardening).
Checklist
For every entry script (file with require('config.php') or similar):
require_login()present and called earlyrequire_capability()against the object's context (not arbitrary system context)require_sesskey()on every state-changing request (POST or mutating GET)- All input via
required_param/optional_paramwith appropriatePARAM_*type — flag any$_GET/$_POST/$_REQUESTusage
For every DB call:
5. Uses $DB->... — flag any mysqli_*, PDO, mysql_*
6. Placeholders (? / :name) — flag string concatenation in SQL
7. LIKE patterns use $DB->sql_like() + sql_like_escape()
8. IN (...) uses $DB->get_in_or_equal()
For every output:
9. User text rendered via s(), format_string(), format_text() — flag direct echo $var
10. format_string/format_text is called with a context
11. Mustache {{{var}}} raw output is justified (text already passed through format_text)
For file APIs:
12. pluginfile.php callback re-checks capability inside callback
13. Files are served via \file_storage + send_stored_file, never raw $CFG->dataroot
14. Uploads use file_save_draft_area_files with maxfiles, maxbytes, accepted_types
For HTTP / external:
15. Uses \curl wrapper, not raw curl_exec() / file_get_contents($url)
16. Open redirects: redirect($next) with $next from user input is validated against site host
For secrets:
17. No tokens / API keys committed in source — use set_config/get_config
For dangerous PHP:
18. No eval(), create_function(), unserialize() on user input
19. print_error is replaced with throw new \moodle_exception()
For sessions:
20. \core\session\manager::write_close() called early on AJAX endpoints that don't write session
After audit:
- Print summary:
N CRITICAL, N HIGH, N MEDIUM, N LOW - Offer to apply fixes one-by-one or as a single patch (ask before writing)
- For unresolved CRITICAL findings, recommend not deploying until fixed
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.
- 8d ago First seen · 64 lines · 704 tokens per session scan A 804280f79a52
cmd-moodle-security-review is a cursor rule published in the GitHub repository SaadRahman01/claude-moodle-dev (36 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 704 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
add-landing-template
Workflow for adding a new org landing-page template (editorial, vibrant, terminal, etc.) to the ClassroomIO monorepo. Activate when the user asks to add/create/build a new landing template or theme, or hands over a design reference for a new landing visual style.
agents
Agent engineering standards — Agents (TR-SEC-003).
profile
Command: /profile - Run the profile workflow for this project.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.