moodle-standards
9
总安装量
7
周安装量
#31162
全站排名
安装命令
npx skills add https://github.com/astoeffer/plugin-marketplace --skill moodle-standards
Agent 安装分布
opencode
6
claude-code
5
codex
4
gemini-cli
4
replit
2
Skill 文档
Moodle Coding Standards
Write compliant Moodle plugin code following PSR-12 and Moodle-specific conventions.
When to Use This Skill
- Creating new Moodle plugins
- Writing PHP code for Moodle
- Code review and quality checks
- Understanding Frankenstyle naming
See reference.md for complete standards.
Key Rules
Frankenstyle Naming
plugintype_pluginname
local_mymodule
mod_assignment
block_myblock
File Headers
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software...
namespace local_mymodule;
defined('MOODLE_INTERNAL') || die();
Class Naming
// Class in local/mymodule/classes/helper.php
namespace local_mymodule;
class helper {
// Methods use snake_case
public function get_user_data() {
}
}
Quick Checks
- File header with license
-
defined('MOODLE_INTERNAL') || die(); - Proper namespace
- PSR-12 formatting
- No direct DB queries (use DML)