[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PB58AETSEN7FCS5C14MZC7":3,"skill-same:01M6PB58AETSEN7FCS5C14MZC7":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":13,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":62,"install":63,"resources":76},"01M6PB58AETSEN7FCS5C14MZC7","oneroster-csv-validator",null,"Validates 1EdTech \u002F IMS Global OneRoster v1.1 and v1.2 CSV roster sets: manifest integrity, bulk vs delta strictness, foreign key references, and encoding sanitization. Trigger phrases: oneroster csv validator, validate oneroster zip, clever roster error, oneroster sourcedid.","duc-duy-1612\u002FOnline-Delivery-Systems-Web","duc-duy-1612","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192231384?v=4","01M6NSDKQQDKVTHZ8DZMZ1VYY6","01M6NSDKW8DDVTQHBT1HBDDJPT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Foneroster-csv-validator\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000004","电子表格","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"validator","csv","oneroster csv validator","oneroster","bulk","sanitization","zip","1edtech","ims-global","csv-validation","edtech","testing","error","windsurf","delta","community","references","integrity","data","safe","2026-11-10 10:12:30",false,"---\nname: oneroster-csv-validator\ndescription: \"Validates 1EdTech \u002F IMS Global OneRoster v1.1 and v1.2 CSV roster sets: manifest integrity, bulk vs delta strictness, foreign key references, and encoding sanitization. Trigger phrases: oneroster csv validator, validate oneroster zip, clever roster error, oneroster sourcedid.\"\ncategory: testing\nrisk: safe\nsource: community\nsource_repo: wwewtech\u002Foneroster-csv-validator\nsource_type: community\ndate_added: \"2026-09-22\"\nauthor: wwewtech\ntags: [edtech, oneroster, csv-validation, ims-global, 1edtech, data-engineering]\ntools: [claude, cursor, gemini, windsurf]\nlicense: \"MIT\"\n---\n\n# OneRoster CSV Validator: Strict 1EdTech Data Integrity & Pre-Flight Linter\n\nPerform rigorous pre-flight validation on OneRoster v1.1 and v1.2 CSV roster bundles prior to SIS\u002FClever\u002FClassLink ingestion: audit foreign key referential integrity, eliminate orphan enrollments, enforce bulk vs delta partitioning, and sanitize encoding traps.\n\n## When to Use This Skill\n\nActivate this skill when:\n- Validating or debugging student information system (SIS) roster export packages (`.zip` archives or CSV directories) for OneRoster v1.1 or v1.2 compliance.\n- The user asks: \"Why is Clever rejecting our OneRoster zip file?\", \"Check for orphaned userSourcedIds in enrollments.csv\", \"Validate bulk vs delta mode in OneRoster CSVs\", or \"Sanitize UTF-8 BOM characters from school rosters\".\n- Auditing relational integrity across `manifest.csv`, `orgs.csv`, `users.csv`, `courses.csv`, `classes.csv`, `enrollments.csv`, and `academicSessions.csv`.\n- Preparing automated pre-flight CI\u002FCD pipelines to catch corrupted student or teacher records before nightly SIS sync runs.\n\nDo NOT use this skill when:\n- Integrating OneRoster REST \u002F OAuth 2.0 API endpoints (this skill focuses strictly on CSV table bindings).\n- Generating synthetic or fabricated student PII without authorization.\n- Working on generic non-standard CSV spreadsheets that do not follow 1EdTech specifications.\n\n## Core Mental Models & Non-Negotiable Rules\n\n1. **The Manifest Root Authority Law**:\n   - `manifest.csv` MUST reside strictly at the root level of the ZIP archive (never nested inside a subfolder).\n   - It MUST declare the exact specification version: `oneroster.version,1.1` or `oneroster.version,1.2`.\n   - It MUST list every single file present in the exchange. If a CSV file is present in the archive but omitted from `manifest.csv`, or listed in `manifest.csv` but missing from the zip, the package is rejected.\n\n2. **The Strict Bulk vs Delta Partition**:\n   - One exchange bundle = strictly ONE operational mode.\n   - **Bulk Exchange Mode**: Represents a complete master snapshot. In OneRoster 1.1, rows MUST NOT contain `dateLastModified` or `status` columns. In 1.2, all status fields MUST be `active`.\n   - **Delta Exchange Mode**: Represents incremental changes. Every row MUST contain a valid ISO 8601 UTC timestamp (`YYYY-MM-DDTHH:MM:SS.sssZ`) in `dateLastModified` and a valid status (`active` or `tobedeleted`).\n   - Mixing bulk and delta formats within the same archive is a fatal validation failure.\n\n3. **The Foreign Key Referential Integrity Hierarchy**:\n   - Relational dependency chain:\n     $$\\mathbf{orgs.csv} \\longleftarrow \\mathbf{courses.csv} \\longleftarrow \\mathbf{classes.csv} \\longleftarrow \\mathbf{enrollments.csv} \\longrightarrow \\mathbf{users.csv}$$\n   - Every `schoolSourcedId` in `users.csv` and `classes.csv` MUST resolve to an existing `sourcedId` in `orgs.csv`.\n   - Every `courseSourcedId` in `classes.csv` MUST resolve to `courses.csv`.\n   - Every `userSourcedId` and `classSourcedId` in `enrollments.csv` MUST resolve to active primary keys in `users.csv` and `classes.csv`.\n   - **Zero Orphan Tolerance**: A single orphan link (e.g. enrolling a deleted student ID) invalidates the batch.\n\n4. **Strict Role Enum Constraint Axioms**:\n   - In `users.csv`: `role` MUST strictly match the OneRoster enum:\n     - v1.1: `administrator`, `proctor`, `student`, `teacher`.\n     - v1.2: adds `aide`, `guardian`, `parent`, `staff`.\n   - In `enrollments.csv`: `role` is strictly constrained to `administrator`, `proctor`, `student`, `teacher`. Custom vendor roles (`substitute`, `dean`) must be mapped to valid specification enums.\n   - Primary `sourcedId` values MUST be case-sensitively unique strings (RFC 4122 UUID format strongly recommended).\n\n5. **RFC 4180 CSV & UTF-8 BOM Sanitization**:\n   - Files MUST be encoded in **UTF-8 without Byte Order Mark (BOM)**.\n   - Microsoft Excel frequently prepends `\\xEF\\xBB\\xBF` to CSV exports, corrupting the first column name (`﻿sourcedId` $\\neq$ `sourcedId`).\n   - Fields containing commas, double-quotes, or newlines MUST be enclosed in double quotes (`\"`). Literal quotes inside fields must be escaped as `\"\"`.\n\n## Named Sins & Anti-Patterns (Что категорически ЗАПРЕЩЕНО)\n\n| Anti-Pattern | Manifestation in CSV Packages | Mandatory Production Counter-Rule |\n| :--- | :--- | :--- |\n| **Nested Archive Packaging** | Zipping a parent folder (`district_roster\u002Fmanifest.csv`). | Manifest and CSVs MUST reside at the archive root (`\u002Fmanifest.csv`). |\n| **The UTF-8 BOM Trap** | Excel export injecting `\\xEF\\xBB\\xBF` into `sourcedId`. | Strip BOM headers during pre-flight sanitization pass. |\n| **Orphan Enrollment Links** | `enrollments.csv` pointing to non-existent user IDs. | Enforce foreign key validation across all entity files before import. |\n| **Bulk \u002F Delta Column Bleed** | Including `dateLastModified` or `tobedeleted` in bulk. | Enforce schema separation: bulk files must not contain delta headers. |\n| **Circular Org Hierarchies** | School A listed as parent of School B, and vice-versa. | Perform directed acyclic graph (DAG) cycle detection on `orgs.csv`. |\n| **Illegal Role Strings** | Using non-standard strings like `counselor` or `sub`. | Map all roles to standard enums (`administrator`, `teacher`, `student`). |\n| **Malformed ISO 8601 Timestamps** | Writing `\"09\u002F22\u002F2026 14:00\"` instead of ISO 8601. | Enforce strict RFC 3339 UTC format: `YYYY-MM-DDTHH:MM:SS.sssZ`. |\n| **Unescaped CSV Commas** | Unquoted commas in user names (`Doe, John`) shifting columns. | Wrap text fields containing commas in standard RFC 4180 quotes. |\n| **Missing Mandatory Core Files** | Exporting a bulk zip without `academicSessions.csv`. | Confirm all 7 mandatory core files exist in zip and manifest. |\n| **Hallucinated SourcedIDs** | Inventing arbitrary IDs during reconciliation. | Preserve authoritative SIS primary keys without synthetic generation. |\n\n## Concrete Archetypes \u002F Presets\n\n### Archetype 1: Pre-Flight Python Referential Integrity Linter\n```python\nimport csv\nimport io\nimport re\nimport zipfile\nfrom typing import Dict, List, Set\n\nCORE_FILES = [\n    \"manifest.csv\", \"orgs.csv\", \"users.csv\", \"courses.csv\",\n    \"classes.csv\", \"enrollments.csv\", \"academicSessions.csv\"\n]\nVALID_ROLES_1_1 = {\"administrator\", \"proctor\", \"student\", \"teacher\"}\n\ndef validate_oneroster_archive(zip_path: str) -> dict:\n    errors = []\n    warnings = []\n\n    with zipfile.ZipFile(zip_path, 'r') as z:\n        names = z.namelist()\n\n        # 1. Manifest Root Check\n        if \"manifest.csv\" not in names:\n            return {\"status\": \"FATAL\", \"errors\": [\"manifest.csv missing from zip root.\"]}\n\n        # 2. Extract and Parse Core Sets\n        data: Dict[str, List[dict]] = {}\n        keys: Dict[str, Set[str]] = {}\n\n        for filename in CORE_FILES:\n            if filename in names:\n                raw_bytes = z.read(filename)\n                # Strip UTF-8 BOM if present\n                if raw_bytes.startswith(b'\\xef\\xbb\\xbf'):\n                    warnings.append(f\"{filename} contains UTF-8 BOM; stripped automatically.\")\n                    raw_bytes = raw_bytes[3:]\n\n                reader = csv.DictReader(io.StringIO(raw_bytes.decode('utf-8', errors='replace')))\n                rows = list(reader)\n                data[filename] = rows\n                if rows and \"sourcedId\" in rows[0]:\n                    keys[filename] = {r[\"sourcedId\"] for r in rows if \"sourcedId\" in r}\n            else:\n                errors.append(f\"Mandatory core file missing: {filename}\")\n\n        # 3. Foreign Key Checks\n        if \"orgs.csv\" in keys and \"users.csv\" in data:\n            for r in data[\"users.csv\"]:\n                org_ref = r.get(\"orgSourcedIds\") or r.get(\"schoolSourcedId\")\n                if org_ref and org_ref not in keys[\"orgs.csv\"]:\n                    errors.append(f\"users.csv: user {r.get('sourcedId')} references non-existent org {org_ref}\")\n\n        if \"users.csv\" in keys and \"classes.csv\" in keys and \"enrollments.csv\" in data:\n            for r in data[\"enrollments.csv\"]:\n                uid = r.get(\"userSourcedId\")\n                cid = r.get(\"classSourcedId\")\n                if uid not in keys[\"users.csv\"]:\n                    errors.append(f\"enrollments.csv: orphan enrollment references missing user {uid}\")\n                if cid not in keys[\"classes.csv\"]:\n                    errors.append(f\"enrollments.csv: orphan enrollment references missing class {cid}\")\n\n                role = r.get(\"role\")\n                if role not in VALID_ROLES_1_1:\n                    errors.append(f\"enrollments.csv: illegal role '{role}' on user {uid}\")\n\n    return {\n        \"status\": \"FAILED\" if errors else \"PASSED\",\n        \"errors\": errors,\n        \"warnings\": warnings,\n        \"total_records_checked\": sum(len(v) for v in data.values())\n    }\n```\n\n### Archetype 2: Minimal Valid OneRoster v1.1 Manifest\n```csv\npropertyName,value\noneroster.version,1.1\nfile.orgs,bulk\nfile.users,bulk\nfile.courses,bulk\nfile.classes,bulk\nfile.enrollments,bulk\nfile.academicSessions,bulk\n```\n\n### Archetype 3: Delta Synchronization Row Example\n```csv\nsourcedId,status,dateLastModified,userSourcedId,classSourcedId,role,primary\nenr_99201,active,2026-09-22T08:30:00.000Z,usr_0421,cls_bio101,student,true\nenr_99202,tobedeleted,2026-09-22T08:30:00.000Z,usr_0884,cls_bio101,student,false\n```\n\n## The Pre-Emit Quality Gate Checklist\n\nBefore emitting validation results, CSV transforms, or roster scripts:\n- [ ] **Root Location**: Confirmed `manifest.csv` is located strictly at `\u002F` without folder nesting.\n- [ ] **BOM Scrubbing**: Verified all CSV headers are clean UTF-8 without `\\xEF\\xBB\\xBF`.\n- [ ] **Mode Consistency**: Verified no delta columns exist in bulk packages, and timestamps exist in deltas.\n- [ ] **Referential Integrity**: 100% check of `userSourcedId`, `classSourcedId`, `orgSourcedIds`, and `courseSourcedId`.\n- [ ] **Role Enum Validation**: Confirmed all role values match 1EdTech specifications.\n- [ ] **Cycle-Free Orgs**: DAG validation run on `orgs.csv` to ensure no circular parent references.\n- [ ] **RFC 4180 Escaping**: Commas, quotes, and multi-line values enclosed in double quotes.\n\n## Self-Correction & Verification Loop\n\n### Bad (Vibe-Coded AI Slop Output):\n> \"Zip your CSV folder up and upload it. If Clever says there is a missing manifest, just add a blank manifest.csv inside the folder. If some student IDs are missing in enrollments, just delete those rows or invent temporary user IDs.\"\n*Problems: Nested zip breaks root discovery, blank manifest violates schema, inventing fake IDs corrupts student records, ignores UTF-8 BOM.*\n\n### Good (Production OneRoster CSV Validator Output):\n> 1. Extract zip to verify `\u002Fmanifest.csv` exists at the root path; confirm `oneroster.version` is declared as `1.1`.\n> 2. Scan all CSV headers: detect and strip UTF-8 BOM (`\\xEF\\xBB\\xBF`) from `users.csv` to prevent header corruption.\n> 3. Perform foreign key referential integrity pass:\n>    - Flag 4 orphan rows in `enrollments.csv` referencing deleted student ID `usr_9914`.\n>    - Flag invalid role `\"substitute_teacher\"` on row 14 of `enrollments.csv` (must map to `\"teacher\"`).\n> 4. Verify bulk purity: confirm no `dateLastModified` or `tobedeleted` status flags are present in bulk mode.\n> 5. Emit clean, line-numbered pre-flight audit report before committing to SIS ingestion.\n\n## Limitations\n\n- OneRoster version details and required files can differ by exchange profile and vendor implementation. Validate against the exact 1EdTech specification and recipient's current import contract before rejecting or transforming a roster.\n- Student and staff roster files contain sensitive education records. Process only with authorization, minimize retained data, redact identifiers in diagnostics, and do not upload source CSVs to external services.\n- The included snippets are illustrative, not a complete certified validator; for example, large files, namespaces, delta semantics, and vendor extensions require additional handling and tests.\n","# OneRoster CSV Validator: Strict 1EdTech Data Integrity & Pre-Flight Linter\n\nPerform rigorous pre-flight validation on OneRoster v1.1 and v1.2 CSV roster bundles prior to SIS\u002FClever\u002FClassLink ingestion: audit foreign key referential integrity, eliminate orphan enrollments, enforce bulk vs delta partitioning, and sanitize encoding traps.\n\n## When to Use This Skill\n\nActivate this skill when:\n- Validating or debugging student information system (SIS) roster export packages (`.zip` archives or CSV directories) for OneRoster v1.1 or v1.2 compliance.\n- The user asks: \"Why is Clever rejecting our OneRoster zip file?\", \"Check for orphaned userSourcedIds in enrollments.csv\", \"Validate bulk vs delta mode in OneRoster CSVs\", or \"Sanitize UTF-8 BOM characters from school rosters\".\n- Auditing relational integrity across `manifest.csv`, `orgs.csv`, `users.csv`, `courses.csv`, `classes.csv`, `enrollments.csv`, and `academicSessions.csv`.\n- Preparing automated pre-flight CI\u002FCD pipelines to catch corrupted student or teacher records before nightly SIS sync runs.\n\nDo NOT use this skill when:\n- Integrating OneRoster REST \u002F OAuth 2.0 API endpoints (this skill focuses strictly on CSV table bindings).\n- Generating synthetic or fabricated student PII without authorization.\n- Working on generic non-standard CSV spreadsheets that do not follow 1EdTech specifications.\n\n## Core Mental Models & Non-Negotiable Rules\n\n1. **The Manifest Root Authority Law**:\n   - `manifest.csv` MUST reside strictly at the root level of the ZIP archive (never nested inside a subfolder).\n   - It MUST declare the exact specification version: `oneroster.version,1.1` or `oneroster.version,1.2`.\n   - It MUST list every single file present in the exchange. If a CSV file is present in the archive but omitted from `manifest.csv`, or listed in `manifest.csv` but missing from the zip, the package is rejected.\n\n2. **The Strict Bulk vs Delta Partition**:\n   - One exchange bundle = strictly ONE operational mode.\n   - **Bulk Exchange Mode**: Represents a complete master snapshot. In OneRoster 1.1, rows MUST NOT contain `dateLastModified` or `status` columns. In 1.2, all status fields MUST be `active`.\n   - **Delta Exchange Mode**: Represents incremental changes. Every row MUST contain a valid ISO 8601 UTC timestamp (`YYYY-MM-DDTHH:MM:SS.sssZ`) in `dateLastModified` and a valid status (`active` or `tobedeleted`).\n   - Mixing bulk and delta formats within the same archive is a fatal validation failure.\n\n3. **The Foreign Key Referential Integrity Hierarchy**:\n   - Relational dependency chain:\n     $$\\mathbf{orgs.csv} \\longleftarrow \\mathbf{courses.csv} \\longleftarrow \\mathbf{classes.csv} \\longleftarrow \\mathbf{enrollments.csv} \\longrightarrow \\mathbf{users.csv}$$\n   - Every `schoolSourcedId` in `users.csv` and `classes.csv` MUST resolve to an existing `sourcedId` in `orgs.csv`.\n   - Every `courseSourcedId` in `classes.csv` MUST resolve to `courses.csv`.\n   - Every `userSourcedId` and `classSourcedId` in `enrollments.csv` MUST resolve to active primary keys in `users.csv` and `classes.csv`.\n   - **Zero Orphan Tolerance**: A single orphan link (e.g. enrolling a deleted student ID) invalidates the batch.\n\n4. **Strict Role Enum Constraint Axioms**:\n   - In `users.csv`: `role` MUST strictly match the OneRoster enum:\n     - v1.1: `administrator`, `proctor`, `student`, `teacher`.\n     - v1.2: adds `aide`, `guardian`, `parent`, `staff`.\n   - In `enrollments.csv`: `role` is strictly constrained to `administrator`, `proctor`, `student`, `teacher`. Custom vendor roles (`substitute`, `dean`) must be mapped to valid specification enums.\n   - Primary `sourcedId` values MUST be case-sensitively unique strings (RFC 4122 UUID format strongly recommended).\n\n5. **RFC 4180 CSV & UTF-8 BOM Sanitization**:\n   - Files MUST be encoded in **UTF-8 without Byte Order Mark (BOM)**.\n   - Microsoft Excel frequently prepends `\\xEF\\xBB\\xBF` to CSV exports, corrupting the first column name (`﻿sourcedId` $\\neq$ `sourcedId`).\n   - Fields containing commas, double-quotes, or newlines MUST be enclosed in double quotes (`\"`). Literal quotes inside fields must be escaped as `\"\"`.\n\n## Named Sins & Anti-Patterns (Что категорически ЗАПРЕЩЕНО)\n\n| Anti-Pattern | Manifestation in CSV Packages | Mandatory Production Counter-Rule |\n| :--- | :--- | :--- |\n| **Nested Archive Packaging** | Zipping a parent folder (`district_roster\u002Fmanifest.csv`). | Manifest and CSVs MUST reside at the archive root (`\u002Fmanifest.csv`). |\n| **The UTF-8 BOM Trap** | Excel export injecting `\\xEF\\xBB\\xBF` into `sourcedId`. | Strip BOM headers during pre-flight sanitization pass. |\n| **Orphan Enrollment Links** | `enrollments.csv` pointing to non-existent user IDs. | Enforce foreign key validation across all entity files before import. |\n| **Bulk \u002F Delta Column Bleed** | Including `dateLastModified` or `tobedeleted` in bulk. | Enforce schema separation: bulk files must not contain delta headers. |\n| **Circular Org Hierarchies** | School A listed as parent of School B, and vice-versa. | Perform directed acyclic graph (DAG) cycle detection on `orgs.csv`. |\n| **Illegal Role Strings** | Using non-standard strings like `counselor` or `sub`. | Map all roles to standard enums (`administrator`, `teacher`, `student`). |\n| **Malformed ISO 8601 Timestamps** | Writing `\"09\u002F22\u002F2026 14:00\"` instead of ISO 8601. | Enforce strict RFC 3339 UTC format: `YYYY-MM-DDTHH:MM:SS.sssZ`. |\n| **Unescaped CSV Commas** | Unquoted commas in user names (`Doe, John`) shifting columns. | Wrap text fields containing commas in standard RFC 4180 quotes. |\n| **Missing Mandatory Core Files** | Exporting a bulk zip without `academicSessions.csv`. | Confirm all 7 mandatory core files exist in zip and manifest. |\n| **Hallucinated SourcedIDs** | Inventing arbitrary IDs during reconciliation. | Preserve authoritative SIS primary keys without synthetic generation. |\n\n## Concrete Archetypes \u002F Presets\n\n### Archetype 1: Pre-Flight Python Referential Integrity Linter\n```python\nimport csv\nimport io\nimport re\nimport zipfile\nfrom typing import Dict, List, Set\n\nCORE_FILES = [\n    \"manifest.csv\", \"orgs.csv\", \"users.csv\", \"courses.csv\",\n    \"classes.csv\", \"enrollments.csv\", \"academicSessions.csv\"\n]\nVALID_ROLES_1_1 = {\"administrator\", \"proctor\", \"student\", \"teacher\"}\n\ndef validate_oneroster_archive(zip_path: str) -> dict:\n    errors = []\n    warnings = []\n\n    with zipfile.ZipFile(zip_path, 'r') as z:\n        names = z.namelist()\n\n        # 1. Manifest Root Check\n        if \"manifest.csv\" not in names:\n            return {\"status\": \"FATAL\", \"errors\": [\"manifest.csv missing from zip root.\"]}\n\n        # 2. Extract and Parse Core Sets\n        data: Dict[str, List[dict]] = {}\n        keys: Dict[str, Set[str]] = {}\n\n        for filename in CORE_FILES:\n            if filename in names:\n                raw_bytes = z.read(filename)\n                # Strip UTF-8 BOM if present\n                if raw_bytes.startswith(b'\\xef\\xbb\\xbf'):\n                    warnings.append(f\"{filename} contains UTF-8 BOM; stripped automatically.\")\n                    raw_bytes = raw_bytes[3:]\n\n                reader = csv.DictReader(io.StringIO(raw_bytes.decode('utf-8', errors='replace')))\n                rows = list(reader)\n                data[filename] = rows\n                if rows and \"sourcedId\" in rows[0]:\n                    keys[filename] = {r[\"sourcedId\"] for r in rows if \"sourcedId\" in r}\n            else:\n                errors.append(f\"Mandatory core file missing: {filename}\")\n\n        # 3. Foreign Key Checks\n        if \"orgs.csv\" in keys and \"users.csv\" in data:\n            for r in data[\"users.csv\"]:\n                org_ref = r.get(\"orgSourcedIds\") or r.get(\"schoolSourcedId\")\n                if org_ref and org_ref not in keys[\"orgs.csv\"]:\n                    errors.append(f\"users.csv: user {r.get('sourcedId')} references non-existent org {org_ref}\")\n\n        if \"users.csv\" in keys and \"classes.csv\" in keys and \"enrollments.csv\" in data:\n            for r in data[\"enrollments.csv\"]:\n                uid = r.get(\"userSourcedId\")\n                cid = r.get(\"classSourcedId\")\n                if uid not in keys[\"users.csv\"]:\n                    errors.append(f\"enrollments.csv: orphan enrollment references missing user {uid}\")\n                if cid not in keys[\"classes.csv\"]:\n                    errors.append(f\"enrollments.csv: orphan enrollment references missing class {cid}\")\n\n                role = r.get(\"role\")\n                if role not in VALID_ROLES_1_1:\n                    errors.append(f\"enrollments.csv: illegal role '{role}' on user {uid}\")\n\n    return {\n        \"status\": \"FAILED\" if errors else \"PASSED\",\n        \"errors\": errors,\n        \"warnings\": warnings,\n        \"total_records_checked\": sum(len(v) for v in data.values())\n    }\n```\n\n### Archetype 2: Minimal Valid OneRoster v1.1 Manifest\n```csv\npropertyName,value\noneroster.version,1.1\nfile.orgs,bulk\nfile.users,bulk\nfile.courses,bulk\nfile.classes,bulk\nfile.enrollments,bulk\nfile.academicSessions,bulk\n```\n\n### Archetype 3: Delta Synchronization Row Example\n```csv\nsourcedId,status,dateLastModified,userSourcedId,classSourcedId,role,primary\nenr_99201,active,2026-09-22T08:30:00.000Z,usr_0421,cls_bio101,student,true\nenr_99202,tobedeleted,2026-09-22T08:30:00.000Z,usr_0884,cls_bio101,student,false\n```\n\n## The Pre-Emit Quality Gate Checklist\n\nBefore emitting validation results, CSV transforms, or roster scripts:\n- [ ] **Root Location**: Confirmed `manifest.csv` is located strictly at `\u002F` without folder nesting.\n- [ ] **BOM Scrubbing**: Verified all CSV headers are clean UTF-8 without `\\xEF\\xBB\\xBF`.\n- [ ] **Mode Consistency**: Verified no delta columns exist in bulk packages, and timestamps exist in deltas.\n- [ ] **Referential Integrity**: 100% check of `userSourcedId`, `classSourcedId`, `orgSourcedIds`, and `courseSourcedId`.\n- [ ] **Role Enum Validation**: Confirmed all role values match 1EdTech specifications.\n- [ ] **Cycle-Free Orgs**: DAG validation run on `orgs.csv` to ensure no circular parent references.\n- [ ] **RFC 4180 Escaping**: Commas, quotes, and multi-line values enclosed in double quotes.\n\n## Self-Correction & Verification Loop\n\n### Bad (Vibe-Coded AI Slop Output):\n> \"Zip your CSV folder up and upload it. If Clever says there is a missing manifest, just add a blank manifest.csv inside the folder. If some student IDs are missing in enrollments, just delete those rows or invent temporary user IDs.\"\n*Problems: Nested zip breaks root discovery, blank manifest violates schema, inventing fake IDs corrupts student records, ignores UTF-8 BOM.*\n\n### Good (Production OneRoster CSV Validator Output):\n> 1. Extract zip to verify `\u002Fmanifest.csv` exists at the root path; confirm `oneroster.version` is declared as `1.1`.\n> 2. Scan all CSV headers: detect and strip UTF-8 BOM (`\\xEF\\xBB\\xBF`) from `users.csv` to prevent header corruption.\n> 3. Perform foreign key referential integrity pass:\n>    - Flag 4 orphan rows in `enrollments.csv` referencing deleted student ID `usr_9914`.\n>    - Flag invalid role `\"substitute_teacher\"` on row 14 of `enrollments.csv` (must map to `\"teacher\"`).\n> 4. Verify bulk purity: confirm no `dateLastModified` or `tobedeleted` status flags are present in bulk mode.\n> 5. Emit clean, line-numbered pre-flight audit report before committing to SIS ingestion.\n\n## Limitations\n\n- OneRoster version details and required files can differ by exchange profile and vendor implementation. Validate against the exact 1EdTech specification and recipient's current import contract before rejecting or transforming a roster.\n- Student and staff roster files contain sensitive education records. Process only with authorization, minimize retained data, redact identifiers in diagnostics, and do not upload source CSVs to external services.\n- The included snippets are illustrative, not a complete certified validator; for example, large files, namespaces, delta semantics, and vendor extensions require additional handling and tests.\n",{"name":5,"risk":42,"tags":48,"tools":50,"author":54,"source":38,"license":14,"category":34,"date_added":55,"description":7,"source_repo":56,"source_type":38},[33,26,32,31,30,49],"data-engineering",[51,52,53,36],"claude","cursor","gemini","wwewtech","2026-09-22","wwewtech\u002Foneroster-csv-validator","main","f3312ba749561b6159f477dbfc9313c875d40a56",".agents\u002Fskills_archive\u002Foneroster-csv-validator","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612","2026-10-25 23:50:58",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill oneroster-csv-validator",{"tool":69,"command":70},"bunx","bunx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill oneroster-csv-validator",{"tool":72,"command":73},"pnpm","pnpm dlx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill oneroster-csv-validator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Foneroster-csv-validator\u002FSKILL.md",true,[],[78,105,129,153,180,204],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":87,"publishedAt":43},"01M6Q0FA5FZ410Z33Z3TFQ4DBA","zero-trust","Implement zero-trust network architecture. Configure identity-based access, micro-segmentation, and continuous verification. Use when implementing modern security architectures.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzero-trust\u002FSKILL.md",[84],{"categoryNo":85,"categoryName":86,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000011","运维与部署",[88,89,90,91,92,93,80,94,95,96,97,98,38,57,99,100,101,102,103,104],"ZeRO","trust","zero trust","architecture","assessment","verification","segmentation","devops-security","access","configure","only","active","critical","scope","scripts","relevant","implementing",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":43},"01M6Q0F1YZJW3KX5FBKEVZ8CV4","zcode-delegate","Delegate coding tasks to the Z.AI ZCode CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzcode-delegate\u002FSKILL.md",[],[112,113,114,115,116,117,118,119,120,121,122,123,124,98,125,38,126,127,100,128],"delegate","zcode","zcode delegate","review","cli","orchestration","tasks","run","Bash","model","node","read","orchestrator","files","desktop app","app","agent-orchestration",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":43},"01M6Q0ETK41VGNMYEXW0T00AJN","youtube-transcript","Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript\u002FSKILL.md",[],[136,137,138,42,139,140,141,142,143,144,145,146,147,38,57,148,149,150,151,152],"transcript","youtube transcript","youtube","github","codex","research","license","https","text","fetch","tooling","clean","local","output","deepapi","youtube transcripts","blob",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":170,"publishedAt":43},"01M6Q0EPPH2PVMDW40017F8WX0","youtube-transcript-skills","Fetch YouTube video transcripts, search videos\u002Fchannels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript-skills\u002FSKILL.md",[159,162,165],{"categoryNo":160,"categoryName":161,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":163,"categoryName":164,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":166,"categoryName":167,"taxonomyType":168,"taxonomyTypeDesc":169},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[136,137,138,171,42,53,139,140,142,172,173,174,175,145,176,38,57,177,178,179],"youtube transcript skills","search","api","Video","browse","api-integration","free","card","channels",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":190,"publishedAt":43},"01M6Q0EAB96PX83W5PTE8A0R8D","youtube-notetaker","Turn YouTube talks into local study notes with slides, transcripts, editable annotations, and a markdown-backed viewer.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-notetaker\u002FSKILL.md",[186,189],{"categoryNo":187,"categoryName":188,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":163,"categoryName":164,"taxonomyType":20,"taxonomyTypeDesc":21},[138,191,192,116,42,193,194,195,196,142,174,197,198,199,200,57,201,148,202,203],"youtube notetaker","notetaker","workflow","official","notes","code","markdown","slides","annotations","README","study","dair-academy","viewer",{"skillNo":205,"name":206,"nameZh":6,"description":207,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":208,"categories":209,"keywords":211,"publishedAt":43},"01M6Q0E55F0GW5MX48V8HXS8B5","youtube-full","Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-full\u002FSKILL.md",[210],{"categoryNo":160,"categoryName":161,"taxonomyType":20,"taxonomyTypeDesc":21},[212,138,213,214,42,53,172,215,216,173,174,175,145,217,176,38,57,177,218,151],"youtube full","full","google","server","dlp","credits","automatic"]