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/cmd-moodle-codestylegit 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.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 | $0.00025 | $0.00492 |
| Opus 5 | $0.00013 | $0.00246 |
| Sonnet 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 4d 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.
- 4d 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 (35 stars, last pushed 2mo ago), licensed MIT. It adds 25 tokens to every session and 492 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.
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.
ecoconception-php
Règles d'écoconception pour le code PHP, ORM sobre, générateurs, OPcache, connexions réutilisées.
agents
Agent engineering standards — Agents (TR-SEC-003).
php-client-implementation
Guidelines for implementing MCP clients in PHP.
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.