curriculum-validate-cc
npx skills add https://github.com/pauljbernard/content --skill curriculum-validate-cc
Agent 安装分布
Skill 文档
Common Cartridge Validation
Validate IMS Common Cartridge 1.3 packages for specification compliance, structural integrity, and LMS compatibility before delivery.
When to Use
- Validate CC package before delivery to customer
- Check package after creation
- Verify package will import successfully
- Debug CC import failures
- Quality assurance for CC packages
- Pre-import validation
Required Inputs
- CC Package: .imscc file (ZIP format)
- Validation Level: quick, standard, thorough
- Target LMS (optional): Canvas, Moodle, Blackboard for platform-specific checks
Validation Checks
Level 1: Structure Validation (Quick, 1-2 minutes)
File Structure:
- â Package is valid ZIP file
- â imsmanifest.xml exists at root
- â imsmanifest.xml is valid XML
- â No OS-specific files (.DS_Store, Thumbs.db, __MACOSX)
- â No hidden files or directories
File References:
- â All files in manifest exist in package
- â No orphaned files (files not referenced in manifest)
- â File paths use forward slashes (not backslashes)
- â File names don’t contain special characters
Level 2: Schema Validation (Standard, 3-5 minutes)
Manifest Schema:
- â Valid against IMS CC 1.3 XSD schema
- â Required elements present (metadata, organizations, resources)
- â Namespace declarations correct
- â Schema version specified (1.3.0)
- â Identifier attributes unique
Metadata:
- â Schema type: “IMS Common Cartridge”
- â Schema version: “1.3.0”
- â LOM metadata structure valid
- â Title, description present
- â Copyright information included
Organizations:
- â At least one organization defined
- â Default organization specified
- â Structure is “rooted-hierarchy”
- â All item identifiers unique
- â All identifierref values reference existing resources
Resources:
- â All resource identifiers unique
- â Resource types valid for CC 1.3
- â href attributes point to existing files
- â Dependencies reference existing resources
Level 3: Content Validation (Thorough, 5-10 minutes)
QTI Assessments:
- â Assessment metadata valid (assessment_meta.xml)
- â QTI 2.1 XML valid against schema
- â Item types supported
- â Response processing defined
- â Scoring configured
- â Feedback present (optional but recommended)
LTI Tools:
- â LTI configuration XML valid
- â Launch URL present and valid format
- â Secure launch URL (HTTPS) present
- â Vendor information included
- â Privacy level specified
- â Platform extensions valid
Discussion Topics:
- â Discussion XML valid against schema
- â Title and text present
- â Discussion type valid (threaded, side_comment)
- â Grading configuration valid (if graded)
Web Links:
- â Web link XML valid
- â URL present and valid format
- â Target specified
Web Content:
- â HTML files are valid HTML5
- â No broken internal links
- â Images referenced exist
- â CSS files valid
- â JavaScript files don’t have syntax errors
Level 4: Accessibility Validation (Thorough)
WCAG 2.1 AA Compliance:
- â All images have alt text
- â Color contrast ratios meet AA standards
- â Headings use semantic HTML (h1, h2, etc.)
- â Links have descriptive text
- â Forms have labels
- â Tables have headers
- â No keyboard traps
- â ARIA labels where appropriate
Level 5: LMS-Specific Validation (Optional)
Canvas-Specific:
- â course-settings.xml valid against Canvas schema
- â Assignment groups configured
- â Module requirements valid
- â LTI tool placements valid
Moodle-Specific:
- â Activity types supported
- â Grading scales compatible
- â Resource types recognized
Blackboard-Specific:
- â Content types compatible
- â Assessment types supported
Workflow
1. Extract Package
# Extract .imscc to temporary directory
unzip course.imscc -d /tmp/cc-validate-XXXXX
# Verify structure
ls -la /tmp/cc-validate-XXXXX/
Expected structure:
course/
âââ imsmanifest.xml # Required at root
âââ course-settings.xml # Optional
âââ lessons/
âââ assessments/
âââ discussions/
âââ lti-tools/
âââ resources/
âââ web-links/
2. Validate Manifest Schema
# Validate against IMS CC 1.3 XSD
xmllint --noout --schema imscc_v1p3_imscp_v1p2.xsd imsmanifest.xml
# Check for well-formed XML
xmllint --noout imsmanifest.xml
Common Schema Errors:
- Missing namespace declarations
- Invalid element nesting
- Required attributes missing
- Invalid resource types
3. Validate File References
# Pseudocode for reference validation
manifest = parse_xml("imsmanifest.xml")
# Get all file references from manifest
referenced_files = []
for resource in manifest.resources:
referenced_files.append(resource.href)
for file in resource.files:
referenced_files.append(file.href)
# Check all references exist
for file_path in referenced_files:
if not exists(file_path):
error(f"Missing file: {file_path}")
# Check for orphaned files
package_files = list_all_files()
for file in package_files:
if file not in referenced_files and file != "imsmanifest.xml":
warning(f"Orphaned file (not in manifest): {file}")
4. Validate QTI Assessments
# For each QTI assessment
for assessment in assessments/*; do
# Validate assessment metadata
xmllint --noout --schema assessment_meta.xsd $assessment/assessment_meta.xml
# Validate QTI 2.1 XML
xmllint --noout --schema qtiasiv2p1.xsd $assessment/assessment.xml
# Check item types
check_qti_item_types $assessment/assessment.xml
done
QTI Validation Checks:
- Item types: choice, text_entry, matching, ordering
- Response processing exists
- Correct response defined
- Point values specified
- Feedback present
5. Validate LTI Tools
# For each LTI tool
for tool in lti-tools/*; do
# Validate LTI XML
xmllint --noout --schema blti_v1p0.xsd $tool
# Check required fields
check_lti_fields $tool
done
LTI Validation Checks:
- Launch URL present
- Launch URL uses HTTPS (recommended)
- Title present
- Vendor information complete
- Privacy level specified
- Platform extensions valid
6. Generate Validation Report
Common Cartridge Validation Report
===================================
Package: bio-101-2025.imscc
Validation Date: 2025-11-06T13:30:00Z
Validation Level: Thorough
SUMMARY
-------
Overall Status: PASS â
Total Checks: 87
Passed: 85
Warnings: 2
Errors: 0
DETAILED RESULTS
----------------
[â] Structure Validation (12 checks)
â Package is valid ZIP
â imsmanifest.xml exists at root
â imsmanifest.xml is valid XML
â No OS-specific files
â All referenced files exist
â No orphaned files
... (6 more)
[â] Schema Validation (25 checks)
â Valid against IMS CC 1.3 XSD
â Required elements present
â Namespace declarations correct
â All identifiers unique
... (21 more)
[â] QTI Assessment Validation (18 checks)
â 3 assessments found
â All assessment metadata valid
â All QTI 2.1 XML valid
â Response processing defined
â Scoring configured
... (13 more)
[â ] Accessibility Validation (15 checks)
â All images have alt text
â Color contrast ratios meet AA
â 2 links have non-descriptive text ("click here")
â 1 video missing captions
... (11 more)
[â] LTI Tool Validation (8 checks)
â 2 LTI tools configured
â All launch URLs valid
â All use HTTPS
â Vendor information complete
... (4 more)
WARNINGS (2)
------------
1. lessons/lesson-1-2.html: Link text "click here" is not descriptive (line 42)
2. resources/videos/cell-division.mp4: Video missing caption track
RECOMMENDATIONS
---------------
1. Update link text to be descriptive ("View cell diagram" instead of "click here")
2. Add WebVTT caption file for video: resources/videos/cell-division.vtt
3. Consider adding more feedback to QTI questions (optional)
PACKAGE DETAILS
---------------
Course ID: bio-101-2025
Course Title: Introduction to Biology
Lessons: 8
Assessments: 3 (QTI 2.1)
Discussion Topics: 2
LTI Tools: 2
Resources: 47 files (images, videos, PDFs)
Package Size: 14.2 MB
Extracted Size: 15.8 MB
IMPORT COMPATIBILITY
--------------------
Canvas: â Compatible
Moodle: â Compatible
Blackboard: â Compatible
D2L Brightspace: â Compatible
Schoology: â Compatible
NEXT STEPS
----------
1. â Package is ready for delivery
2. Address 2 accessibility warnings (optional but recommended)
3. Test import in target LMS before final delivery
4. Generate import instructions for customer
Report generated by: curriculum.validate-cc v1.0.0
CLI Interface
# Quick validation (structure only)
/curriculum.validate-cc --package course.imscc --level quick
# Standard validation (structure + schema)
/curriculum.validate-cc --package course.imscc --level standard
# Thorough validation (all checks)
/curriculum.validate-cc --package course.imscc --level thorough
# With target LMS checks
/curriculum.validate-cc --package course.imscc --level thorough --target-lms canvas
# Generate detailed report
/curriculum.validate-cc --package course.imscc --level thorough --report-file validation-report.txt
# JSON output for automation
/curriculum.validate-cc --package course.imscc --level thorough --format json --output validation.json
# Validate multiple packages
/curriculum.validate-cc --packages "*.imscc" --level standard
# Help
/curriculum.validate-cc --help
Output Formats
Text Report (Default)
Human-readable validation report with:
- Summary section (pass/fail, counts)
- Detailed results by validation category
- Warnings and errors with line numbers
- Recommendations for fixes
- Import compatibility matrix
JSON Output
{
"package": "bio-101-2025.imscc",
"validation_date": "2025-11-06T13:30:00Z",
"level": "thorough",
"summary": {
"status": "pass",
"total_checks": 87,
"passed": 85,
"warnings": 2,
"errors": 0
},
"structure_validation": {
"status": "pass",
"checks": 12,
"passed": 12
},
"schema_validation": {
"status": "pass",
"checks": 25,
"passed": 25
},
"qti_validation": {
"status": "pass",
"checks": 18,
"passed": 18,
"assessments": 3
},
"accessibility_validation": {
"status": "warning",
"checks": 15,
"passed": 13,
"warnings": 2,
"issues": [
{
"type": "warning",
"file": "lessons/lesson-1-2.html",
"line": 42,
"message": "Link text 'click here' is not descriptive",
"recommendation": "Use descriptive text like 'View cell diagram'"
},
{
"type": "warning",
"file": "resources/videos/cell-division.mp4",
"message": "Video missing caption track",
"recommendation": "Add WebVTT caption file"
}
]
},
"lti_validation": {
"status": "pass",
"checks": 8,
"passed": 8,
"tools": 2
},
"compatibility": {
"canvas": true,
"moodle": true,
"blackboard": true,
"d2l_brightspace": true,
"schoology": true
}
}
XML Output
<validation-report>
<package>bio-101-2025.imscc</package>
<summary status="pass">
<total-checks>87</total-checks>
<passed>85</passed>
<warnings>2</warnings>
<errors>0</errors>
</summary>
<structure-validation status="pass"/>
<schema-validation status="pass"/>
<qti-validation status="pass"/>
<accessibility-validation status="warning">
<issue type="warning" file="lessons/lesson-1-2.html" line="42">
Link text 'click here' is not descriptive
</issue>
</accessibility-validation>
<lti-validation status="pass"/>
</validation-report>
Common Issues and Fixes
Issue 1: Invalid Manifest Schema
Error:
Element '{http://www.imsglobal.org/xsd/imsccv1p3/imscp_v1p1}manifest':
Missing child element(s). Expected is ( {http://www.imsglobal.org/xsd/imsccv1p3/imscp_v1p1}organizations ).
Cause: Missing required <organizations> element
Fix:
<manifest>
<metadata>...</metadata>
<organizations>
<organization identifier="org-1" structure="rooted-hierarchy">
<item identifier="root">
<title>Course Title</title>
</item>
</organization>
</organizations>
<resources>...</resources>
</manifest>
Issue 2: Orphaned Files
Warning:
Orphaned file (not in manifest): resources/images/unused-diagram.png
Cause: File exists in package but not referenced in manifest
Fix Options:
- Add file to manifest if needed
- Remove file from package if unused
- Add to resource dependencies
Issue 3: Broken File References
Error:
Missing file: lessons/lesson-5.html (referenced in manifest)
Cause: Manifest references file that doesn’t exist
Fix:
- Add the missing file to package
- Or remove reference from manifest
- Check file path spelling (case-sensitive)
Issue 4: Invalid QTI
Error:
QTI validation failed: assessments/quiz-1/assessment.xml
Element 'correctResponse': This element is not expected.
Cause: QTI XML doesn’t conform to QTI 2.1 schema
Fix:
- Validate QTI against schema
- Use curriculum.export-qti skill to generate valid QTI
- Check IMS QTI 2.1 specification
Issue 5: LTI Launch URL Issues
Error:
LTI tool 'Virtual Lab' has HTTP launch URL (HTTPS recommended)
Cause: LTI tool uses insecure HTTP URL
Fix:
<blti:launch_url>http://example.com/launch</blti:launch_url>
<!-- Change to: -->
<blti:secure_launch_url>https://example.com/launch</blti:secure_launch_url>
Integration with Other Tools
Before Validation:
- Package created with curriculum.package-common-cartridge
After Validation: 2. If validation passes â deliver to customer 3. If validation fails â fix issues and re-validate 4. For LMS testing â use cc-validator agent
Workflow:
# 1. Create package
/curriculum.package-common-cartridge --materials "curriculum/" --output "course.imscc"
# 2. Validate package
/curriculum.validate-cc --package "course.imscc" --level thorough
# 3. If pass, test in LMS
/agent.cc-validator --action "test" --package "course.imscc" --lms-targets "canvas,moodle"
# 4. If all tests pass, deliver
cp course.imscc published/bio-101-2025.imscc
Best Practices
When to Validate
â Always validate:
- Before delivering to customer
- After package creation
- After fixing validation errors
- Before testing in LMS
â Quick validation good for:
- During iterative development
- Quick sanity checks
- CI/CD pipelines
â Thorough validation good for:
- Final QA before delivery
- Customer-facing packages
- High-stakes courses
Validation Levels
| Level | Time | Use Case |
|---|---|---|
| Quick | 1-2 min | Development, CI/CD |
| Standard | 3-5 min | Pre-testing validation |
| Thorough | 5-10 min | Final QA, delivery |
Handling Warnings
Accessibility Warnings:
- High priority – impacts users with disabilities
- Fix before delivery when possible
- Document if cannot fix
Orphaned Files:
- Medium priority – wastes storage
- Remove unused files
- Low impact on functionality
Missing Feedback:
- Low priority – optional but helpful
- Add feedback when time permits
- Improves learning experience
Exit Codes
- 0: Validation passed (no errors)
- 1: Validation failed (errors found)
- 2: Validation passed with warnings
- 3: Invalid package format (not .imscc)
- 4: Cannot extract package (corrupted ZIP)
- 5: Missing imsmanifest.xml
Performance
Typical Validation Times:
| Package Size | Quick | Standard | Thorough |
|---|---|---|---|
| Small (<5 MB, 5-10 lessons) | 30 sec | 1-2 min | 3-5 min |
| Medium (5-20 MB, 10-30 lessons) | 1 min | 3-5 min | 5-10 min |
| Large (20-100 MB, 30+ lessons) | 2-3 min | 5-10 min | 10-20 min |
References
See Also
- curriculum.package-common-cartridge – Create CC packages
- curriculum.export-qti – Generate QTI 2.1 assessments
- cc-validator agent – Automated LMS testing
- PRODUCTION_GUIDE.md – Complete CC workflows