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/moodle-behat-testing)<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/moodle-behat-testing"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/moodle-behat-testing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/moodle-behat-testing"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/moodle-behat-testing.svg" alt="Reviewed on agentmods" width="80" 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.00000 | $0.01983 |
| Opus 5.5 | $0.00000 | $0.00793 |
| Sonnet 5.5 | $0.00000 | $0.00397 |
| Haiku 4.5 | $0.00000 | $0.00198 |
Grade A, and why
moodle-behat-testing 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 3mo 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 — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Moodle Behat Testing
Overview
Behat drives a real browser against a dedicated Moodle test site. Features live in <plugin>/tests/behat/*.feature. Custom steps go in tests/behat/behat_<component>.php extending behat_base. Moodle provides hundreds of built-in steps (login, course creation, navigation).
When to Use
- Writing end-to-end / acceptance tests
- Testing JavaScript-driven UI (drag-drop, modals, AJAX)
- Reproducing bugs that need full request cycle + cookies + session
- Adding scenarios to a plugin's regression suite
Skip when: writing unit tests for business logic — use moodle-phpunit-testing.
First-time setup
# config.php additions:
$CFG->behat_wwwroot = 'http://localhost:8000';
$CFG->behat_dataroot = '/var/moodledata_behat';
$CFG->behat_prefix = 'beh_';
# Initialize test site:
php admin/tool/behat/cli/init.php
# Install + start a Selenium-compatible driver (one of):
docker run -d -p 4444:4444 selenium/standalone-chrome:latest
# or chromedriver, geckodriver
# Run:
vendor/bin/behat --config /var/moodledata_behat/behat/behat.yml \
--tags @local_example
Feature file skeleton
@local_example @javascript
Feature: Mark attendance
In order to track presence
As a teacher
I need to mark students present
Background:
Given the following "courses" exist:
| fullname | shortname |
| Maths | M101 |
And the following "users" exist:
| username | firstname | lastname |
| teacher1 | Tina | Teach |
| student1 | Sam | Student |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | M101 | editingteacher |
| student1 | M101 | student |
Scenario: Teacher marks a student present
Given I log in as "teacher1"
And I am on "Maths" course homepage
When I follow "Attendance"
And I click on "Mark present" "button" in the "Sam Student" "table_row"
Then I should see "1 present" in the "Today" "fieldset"
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.
- 3mo ago First seen · 243 lines · 0 tokens per session scan A 6bc0b311e6cf
moodle-behat-testing is a cursor rule published in the GitHub repository SaadRahman01/claude-moodle-dev (43 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,983 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.
moodle-behat-testing compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| moodle-behat-testingSaadRahman01/claude-moodle-dev | Cursor rule | 43 | 5mo ago | MIT | A | 0 | Cursor |
| standard-integration-tests-structure-and-patternsPackmindHub/packmind | Cursor rule | 327 | 20d ago | Apache-2.0 | A | 0 | Cursor |
| standard-e2e-writing-e2e-testsPackmindHub/packmind | Cursor rule | 327 | 20d ago | Apache-2.0 | A | 150 | Cursor |
| standard-e2e-page-objectPackmindHub/packmind | Cursor rule | 327 | 20d ago | Apache-2.0 | A | 112 | Cursor |
| add-landing-templateclassroomio/classroomio | Cursor rule | 1.8k | today | AGPL-3.0 | A | 0 | Cursor |
| testing-fundamentalstugkanboz/awesome-cursorrules | Cursor rule | 24 | 2mo ago | MIT | A | 26 | Cursor |
| page-object-patternstugkanboz/awesome-cursorrules | Cursor rule | 24 | 2mo ago | MIT | A | 1,767 | Cursor |