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.
npx agentmods add rules/saadrahman01/claude-moodle-dev/moodle-amd-javascriptgit clone --depth 1 https://github.com/SaadRahman01/claude-moodle-devWhat 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 | $0.00000 | $0.02092 |
| Opus 5 | $0.00000 | $0.01046 |
| Sonnet 5 | $0.00000 | $0.00418 |
| Haiku 4.5 | $0.00000 | $0.00209 |
Grade A, and why
moodle-amd-javascript 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 252 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Moodle AMD JavaScript
Overview
Moodle uses AMD (RequireJS) for browser JS. Source goes in <plugin>/amd/src/*.js (ES6+), built into minified AMD in amd/build/*.min.js via grunt. Never edit amd/build/ directly. Modules import Moodle core helpers via string IDs (core/ajax, core/str, core/templates).
When to Use
- Adding interactive JS to a plugin
- Calling a web service from the browser (
core/ajax) - Rendering a Mustache template client-side
- Showing a modal, notification, or toast
- Building a custom AMD module + grunt config
- Debugging "module not found" / "build out of date" warnings
Skip when: writing pure backend PHP — use moodle-plugin-development.
File layout
<plugin>/
amd/
src/
foo.js # ES6 source — edit this
bar.js
build/ # generated; commit but never hand-edit
foo.min.js
foo.min.js.map
Module ID at runtime = <component>/<filename> (no extension):
local/example/amd/src/marker.js→local_example/markermod/quiz/amd/src/preflight.js→mod_quiz/preflight
Module skeleton
// amd/src/marker.js
import Ajax from 'core/ajax';
import Notification from 'core/notification';
import {get_string as getString} from 'core/str';
import Templates from 'core/templates';
const SELECTORS = {
BUTTON: '[data-action="mark-present"]',
ROW: '[data-region="attendance-row"]',
};
/**
* Initialise: bind click handlers.
*
* @param {number} sessionid
*/
export const init = (sessionid) => {
document.addEventListener('click', async (e) => {
const btn = e.target.closest(SELECTORS.BUTTON);
if (!btn) {
return;
}
e.preventDefault();
const userid = parseInt(btn.dataset.userid, 10);
try {
const result = await markPresent(sessionid, userid);
const html = await Templates.render('local_example/row', result);
const row = btn.closest(SELECTORS.ROW);
Templates.replaceNode(row, html, '');
} catch (err) {
Notification.exception(err);
}
});
};
const markPresent = (sessionid, userid) => {
const request = Ajax.call([{
methodname: 'local_example_mark_present',
args: {sessionid, userid},
}]);
return request[0];
};
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.
- 2d ago First seen · 252 lines · 0 tokens per session scan A 3d335d52d8ac
moodle-amd-javascript is a cursor rule published in the GitHub repository SaadRahman01/claude-moodle-dev (34 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,092 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.
Other cursor rules, from other repositories
standard-frontend-navigation-with-react-router
This codebase uses React Router v7 with organization and space scoping in URLs (e.g., /org/{orgSlug}/space/{spaceSlug}/recipes). To maintain consistency, improve maintainability, and simplify navigati... .
standard-e2e-writing-e2e-tests
Writing proper E2E tests with our stack. Each feature we add should have its own spec file. .
standard-e2e-page-object
Write proper PageObjects for our E2E tests .
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.
webdriver-management
Selenium WebDriver lifecycle management — driver factory, explicit waits, browser options, and teardown.
test-patterns
Selenium pytest test patterns — data-driven tests, fixtures, error handling, and performance checks.