moodle-external-api-development
This skill guides you through creating custom external web service APIs for Moodle LMS, following Moodle's external API framework and coding standards.
npx skills add sickn33/agentic-awesome-skills --skill moodle-external-api-development --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Moodle External API Development This skill guides you through creating custom external web service APIs for Moodle LMS, following Moodle's external API framework and coding standards. ## When to Use This Skill - Creating custom web services for Moodle plugins - Implementing REST/AJAX endpoints for course management - Building APIs for quiz operations, user tracking, or reporting - Exposing Moodle functionality to external applications - Developing mobile app backends using Moodle ## Core Architecture Pattern Moodle external APIs follow a strict three-method pattern: 1. **`execute_parameters()`** - Defines input parameter structure 2. **`execute()`** - Contains business logic 3. **`execute_returns()`** - Defines return structure ## Step-by-Step Implementation ### Step 1: Create the External API Class File **Location**: `/local/yourplugin/classes/external/your_api_name.php` ```php <?php namespace local_yourplugin\external; defined('MOODLE_INTERNAL') || die(); require_once("$CFG->libdir/externallib.php"); use external_api; use external_function_parameters; use external_single_structure; use external_value; class your_api_name extends external_api { // Three required methods will go
- When to Use This Skill
- Core Architecture Pattern
- Step-by-Step Implementation
- Step 1: Create the External API Class File
- Step 2: Define Input Parameters
- Step 3: Implement Business Logic
- Step 4: Define Return Structure
- Step 5: Register the Service
- Step 6: Implement Error Handling & Logging
- Advanced Patterns
- Complex Database Operations
- Working with Course Modules
- Access Restrictions (Groups/Availability)
- Random Question Selection with Tags
Get token first curl -X POST "https://yourmoodle.com/login/token.php" \ Call your API curl -X POST "https://yourmoodle.com/webservice/rest/server.php" \
What does the moodle-external-api-development skill do?
This skill guides you through creating custom external web service APIs for Moodle LMS, following Moodle's external API framework and coding standards.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill moodle-external-api-development --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.