[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FAAVWFTMFYRTSTW28PRXE5":3,"skill-same:01M7FAAVWFTMFYRTSTW28PRXE5":62},{"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":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":13,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7FAAVWFTMFYRTSTW28PRXE5","ifcos-agents-code-validator",null,"Use when reviewing, validating, or auditing IfcOpenShell Python code for correctness. Runs systematic checks for schema compatibility errors, incorrect API usage (direct attribute modification vs api.run), entity reference invalidation, performance anti-patterns, and IFC standard compliance. Prevents shipping code that works on one schema but fails on another. Keywords: code review, validation, audit, IfcOpenShell, API usage, schema compatibility, entity reference, performance, code quality, check my IFC script, review IfcOpenShell code.","lagzgabrielmuller-dot\u002Fkit-ingenieria-3d","lagzgabrielmuller-dot","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F333339260?v=4","01M7F985KYC0XB2XZ97B5YWH4C","01M7F985MHK8N2NVE4VAR5WBWS",0,"MIT","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fifcopenshell\u002Fagents\u002Fifcos-agents-code-validator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: ifcos-agents-code-validator\ndescription: >\n  Use when reviewing, validating, or auditing IfcOpenShell Python code for correctness.\n  Runs systematic checks for schema compatibility errors, incorrect API usage (direct\n  attribute modification vs api.run), entity reference invalidation, performance anti-patterns,\n  and IFC standard compliance. Prevents shipping code that works on one schema but fails\n  on another.\n  Keywords: code review, validation, audit, IfcOpenShell, API usage, schema compatibility, entity reference, performance, code quality, check my IFC script, review IfcOpenShell code.\nlicense: MIT\ncompatibility: \"Designed for Claude Code. Requires IfcOpenShell Python library.\"\nmetadata:\n  author: OpenAEC-Foundation\n  version: \"1.0\"\n---\n\n# IfcOpenShell Code Validator Agent\n\n## Quick Reference\n\n### When to Activate This Validator\n\nActivate this validation checklist when:\n- Reviewing IfcOpenShell Python code for correctness\n- Auditing IFC file manipulation scripts before production use\n- Checking code that creates, modifies, or reads IFC files\n- Validating code that processes IFC geometry\n- Reviewing code that handles multiple IFC schema versions\n- Assessing performance of scripts processing large IFC files (100MB+)\n\n### Severity Levels\n\n| Severity | Meaning | Action |\n|----------|---------|--------|\n| **BLOCKER** | Code will crash, corrupt data, or produce invalid IFC files | MUST fix before code is accepted |\n| **WARNING** | Code has potential bugs, performance issues, or fragile patterns | SHOULD fix; document reason if deferred |\n| **INFO** | Code works but does not follow best practices | MAY fix; note for future improvement |\n\n---\n\n## Validation Checklist\n\nExecute these checks in order. Each check references the dependency skill that defines the rule.\n\n### Step 1: Schema Awareness (BLOCKER)\n\n**Source: ifcos-errors-schema**\n\n```\nCode uses IFC entities?\n├── Does code check model.schema before using schema-specific entities?\n│   ├── NO → BLOCKER: Add schema check\n│   └── YES → Pass\n│\n├── Does code use any *StandardCase entity (IfcWallStandardCase, etc.)?\n│   ├── YES + no IFC4X3 guard → BLOCKER: StandardCase removed in IFC4X3\n│   └── NO or guarded → Pass\n│\n├── Does code use IfcBuiltElement or IfcBuildingElement?\n│   ├── YES + no schema branch → BLOCKER: Name differs by schema\n│   └── Handled → Pass\n│\n├── Does code use IfcDoorStyle\u002FIfcWindowStyle?\n│   ├── YES + targets IFC4+ → BLOCKER: Use IfcDoorType\u002FIfcWindowType\n│   └── Handled → Pass\n│\n├── Does code use IFC4X3-only entities (IfcRoad, IfcBridge, IfcAlignment)?\n│   ├── YES + schema != \"IFC4X3\" → BLOCKER: Entity does not exist\n│   └── Correct schema → Pass\n│\n└── Does code access PredefinedType on IFC2X3 entities?\n    ├── YES + no hasattr guard → BLOCKER: Most IFC2X3 entities lack PredefinedType\n    └── Guarded → Pass\n```\n\n### Step 2: API Usage Correctness (BLOCKER)\n\n**Source: ifcos-syntax-api, ifcos-errors-patterns**\n\n```\nCode creates or modifies IFC entities?\n├── Uses model.create_entity() for production code?\n│   └── BLOCKER: Use ifcopenshell.api.run(\"root.create_entity\", ...) instead\n│\n├── Uses ifcopenshell.api.run() or direct module calls?\n│   ├── Invents non-existent API modules\u002Ffunctions?\n│   │   └── BLOCKER: Verify against the 35 API modules table\n│   ├── Uses positional arguments after model?\n│   │   └── BLOCKER: ALWAYS use keyword arguments\n│   └── Passes single element where list is required (v0.8+)?\n│       └── BLOCKER: products=, related_objects= require lists\n│\n├── Modifies entity attributes directly (wall.Name = \"X\")?\n│   ├── For Name\u002FDescription → WARNING: Use api.run(\"attribute.edit_attributes\", ...)\n│   └── For relationships (ContainedInStructure, IsTypedBy) → BLOCKER: Use API\n│\n├── Creates relationships manually (model.create_entity(\"IfcRelContained...\"))?\n│   └── BLOCKER: Use spatial.assign_container, aggregate.assign_object, etc.\n│\n└── Creates IFC file with ifcopenshell.file() for production use?\n    └── WARNING: Use ifcopenshell.api.run(\"project.create_file\", ...) instead\n```\n\n### Step 3: File I\u002FO Correctness (BLOCKER\u002FWARNING)\n\n**Source: ifcos-syntax-fileio**\n\n```\nCode opens or creates IFC files?\n├── Uses ifcopenshell.file() without explicit schema= parameter?\n│   └── WARNING: ALWAYS specify schema explicitly\n│\n├── Uses project.create_file() with schema= instead of version=?\n│   └── BLOCKER: Parameter name is version=, not schema=\n│\n├── Creates file without IfcProject + units + context + spatial hierarchy?\n│   └── WARNING: Incomplete IFC files cause downstream failures\n│\n├── Calls model.remove() directly on products?\n│   └── BLOCKER: Use api.run(\"root.remove_product\", ...) for safe removal\n│\n├── Uses transactions?\n│   ├── Missing end_transaction() or discard_transaction()?\n│   │   └── BLOCKER: Open transactions cause undefined behavior\n│   └── Calls undo()\u002Fredo() inside active transaction?\n│       └── BLOCKER: NEVER call undo\u002Fredo during active transaction\n│\n└── Writes to disk?\n    └── Pass (model.write() is safe)\n```\n\n### Step 4: Entity Reference Safety (BLOCKER)\n\n**Source: ifcos-errors-patterns**\n\n```\nCode removes entities or uses undo?\n├── Accesses entity attributes after model.remove()?\n│   └── BLOCKER: Entity wrapper is invalid after removal\n│\n├── Iterates and removes simultaneously?\n│   └── BLOCKER: Collect to list first, then remove\n│\n├── Caches entity references across file modifications?\n│   └── BLOCKER: References invalidate after remove\u002Fundo\n│\n└── Extracts data before removal?\n    └── Pass\n```\n\n### Step 5: None Return Value Handling (BLOCKER)\n\n**Source: ifcos-errors-patterns**\n\n```\nCode calls utility functions that return None?\n├── Uses get_container(element).Name without None check?\n│   └── BLOCKER: get_container returns None if no containment\n│\n├── Uses get_type(element).Name without None check?\n│   └── BLOCKER: get_type returns None if no type assigned\n│\n├── Uses get_material(element) without None check?\n│   └── BLOCKER: get_material returns None if no material\n│\n├── Uses geom.create_shape() without try\u002Fexcept RuntimeError?\n│   └── BLOCKER: Geometry processing fails for many elements\n│\n└── Uses model.by_guid() without None check?\n    └── WARNING: Returns None if GUID not found\n```\n\n### Step 6: GUID Handling (BLOCKER)\n\n**Source: ifcos-errors-patterns**\n\n```\nCode creates entities with GlobalId?\n├── Uses uuid.uuid4() or str(uuid) for GlobalId?\n│   └── BLOCKER: IFC requires 22-char base64 GUID; use ifcopenshell.guid.new()\n│\n├── Reuses same GUID for multiple entities?\n│   └── BLOCKER: Every entity MUST have a unique GlobalId\n│\n└── Uses ifcopenshell.api.run(\"root.create_entity\") (auto-generates)?\n    └── Pass\n```\n\n### Step 7: Unit Handling (WARNING)\n\n**Source: ifcos-errors-patterns**\n\n```\nCode reads coordinates or dimensions from IFC files?\n├── Assumes coordinates are in meters?\n│   └── WARNING: ALWAYS call ifcopenshell.util.unit.calculate_unit_scale(model)\n│\n├── Applies unit_scale to all extracted coordinates?\n│   └── Pass\n│\n└── Creates geometry with hardcoded values?\n    └── INFO: Document assumed unit system in comments\n```\n\n### Step 8: Property Set Handling (WARNING)\n\n**Source: ifcos-errors-patterns**\n\n```\nCode creates property sets?\n├── Creates pset without checking for existing one?\n│   └── WARNING: Produces duplicate property sets; check get_psets() first\n│\n├── Creates pset manually without IfcRelDefinesByProperties?\n│   └── BLOCKER: Orphaned pset; use api.run(\"pset.add_pset\", ...)\n│\n└── Uses api.run(\"pset.add_pset\") + api.run(\"pset.edit_pset\")?\n    └── Pass\n```\n\n### Step 9: Performance Patterns (WARNING)\n\n**Source: ifcos-errors-performance**\n\n```\nCode processes geometry for multiple elements?\n├── Calls create_shape() in a loop for 10+ elements?\n│   └── WARNING: Use ifcopenshell.geom.iterator instead (5-10x faster)\n│\n├── Uses geom.iterator without multiprocessing.cpu_count()?\n│   └── WARNING: Pass cpu_count() for optimal parallelism\n│\n├── Stores all geometry shapes in memory simultaneously?\n│   └── WARNING: Process each shape and discard immediately\n│\n├── Uses get_info(recursive=True) on large files?\n│   └── WARNING: Materializes entire entity graph; extract specific attributes\n│\n├── Opens same large file multiple times?\n│   └── WARNING: Open once, pass model reference\n│\n├── Iterates all entities with `for e in model` instead of by_type()?\n│   └── WARNING: by_type() is O(1), full iteration is O(n)\n│\n├── Calls spatial.assign_container per-element instead of batching?\n│   └── WARNING: Pass all products in one call\n│\n└── Processes 200MB+ file without gc.collect() between batches?\n    └── INFO: Add gc.collect() between processing phases\n```\n\n### Step 10: IFC2X3 Compatibility (BLOCKER)\n\n**Source: ifcos-errors-schema**\n\n```\nCode targets or handles IFC2X3 files?\n├── Creates entities without OwnerHistory?\n│   └── BLOCKER in IFC2X3: OwnerHistory is REQUIRED on all IfcRoot subclasses\n│\n├── Uses ifcopenshell.api.run() for entity creation?\n│   └── Pass (API handles OwnerHistory automatically)\n│\n├── Queries IfcContext (does not exist in IFC2X3)?\n│   └── BLOCKER: Use IfcProject directly\n│\n└── Uses IfcDoorType\u002FIfcWindowType on IFC2X3?\n    └── BLOCKER: Use IfcDoorStyle\u002FIfcWindowStyle for IFC2X3\n```\n\n---\n\n## Decision Trees\n\n### Decision Tree: Severity Classification\n\n```\nIs the issue...\n├── A crash, data corruption, or invalid IFC output?\n│   └── BLOCKER\n│       Examples:\n│       - Schema mismatch (entity not found)\n│       - Invalid entity reference after removal\n│       - Missing OwnerHistory in IFC2X3\n│       - Dangling references from model.remove()\n│       - Wrong GUID format\n│       - Open transaction never closed\n│\n├── A potential bug, performance problem, or fragile pattern?\n│   └── WARNING\n│       Examples:\n│       - Missing None check on get_container()\n│       - create_shape() loop instead of iterator\n│       - No unit scale applied\n│       - Duplicate property sets\n│       - Per-element API calls instead of batch\n│\n└── A best-practice deviation with no functional impact?\n    └── INFO\n        Examples:\n        - Implicit schema parameter\n        - Missing gc.collect() call\n        - Hardcoded unit assumptions (documented)\n```\n\n### Decision Tree: Auto-Fix Applicability\n\n```\nCan this issue be auto-fixed?\n├── Schema entity name substitution?\n│   └── YES: Replace with version-aware branching\n│\n├── model.remove() → api.run(\"root.remove_product\")?\n│   └── YES: Direct substitution\n│\n├── model.create_entity() → api.run(\"root.create_entity\")?\n│   └── YES: Add ifc_class= and name= parameters\n│\n├── Missing None check on utility return value?\n│   └── YES: Wrap in `if result is not None:` guard\n│\n├── create_shape() loop → iterator?\n│   └── PARTIAL: Requires restructuring; provide template\n│\n├── Single element → list parameter?\n│   └── YES: Wrap in list brackets [element]\n│\n└── Missing schema check?\n    └── PARTIAL: Insert model.schema check; pattern depends on context\n```\n\n---\n\n## Auto-Fix Patterns\n\n### Fix 1: Single Element to List Parameter (v0.8+)\n\n```python\n# BEFORE (BLOCKER):\nifcopenshell.api.run(\"spatial.assign_container\", model,\n    product=wall, relating_structure=storey)\n\n# AFTER:\nifcopenshell.api.run(\"spatial.assign_container\", model,\n    products=[wall], relating_structure=storey)\n```\n\n### Fix 2: Direct Removal to Safe API Removal\n\n```python\n# BEFORE (BLOCKER):\nmodel.remove(wall)\n\n# AFTER:\nifcopenshell.api.run(\"root.remove_product\", model, product=wall)\n```\n\n### Fix 3: Low-Level Entity Creation to API\n\n```python\n# BEFORE (BLOCKER):\nwall = model.create_entity(\"IfcWall\",\n    GlobalId=ifcopenshell.guid.new(), Name=\"Wall 001\")\n\n# AFTER:\nwall = ifcopenshell.api.run(\"root.create_entity\", model,\n    ifc_class=\"IfcWall\", name=\"Wall 001\")\n```\n\n### Fix 4: Missing None Guard\n\n```python\n# BEFORE (BLOCKER):\ncontainer = ifcopenshell.util.element.get_container(wall)\nprint(container.Name)\n\n# AFTER:\ncontainer = ifcopenshell.util.element.get_container(wall)\nif container is not None:\n    print(container.Name)\n```\n\n### Fix 5: UUID to IFC GUID\n\n```python\n# BEFORE (BLOCKER):\nimport uuid\nwall = model.create_entity(\"IfcWall\", GlobalId=str(uuid.uuid4()))\n\n# AFTER:\nwall = ifcopenshell.api.run(\"root.create_entity\", model,\n    ifc_class=\"IfcWall\", name=\"Wall\")\n# Or if manual creation is required:\nwall = model.create_entity(\"IfcWall\",\n    GlobalId=ifcopenshell.guid.new(), Name=\"Wall\")\n```\n\n### Fix 6: Iterate-and-Remove to Collect-Then-Remove\n\n```python\n# BEFORE (BLOCKER):\nfor wall in model.by_type(\"IfcWall\"):\n    model.remove(wall)\n\n# AFTER:\nwalls_to_remove = list(model.by_type(\"IfcWall\"))\nfor wall in walls_to_remove:\n    ifcopenshell.api.run(\"root.remove_product\", model, product=wall)\n```\n\n### Fix 7: create_shape Loop to Iterator\n\n```python\n# BEFORE (WARNING):\n# IfcOpenShell: all schema versions\nfor wall in model.by_type(\"IfcWall\"):\n    shape = ifcopenshell.geom.create_shape(settings, wall)\n    process(shape)\n\n# AFTER:\n# IfcOpenShell: all schema versions\nimport multiprocessing\nwalls = model.by_type(\"IfcWall\")\niterator = ifcopenshell.geom.iterator(\n    settings, model, multiprocessing.cpu_count(), include=walls)\nif iterator.initialize():\n    while True:\n        shape = iterator.get()\n        process(shape)\n        if not iterator.next():\n            break\n```\n\n### Fix 8: Schema-Aware Entity Selection\n\n```python\n# BEFORE (BLOCKER):\n# IfcOpenShell: assumes single schema\nelements = model.by_type(\"IfcBuildingElement\")\n\n# AFTER:\n# IfcOpenShell: all schema versions\nschema = model.schema\nif schema == \"IFC4X3\":\n    elements = model.by_type(\"IfcBuiltElement\")\nelse:\n    elements = model.by_type(\"IfcBuildingElement\")\n```\n\n---\n\n## Validation Report Format\n\nAfter running all checks, produce a report in this format:\n\n```\n## IfcOpenShell Code Validation Report\n\n### Summary\n- BLOCKERS: [count]\n- WARNINGS: [count]\n- INFO: [count]\n\n### BLOCKER Issues\n1. [Line X]: [Description] — [Fix reference]\n\n### WARNING Issues\n1. [Line X]: [Description] — [Fix reference]\n\n### INFO Issues\n1. [Line X]: [Description] — [Fix reference]\n\n### Verdict\n[PASS \u002F FAIL (if any BLOCKERS exist)]\n```\n\n---\n\n## Reference Links\n\n- [Validation Rules and Detection Patterns](references\u002Fmethods.md)\n- [Before\u002FAfter Validation Fix Examples](references\u002Fexamples.md)\n- [Anti-Patterns Catalog](references\u002Fanti-patterns.md)\n\n### Dependency Skills (define the rules this validator checks)\n- **ifcos-syntax-fileio** — File I\u002FO patterns and transaction management\n- **ifcos-syntax-api** — API module system, invocation patterns, parameter conventions\n- **ifcos-errors-patterns** — Error categories, debugging strategies, None handling\n- **ifcos-errors-schema** — Schema version differences, entity availability, migration\n- **ifcos-errors-performance** — Geometry iterator, caching, memory management\n\n### External References\n- IfcOpenShell Documentation: https:\u002F\u002Fdocs.ifcopenshell.org\u002F\n- IFC Schema Specifications: https:\u002F\u002Ftechnical.buildingsmart.org\u002Fstandards\u002Fifc\u002Fifc-schema-specifications\u002F\n","# IfcOpenShell Code Validator Agent\n\n## Quick Reference\n\n### When to Activate This Validator\n\nActivate this validation checklist when:\n- Reviewing IfcOpenShell Python code for correctness\n- Auditing IFC file manipulation scripts before production use\n- Checking code that creates, modifies, or reads IFC files\n- Validating code that processes IFC geometry\n- Reviewing code that handles multiple IFC schema versions\n- Assessing performance of scripts processing large IFC files (100MB+)\n\n### Severity Levels\n\n| Severity | Meaning | Action |\n|----------|---------|--------|\n| **BLOCKER** | Code will crash, corrupt data, or produce invalid IFC files | MUST fix before code is accepted |\n| **WARNING** | Code has potential bugs, performance issues, or fragile patterns | SHOULD fix; document reason if deferred |\n| **INFO** | Code works but does not follow best practices | MAY fix; note for future improvement |\n\n---\n\n## Validation Checklist\n\nExecute these checks in order. Each check references the dependency skill that defines the rule.\n\n### Step 1: Schema Awareness (BLOCKER)\n\n**Source: ifcos-errors-schema**\n\n```\nCode uses IFC entities?\n├── Does code check model.schema before using schema-specific entities?\n│   ├── NO → BLOCKER: Add schema check\n│   └── YES → Pass\n│\n├── Does code use any *StandardCase entity (IfcWallStandardCase, etc.)?\n│   ├── YES + no IFC4X3 guard → BLOCKER: StandardCase removed in IFC4X3\n│   └── NO or guarded → Pass\n│\n├── Does code use IfcBuiltElement or IfcBuildingElement?\n│   ├── YES + no schema branch → BLOCKER: Name differs by schema\n│   └── Handled → Pass\n│\n├── Does code use IfcDoorStyle\u002FIfcWindowStyle?\n│   ├── YES + targets IFC4+ → BLOCKER: Use IfcDoorType\u002FIfcWindowType\n│   └── Handled → Pass\n│\n├── Does code use IFC4X3-only entities (IfcRoad, IfcBridge, IfcAlignment)?\n│   ├── YES + schema != \"IFC4X3\" → BLOCKER: Entity does not exist\n│   └── Correct schema → Pass\n│\n└── Does code access PredefinedType on IFC2X3 entities?\n    ├── YES + no hasattr guard → BLOCKER: Most IFC2X3 entities lack PredefinedType\n    └── Guarded → Pass\n```\n\n### Step 2: API Usage Correctness (BLOCKER)\n\n**Source: ifcos-syntax-api, ifcos-errors-patterns**\n\n```\nCode creates or modifies IFC entities?\n├── Uses model.create_entity() for production code?\n│   └── BLOCKER: Use ifcopenshell.api.run(\"root.create_entity\", ...) instead\n│\n├── Uses ifcopenshell.api.run() or direct module calls?\n│   ├── Invents non-existent API modules\u002Ffunctions?\n│   │   └── BLOCKER: Verify against the 35 API modules table\n│   ├── Uses positional arguments after model?\n│   │   └── BLOCKER: ALWAYS use keyword arguments\n│   └── Passes single element where list is required (v0.8+)?\n│       └── BLOCKER: products=, related_objects= require lists\n│\n├── Modifies entity attributes directly (wall.Name = \"X\")?\n│   ├── For Name\u002FDescription → WARNING: Use api.run(\"attribute.edit_attributes\", ...)\n│   └── For relationships (ContainedInStructure, IsTypedBy) → BLOCKER: Use API\n│\n├── Creates relationships manually (model.create_entity(\"IfcRelContained...\"))?\n│   └── BLOCKER: Use spatial.assign_container, aggregate.assign_object, etc.\n│\n└── Creates IFC file with ifcopenshell.file() for production use?\n    └── WARNING: Use ifcopenshell.api.run(\"project.create_file\", ...) instead\n```\n\n### Step 3: File I\u002FO Correctness (BLOCKER\u002FWARNING)\n\n**Source: ifcos-syntax-fileio**\n\n```\nCode opens or creates IFC files?\n├── Uses ifcopenshell.file() without explicit schema= parameter?\n│   └── WARNING: ALWAYS specify schema explicitly\n│\n├── Uses project.create_file() with schema= instead of version=?\n│   └── BLOCKER: Parameter name is version=, not schema=\n│\n├── Creates file without IfcProject + units + context + spatial hierarchy?\n│   └── WARNING: Incomplete IFC files cause downstream failures\n│\n├── Calls model.remove() directly on products?\n│   └── BLOCKER: Use api.run(\"root.remove_product\", ...) for safe removal\n│\n├── Uses transactions?\n│   ├── Missing end_transaction() or discard_transaction()?\n│   │   └── BLOCKER: Open transactions cause undefined behavior\n│   └── Calls undo()\u002Fredo() inside active transaction?\n│       └── BLOCKER: NEVER call undo\u002Fredo during active transaction\n│\n└── Writes to disk?\n    └── Pass (model.write() is safe)\n```\n\n### Step 4: Entity Reference Safety (BLOCKER)\n\n**Source: ifcos-errors-patterns**\n\n```\nCode removes entities or uses undo?\n├── Accesses entity attributes after model.remove()?\n│   └── BLOCKER: Entity wrapper is invalid after removal\n│\n├── Iterates and removes simultaneously?\n│   └── BLOCKER: Collect to list first, then remove\n│\n├── Caches entity references across file modifications?\n│   └── BLOCKER: References invalidate after remove\u002Fundo\n│\n└── Extracts data before removal?\n    └── Pass\n```\n\n### Step 5: None Return Value Handling (BLOCKER)\n\n**Source: ifcos-errors-patterns**\n\n```\nCode calls utility functions that return None?\n├── Uses get_container(element).Name without None check?\n│   └── BLOCKER: get_container returns None if no containment\n│\n├── Uses get_type(element).Name without None check?\n│   └── BLOCKER: get_type returns None if no type assigned\n│\n├── Uses get_material(element) without None check?\n│   └── BLOCKER: get_material returns None if no material\n│\n├── Uses geom.create_shape() without try\u002Fexcept RuntimeError?\n│   └── BLOCKER: Geometry processing fails for many elements\n│\n└── Uses model.by_guid() without None check?\n    └── WARNING: Returns None if GUID not found\n```\n\n### Step 6: GUID Handling (BLOCKER)\n\n**Source: ifcos-errors-patterns**\n\n```\nCode creates entities with GlobalId?\n├── Uses uuid.uuid4() or str(uuid) for GlobalId?\n│   └── BLOCKER: IFC requires 22-char base64 GUID; use ifcopenshell.guid.new()\n│\n├── Reuses same GUID for multiple entities?\n│   └── BLOCKER: Every entity MUST have a unique GlobalId\n│\n└── Uses ifcopenshell.api.run(\"root.create_entity\") (auto-generates)?\n    └── Pass\n```\n\n### Step 7: Unit Handling (WARNING)\n\n**Source: ifcos-errors-patterns**\n\n```\nCode reads coordinates or dimensions from IFC files?\n├── Assumes coordinates are in meters?\n│   └── WARNING: ALWAYS call ifcopenshell.util.unit.calculate_unit_scale(model)\n│\n├── Applies unit_scale to all extracted coordinates?\n│   └── Pass\n│\n└── Creates geometry with hardcoded values?\n    └── INFO: Document assumed unit system in comments\n```\n\n### Step 8: Property Set Handling (WARNING)\n\n**Source: ifcos-errors-patterns**\n\n```\nCode creates property sets?\n├── Creates pset without checking for existing one?\n│   └── WARNING: Produces duplicate property sets; check get_psets() first\n│\n├── Creates pset manually without IfcRelDefinesByProperties?\n│   └── BLOCKER: Orphaned pset; use api.run(\"pset.add_pset\", ...)\n│\n└── Uses api.run(\"pset.add_pset\") + api.run(\"pset.edit_pset\")?\n    └── Pass\n```\n\n### Step 9: Performance Patterns (WARNING)\n\n**Source: ifcos-errors-performance**\n\n```\nCode processes geometry for multiple elements?\n├── Calls create_shape() in a loop for 10+ elements?\n│   └── WARNING: Use ifcopenshell.geom.iterator instead (5-10x faster)\n│\n├── Uses geom.iterator without multiprocessing.cpu_count()?\n│   └── WARNING: Pass cpu_count() for optimal parallelism\n│\n├── Stores all geometry shapes in memory simultaneously?\n│   └── WARNING: Process each shape and discard immediately\n│\n├── Uses get_info(recursive=True) on large files?\n│   └── WARNING: Materializes entire entity graph; extract specific attributes\n│\n├── Opens same large file multiple times?\n│   └── WARNING: Open once, pass model reference\n│\n├── Iterates all entities with `for e in model` instead of by_type()?\n│   └── WARNING: by_type() is O(1), full iteration is O(n)\n│\n├── Calls spatial.assign_container per-element instead of batching?\n│   └── WARNING: Pass all products in one call\n│\n└── Processes 200MB+ file without gc.collect() between batches?\n    └── INFO: Add gc.collect() between processing phases\n```\n\n### Step 10: IFC2X3 Compatibility (BLOCKER)\n\n**Source: ifcos-errors-schema**\n\n```\nCode targets or handles IFC2X3 files?\n├── Creates entities without OwnerHistory?\n│   └── BLOCKER in IFC2X3: OwnerHistory is REQUIRED on all IfcRoot subclasses\n│\n├── Uses ifcopenshell.api.run() for entity creation?\n│   └── Pass (API handles OwnerHistory automatically)\n│\n├── Queries IfcContext (does not exist in IFC2X3)?\n│   └── BLOCKER: Use IfcProject directly\n│\n└── Uses IfcDoorType\u002FIfcWindowType on IFC2X3?\n    └── BLOCKER: Use IfcDoorStyle\u002FIfcWindowStyle for IFC2X3\n```\n\n---\n\n## Decision Trees\n\n### Decision Tree: Severity Classification\n\n```\nIs the issue...\n├── A crash, data corruption, or invalid IFC output?\n│   └── BLOCKER\n│       Examples:\n│       - Schema mismatch (entity not found)\n│       - Invalid entity reference after removal\n│       - Missing OwnerHistory in IFC2X3\n│       - Dangling references from model.remove()\n│       - Wrong GUID format\n│       - Open transaction never closed\n│\n├── A potential bug, performance problem, or fragile pattern?\n│   └── WARNING\n│       Examples:\n│       - Missing None check on get_container()\n│       - create_shape() loop instead of iterator\n│       - No unit scale applied\n│       - Duplicate property sets\n│       - Per-element API calls instead of batch\n│\n└── A best-practice deviation with no functional impact?\n    └── INFO\n        Examples:\n        - Implicit schema parameter\n        - Missing gc.collect() call\n        - Hardcoded unit assumptions (documented)\n```\n\n### Decision Tree: Auto-Fix Applicability\n\n```\nCan this issue be auto-fixed?\n├── Schema entity name substitution?\n│   └── YES: Replace with version-aware branching\n│\n├── model.remove() → api.run(\"root.remove_product\")?\n│   └── YES: Direct substitution\n│\n├── model.create_entity() → api.run(\"root.create_entity\")?\n│   └── YES: Add ifc_class= and name= parameters\n│\n├── Missing None check on utility return value?\n│   └── YES: Wrap in `if result is not None:` guard\n│\n├── create_shape() loop → iterator?\n│   └── PARTIAL: Requires restructuring; provide template\n│\n├── Single element → list parameter?\n│   └── YES: Wrap in list brackets [element]\n│\n└── Missing schema check?\n    └── PARTIAL: Insert model.schema check; pattern depends on context\n```\n\n---\n\n## Auto-Fix Patterns\n\n### Fix 1: Single Element to List Parameter (v0.8+)\n\n```python\n# BEFORE (BLOCKER):\nifcopenshell.api.run(\"spatial.assign_container\", model,\n    product=wall, relating_structure=storey)\n\n# AFTER:\nifcopenshell.api.run(\"spatial.assign_container\", model,\n    products=[wall], relating_structure=storey)\n```\n\n### Fix 2: Direct Removal to Safe API Removal\n\n```python\n# BEFORE (BLOCKER):\nmodel.remove(wall)\n\n# AFTER:\nifcopenshell.api.run(\"root.remove_product\", model, product=wall)\n```\n\n### Fix 3: Low-Level Entity Creation to API\n\n```python\n# BEFORE (BLOCKER):\nwall = model.create_entity(\"IfcWall\",\n    GlobalId=ifcopenshell.guid.new(), Name=\"Wall 001\")\n\n# AFTER:\nwall = ifcopenshell.api.run(\"root.create_entity\", model,\n    ifc_class=\"IfcWall\", name=\"Wall 001\")\n```\n\n### Fix 4: Missing None Guard\n\n```python\n# BEFORE (BLOCKER):\ncontainer = ifcopenshell.util.element.get_container(wall)\nprint(container.Name)\n\n# AFTER:\ncontainer = ifcopenshell.util.element.get_container(wall)\nif container is not None:\n    print(container.Name)\n```\n\n### Fix 5: UUID to IFC GUID\n\n```python\n# BEFORE (BLOCKER):\nimport uuid\nwall = model.create_entity(\"IfcWall\", GlobalId=str(uuid.uuid4()))\n\n# AFTER:\nwall = ifcopenshell.api.run(\"root.create_entity\", model,\n    ifc_class=\"IfcWall\", name=\"Wall\")\n# Or if manual creation is required:\nwall = model.create_entity(\"IfcWall\",\n    GlobalId=ifcopenshell.guid.new(), Name=\"Wall\")\n```\n\n### Fix 6: Iterate-and-Remove to Collect-Then-Remove\n\n```python\n# BEFORE (BLOCKER):\nfor wall in model.by_type(\"IfcWall\"):\n    model.remove(wall)\n\n# AFTER:\nwalls_to_remove = list(model.by_type(\"IfcWall\"))\nfor wall in walls_to_remove:\n    ifcopenshell.api.run(\"root.remove_product\", model, product=wall)\n```\n\n### Fix 7: create_shape Loop to Iterator\n\n```python\n# BEFORE (WARNING):\n# IfcOpenShell: all schema versions\nfor wall in model.by_type(\"IfcWall\"):\n    shape = ifcopenshell.geom.create_shape(settings, wall)\n    process(shape)\n\n# AFTER:\n# IfcOpenShell: all schema versions\nimport multiprocessing\nwalls = model.by_type(\"IfcWall\")\niterator = ifcopenshell.geom.iterator(\n    settings, model, multiprocessing.cpu_count(), include=walls)\nif iterator.initialize():\n    while True:\n        shape = iterator.get()\n        process(shape)\n        if not iterator.next():\n            break\n```\n\n### Fix 8: Schema-Aware Entity Selection\n\n```python\n# BEFORE (BLOCKER):\n# IfcOpenShell: assumes single schema\nelements = model.by_type(\"IfcBuildingElement\")\n\n# AFTER:\n# IfcOpenShell: all schema versions\nschema = model.schema\nif schema == \"IFC4X3\":\n    elements = model.by_type(\"IfcBuiltElement\")\nelse:\n    elements = model.by_type(\"IfcBuildingElement\")\n```\n\n---\n\n## Validation Report Format\n\nAfter running all checks, produce a report in this format:\n\n```\n## IfcOpenShell Code Validation Report\n\n### Summary\n- BLOCKERS: [count]\n- WARNINGS: [count]\n- INFO: [count]\n\n### BLOCKER Issues\n1. [Line X]: [Description] — [Fix reference]\n\n### WARNING Issues\n1. [Line X]: [Description] — [Fix reference]\n\n### INFO Issues\n1. [Line X]: [Description] — [Fix reference]\n\n### Verdict\n[PASS \u002F FAIL (if any BLOCKERS exist)]\n```\n\n---\n\n## Reference Links\n\n- [Validation Rules and Detection Patterns](references\u002Fmethods.md)\n- [Before\u002FAfter Validation Fix Examples](references\u002Fexamples.md)\n- [Anti-Patterns Catalog](references\u002Fanti-patterns.md)\n\n### Dependency Skills (define the rules this validator checks)\n- **ifcos-syntax-fileio** — File I\u002FO patterns and transaction management\n- **ifcos-syntax-api** — API module system, invocation patterns, parameter conventions\n- **ifcos-errors-patterns** — Error categories, debugging strategies, None handling\n- **ifcos-errors-schema** — Schema version differences, entity availability, migration\n- **ifcos-errors-performance** — Geometry iterator, caching, memory management\n\n### External References\n- IfcOpenShell Documentation: https:\u002F\u002Fdocs.ifcopenshell.org\u002F\n- IFC Schema Specifications: https:\u002F\u002Ftechnical.buildingsmart.org\u002Fstandards\u002Fifc\u002Fifc-schema-specifications\u002F\n",{"name":5,"license":14,"metadata":23,"description":26,"compatibility":27},{"author":24,"version":25},"OpenAEC-Foundation","1.0","Use when reviewing, validating, or auditing IfcOpenShell Python code for correctness. Runs systematic checks for schema compatibility errors, incorrect API usage (direct attribute modification vs api.run), entity reference invalidation, performance anti-patterns, and IFC standard compliance. Prevents shipping code that works on one schema but fails on another. Keywords: code review, validation, audit, IfcOpenShell, API usage, schema compatibility, entity reference, performance, code quality, check my IFC script, review IfcOpenShell code.\n","Designed for Claude Code. Requires IfcOpenShell Python library.","main","9bb7acf0c2ec4f44373969cb14e55af3c9a8385f","plugins\u002Fblender-bim-sverchok\u002Fskills\u002Fifcopenshell\u002Fagents\u002Fifcos-agents-code-validator","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot","2026-11-09 13:26:47",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill ifcos-agents-code-validator",{"tool":40,"command":41},"bunx","bunx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill ifcos-agents-code-validator",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill ifcos-agents-code-validator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fifcopenshell\u002Fagents\u002Fifcos-agents-code-validator\u002FSKILL.md",true,[48,54,58],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fanti-patterns.md","REFERENCE","参考文档",16503,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fifcopenshell\u002Fagents\u002Fifcos-agents-code-validator\u002Freferences\u002Fanti-patterns.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fexamples.md",15683,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fifcopenshell\u002Fagents\u002Fifcos-agents-code-validator\u002Freferences\u002Fexamples.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fmethods.md",15875,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fifcopenshell\u002Fagents\u002Fifcos-agents-code-validator\u002Freferences\u002Fmethods.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":67,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M7FBFSZ93YM463CGS91D0TZG","manimce-best-practices","Trigger when: (1) User mentions \"manim\" or \"Manim Community\" or \"ManimCE\", (2) Code contains `from manim import *`, (3) User runs `manim` CLI commands, (4) Working with Scene, MathTex, Create(), or ManimCE-specific classes.\n\nBest practices for Manim Community Edition - the community-maintained Python animation engine. Covers Scene structure, animations, LaTeX\u002FMathTex, 3D with ThreeDScene, camera control, styling, and CLI usage.\n\nNOT for ManimGL\u002F3b1b version (which uses `manimlib` imports and `manimgl` CLI).","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fmanim-animaciones\u002Fskills\u002Fmanimce-best-practices\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fmanim-animaciones\u002Fskills\u002Fmanimce-best-practices\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7FB2K59HNNXS9WKHAMWHC3C","drawio","Create, edit, replicate, import, and export draw.io diagrams with an offline YAML-first workflow: architecture, network topologies, flowcharts, UML\u002FER, org charts, Mermaid\u002FCSV conversion, existing .drawio bundles, style presets, themes, and non-publication formula diagrams. For publication figures (paper, thesis, IEEE, camera-ready) use drawio-academic-skills instead.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fdiagramas-y-documentos\u002Fskills\u002Fdrawio\u002FSKILL.md",[],[],{"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":84,"publishedAt":18},"01M7FB2BWX7GWK9H2X8BGCYDDD","drawio-academic-skills","Publication-figure overlay for draw.io. Use instead of drawio whenever the diagram is for a paper, thesis, dissertation, journal, conference, IEEE\u002FACM submission, manuscript, camera-ready, Word\u002FLaTeX figure, or other publication. Applies venue, figure-type, color, caption\u002Flegend, formula, and paper-readability gates for architecture, workflow, roadmap, network-topology, and replicated paper figures.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fdiagramas-y-documentos\u002Fskills\u002Fdrawio-academic-skills\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7FB22JESEAV8T15DJT3D444","uncertainty-and-units","Tracks physical units and propagates measurement uncertainty in scientific calculations using pint and uncertainties. Use for unit conversion and dimensional checking, GUM uncertainty budgets, Type A and Type B evaluation, coverage factors and expanded uncertainty, Monte Carlo propagation, significant-figure and plus-minus reporting, error propagation through curve fits, CODATA constants, auditing Python code for stripped units or broken uncertainty propagation, and order-of-magnitude plausibility checks using dimensionless groups (Reynolds, Peclet, Damkohler, Knudsen, Biot, Womersley), characteristic scales such as diffusion time or Debye length, and observed magnitude ranges. Trigger on \"is this number physically reasonable\", \"sanity check these units\", \"what regime is this flow in\", or a result that looks off by orders of magnitude.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Funcertainty-and-units\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M7FB1ANRSG28R335FDY9SA3R","statistical-analysis","Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting. Use whenever a user wants to compare groups, test a hypothesis, analyze experimental or survey data, check statistical assumptions, compute required sample sizes, or write up results - even if they never name a specific test. Covers t-tests, ANOVA, chi-square, correlation, regression, non-parametric and Bayesian methods. For low-level model APIs, see the statsmodels and pymc skills.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Fstatistical-analysis\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":18},"01M7FB15KRA9D7JCPH4P9T6XJY","simpy","Builds, inspects, tests, and analyzes bounded process-based discrete-event simulations with SimPy. Use for event scheduling, resource queues, interrupts, monitoring, independent replications, warm-up, and reproducible output analysis.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Fsimpy\u002FSKILL.md",[],[]]