Skip to content
Skills Library
Education · Building & coding

scorm-xapi-interoperability

/scorm-xapi-interoperability

Implement e-learning interoperability standards including SCORM 1.2, SCORM 2004, Experience API (xAPI / Tin Can), and CMI5. Author compliant imsmanifest.xml packages, handle browser-to-LMS SCORM JavaScript API communication (LMSInitialize, LMSSetValue, cmi.core.lesson_status), emit xAPI Actor-Verb-Object statements, and synchronize with Learning Record Stores (LRS). Trigger when building e-learning courses, LMS integrations, or training tracking modules.

Licence
MIT
Last repository change
16.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 16.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Implement e-learning interoperability standards including SCORM 1.2, SCORM 2004, Experience API (xAPI / Tin Can), and CMI5. Author compliant imsmanifest.xml packages, handle browser-to-LMS SCORM JavaScript API communication (LMSInitialize, LMSSetValue, cmi.core.lesson_status), emit xAPI Actor-Verb-Object statements, and synchronize with Learning Record Stores (LRS). Trigger when building e-learning courses, LMS integrations, or training tracking modules.

Original author description

Implement e-learning interoperability standards including SCORM 1.2, SCORM 2004, Experience API (xAPI / Tin Can), and CMI5. Author compliant imsmanifest.xml packages, handle browser-to-LMS SCORM JavaScript API communication (LMSInitialize, LMSSetValue, cmi.core.lesson_status), emit xAPI Actor-Verb-Object statements, and synchronize with Learning Record Stores (LRS). Trigger when building e-learning courses, LMS integrations, or training tracking modules.

How it works

  1. 1. E-Learning Standard Architectural Comparison
  2. 2. Production Code Implementations
  3. 3. Best Practices Checklist
Original SKILL.md headings · 138 lines, 466 words
SKILL.md preview
---
name: scorm-xapi-interoperability
metadata:
  category: EdTech and Learning Management Systems
description: Implement e-learning interoperability standards including SCORM 1.2, SCORM 2004, Experience API (xAPI / Tin Can), and CMI5. Author compliant imsmanifest.xml packages, handle browser-to-LMS SCORM JavaScript API communication (LMSInitialize, LMSSetValue, cmi.core.lesson_status), emit xAPI Actor-Verb-Object statements, and synchronize with Learning Record Stores (LRS). Trigger when building e-learning courses, LMS integrations, or training tracking modules.
compatibility: SCORM 1.2 / 2004 4th Ed, xAPI 1.0.3, CMI5 specification
---

# SCORM & xAPI Interoperability Skill Guide

This skill governs standard implementation of interactive e-learning communication protocols, SCORM packaging manifests, and xAPI statement streaming to Learning Record Stores (LRS).

---

## 1. E-Learning Standard Architectural Comparison

```text
+-----------------------+---------------------------------------+---------------------------------------+
| Feature               | SCORM (1.2 / 2004)                   | xAPI (Tin Can) / CMI5                 |
+-----------------------+---------------------------------------+---------------------------------------+
| Environment           | Browser iframe inside LMS only        | Anywhere (Web, Mobile, VR, Offline)   |
| Communication         | Window JavaScript object (`API_1484`) | REST API (HTTP JSON Statements)       |
| Data Model            | CMI data elements (pass/fail, score)  | Actor-Verb-Object + Context Extensions|
| Storage Target        | LMS Database                          | Learning Record Store (LRS)           |
+-----------------------+---------------------------------------+---------------------------------------+
```

---

## 2. Production Code Implementations

### A. SCORM 1.2 JavaScript Bridge Interface (Client-Side)

```javascript
class SCORM12Bridge {
  constructor() {
    this.api = this.findLMSAPI(window);
    this.isInitialized = false;
  }

  findLMSAPI(win) {
    let attempts = 0;
    while (!win.API && win.parent && win.parent !== win && attempts < 10) {
      attempts++;
      win = win.parent;
    }
    return win.API || null;
  }

  initialize() {
    if (!this.api) {
      console.warn("[SCORM] No LMS API found. Running in standalone preview mode.");
      return false;
    }
    const result = this.api.LMSInitialize("");
    this.isInitialized = result === "true";
    return this.isInitialized;
  }

  setScore(scoreRaw, min = 0, max = 100) {
    if (!this.isInitialized) return;
    this.api.LMSSetValue("cmi.core.score.raw", String(scoreRaw));
    this.api.LMSSetValue("cmi.core.score.min", String(min));
    this.api.LMSSetValue("cmi.core.score.max", String(max));
  }

  completeCourse(passed = true) {
    if (!this.isInitialized) return;
    const status = passed ? "passed" : "failed";
    this.api.LMSSetValue("cmi.core.lesson_status", status);
    this.api.LMSCommit("");
  }

  terminate() {
    if (!this.isInitialized) return;
    this.api.LMSFinish("");
    this.isInitialized = false;
  }
}
```

### B. xAPI Statement Dispatcher to LRS (TypeScript / Node.js)

```typescript
import axios from "axios";

export interface XAPIStatement {
  actor: {
    name: string;
    mbox: string; // e.g. "mailto:learner@example.com"
  };
  verb: {
    id: string; // e.g. "http://adlnet.gov/expapi/verbs/completed"
    display: { "en-US": string };
  };
  object: {
    id: string; // Activity IRI
    definition: {
      name: { "en-US": string };
      description: { "en-US": string };
    };
  };
  result?: {
    score?: { scaled: number; raw: number; min: number; max: number };
    success?: boolean;
    completion?: boolean;
    duration?: string; // ISO 8601 duration: e.g. "PT15M30S"
  };
}

export class LRSClient {
  constructor(
    private readonly endpointUrl: string,
    private readonly authKey: string,
    private readonly authSecret: string
  ) {}

  public async sendStatement(statement: XAPIStatement): Promise<string> {
    const credentials = Buffer.from(`${this.authKey}:${this.authSecret}`).toString("base64");

    const response = await axios.post(
      `${this.endpointUrl.replace(/\\/$/, "")}/statements`,
      statement,
      {
        headers: {
          "Content-Type": "application/json",
          "X-Experience-API-Version": "1.0.3",
          Authorization: `Basic ${credentials}`,
        },
      }
    );

    return response.data[0]; // Returns recorded statement UUID
  }
}
```

---

## 3. Best Practices Checklist

- [ ] **LMS API Discovery:** Always recurse through `window.parent` and `window.opener` up to 10 levels to locate the SCORM API instance in multi-frame LMS setups.
- [ ] **Commit Frequency:** Call `LMSCommit("")` only on major milestone events (chapter finish, quiz submit) to avoid overwhelming LMS backend databases.
- [ ] **xAPI IRIs:** Use official ADL vocabulary IRIs (e.g. `http://adlnet.gov/expapi/verbs/passed`) rather than ad-hoc custom verbs.

Versions

The database has no other skills named scorm-xapi-interoperability.

Database snapshot: 13.11.2026 · package version 3c48794d9027 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100e-learning-expert
    Build comprehensive e-learning solutions including course management, student engagement, assessment systems, and learning analytics. Use when the user mentions an LMS, online courses, SCORM or xAPI, student engagement, assessments and grading, or learning analytics.
  • 100training-development-specialist
    Use when a task needs the judgment of a Training and Development Specialist — running a training needs assessment down to task/objective level, choosing a delivery format (ILT vs eLearning vs blended) for a given audience and constraint set, building a curriculum or storyboard…
  • 91course-export
    Export course content to an LMS. Generates IMS Common Cartridge files (.imscc) for Canvas, Blackboard, Moodle, and D2L, a SCORM 1.2 package, or pushes directly to Canvas through the REST API. Reads the /idstack:course-builder output and the idstack manifest. Use when asked to…
  • 91course-import
    Course import from an LMS or a document. Reads IMS Common Cartridge files, SCORM packages, PDF or Word files, pasted course documents, or the Canvas REST API. Maps course structure to the idstack manifest with quality flags, task analysis, and Bloom's classification. Use when…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.