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-codestyle)<a href="https://agentmods.dev/rules/saadrahman01/claude-moodle-dev/cmd-moodle-codestyle"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/cmd-moodle-codestyle/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/cmd-moodle-codestyle"><img src="https://agentmods.dev/badge/rules/saadrahman01/claude-moodle-dev/cmd-moodle-codestyle.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.00025 | $0.00492 |
| Opus 5.5 | $0.00010 | $0.00197 |
| Sonnet 5.5 | $0.00005 | $0.00098 |
| Haiku 4.5 | $0.00003 | $0.00049 |
Grade A, and why
cmd-moodle-codestyle 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.
What it actually says
You will lint and fix Moodle coding-style issues.
User's input: {user_input}
If empty, ask for a path.
Steps:
-
Detect the linter:
- Prefer
vendor/bin/phpcs(project-local Composer) - Fall back to
phpcson PATH - If
local_codecheckeris installed, prefer its bundled standard
- Prefer
-
Run:
phpcs --standard=moodle --report=summary <path> phpcs --standard=moodle --report=full <path> -
If
phpcsis not installed, instruct the user:composer require --dev moodlehq/moodle-cs # or as a Moodle plugin: # https://github.com/moodlehq/moodle-local_codechecker -
Categorize findings:
- Auto-fixable — run
phpcbf --standard=moodle <path>(whitespace, missing newlines, brace style) - Manual — missing PHPDoc, naming, missing
MOODLE_INTERNAL, missing license header, etc.
- Auto-fixable — run
-
After auto-fix, re-run and address remaining issues:
- License header missing — prepend GPL-3.0-or-later header (template from
moodle-plugin-developmentskill) - Missing
MOODLE_INTERNAL— add after license (skip if file is inclasses/PSR-4) - Missing PHPDoc on class/method — generate doc with
@param,@return,@throws - Naming — convert camelCase function names to snake_case (carefully — check call sites)
- Line length > 132 — wrap at logical breakpoints
- Indent — convert tabs to 4 spaces
- License header missing — prepend GPL-3.0-or-later header (template from
-
After all fixes, re-run
phpcsand confirm zero issues. -
Recommend hooking phpcs into CI:
- run: vendor/bin/phpcs --standard=moodle --report=full --extensions=php local/example
Reference the moodle-plugin-development skill for coding standard details.
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 · 51 lines · 492 tokens per session scan A 197b786d25b1
cmd-moodle-codestyle is a cursor rule published in the GitHub repository SaadRahman01/claude-moodle-dev (44 stars, last pushed 5mo ago), licensed MIT. It adds 25 tokens to every session and 492 once invoked, about $0.0001 per session on Opus 5.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.
cmd-moodle-codestyle compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cmd-moodle-codestyleSaadRahman01/claude-moodle-dev | Cursor rule | 44 | 5mo ago | MIT | A | 25 | Cursor |
| ecoconception-phpInstitut-du-Numerique-Responsable/skill-nr | Cursor rule | 8 | 22d ago | CC-BY-SA-4.0 | A | 524 | Cursor |
| laravelsanjeed5/awesome-cursor-rules-mdc | Cursor rule | 3.6k | 10d ago | CC0-1.0 | A | 2,628 | Cursor |
| python-3-brutal-auditbeettlle/pi-spine | Cursor rule | 3 | 2d ago | MIT | A | 0 | Cursor |
| ecoconception-javaInstitut-du-Numerique-Responsable/skill-nr | Cursor rule | 8 | 22d ago | CC-BY-SA-4.0 | A | 615 | Cursor |
| php-types-validationdalehurley/php-mcp-sdk | Cursor rule | 27 | 1y ago | MIT | A | 11 | Cursor |
| coding-stylecharles001-wong/autocode-flow | Cursor rule | 2 | 9mo ago | MIT | A | 0 | Cursor |