/blender-bim-sverchok:blender-agents-code-validatorfrom Blender por código, BIM (Bonsai e IfcOpenShell) y Sverchok
Use when reviewing, validating, or auditing Blender Python code for correctness. Runs systematic checks for deprecated API usage, context errors, version compatibility issues, threading violations, data reference invalidation, incorrect operator calls, and addon structure compliance. Prevents shipping code with silent version-dependent failures. Keywords: code review, validation, audit, deprecated API, context error, version compatibility, threading, addon structure, code quality, Blender Python, my addon has errors, check my code, why does my script fail.
Ships in Blender por código, BIM (Bonsai e IfcOpenShell) y Sverchok. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Systematic validation checklist for reviewing Blender Python code. Run this checklist against any Blender Python code to identify errors, deprecations, and anti-patterns.
Activate this validator when:
Run each check in order. Each check has a severity level:
Severity if missing: WARNING
Every Blender Python file MUST declare or imply a target Blender version. Without this, validation cannot determine which APIs are valid.
Detection patterns:
bpy.app.version checksbl_info["blender"] tuple in addon codeblender_manifest.toml in extension code (implies 4.2+)Decision tree:
Has bl_info with "blender" key? → Target = bl_info["blender"] tuple
Has blender_manifest.toml? → Target = 4.2+
Has bpy.app.version checks? → Target = checked range
None of the above? → WARNING: Undeclared target version
Severity: BLOCKER
Scan for context-related errors — the #1 source of Blender Python crashes.
Flag BLOCKER if code calls bpy.ops.* or modifies bpy.data.* inside:
draw() method of any Panel, Header, Menu, UIList, or Gizmobpy.app.timers.register()SpaceView3D.draw_handler_add()Detection: Identify all function definitions. Check parent class. If parent inherits from bpy.types.Panel/Header/Menu/UIList/Gizmo, flag any bpy.ops call or data mutation inside draw().
Flag WARNING if code calls bpy.ops.* without verifying prerequisites:
bpy.ops.object.mode_set(mode='EDIT') without checking context.active_object is not Nonebpy.ops.mesh.* without verifying context.mode == 'EDIT_MESH'bpy.ops.object.modifier_apply() without checking object mode and modifier existencebpy.ops.view3d.* without verifying area type is 'VIEW_3D'Flag BLOCKER if code uses dict-style context overrides on Blender 4.0+:
# BLOCKER on 4.0+: Dict overrides removed
override = bpy.context.copy()
bpy.ops.something(override, ...)
Flag WARNING if code uses dict overrides without version gating (no bpy.app.version check).
Version matrix:
| Blender Version | Dict Override | temp_override |
|---|---|---|
| 3.0 – 3.1 | YES | NO |
| 3.2 – 3.6 | YES (deprecated) | YES |
| 4.0+ | REMOVED | YES |
Severity: BLOCKER for removed APIs, WARNING for deprecated APIs
Scan for APIs removed in each version. Flag BLOCKER if used without version guard:
Removed in 4.0:
mesh.calc_normals() → normals are auto-calculatedbone.layers → use bone.collectionsarmature.bone_groups → removedobj.face_maps → use integer face attributesMeshEdge.bevel_weight → use mesh.attributes with float layerMeshEdge.crease → use mesh.attributes with float layerNodeTree.inputs.new() / NodeTree.outputs.new() → use NodeTree.interface.new_socket()context.temp_override()Removed in 5.0:
bgl module → use gpu moduledel obj["custom_prop"] for RNA properties → use obj.property_unset("prop")scene["cycles"] dict access → use scene.cycles attribute accessimage.bindcode → use gpu.texture.from_image()Removed in 5.1:
Sequence.frame_final_start → use Sequence.frame_startSequence.frame_final_end → use Sequence.frame_endFlag WARNING for deprecated APIs with known removal schedule:
bpy.utils.register_module(__name__) → removed in 2.80, register classes individuallyobj.select = True → use obj.select_set(True) (removed in 2.80)bpy.data.lamps → use bpy.data.lights (removed in 2.80)mesh.uv_textures → use mesh.uv_layers (removed in 2.80)bl_info dict in addon → use blender_manifest.toml for Blender 4.2+ extensionsFlag BLOCKER if EEVEE identifier does not match target version:
| Version | Correct Identifier |
|---|---|
| 3.x | 'BLENDER_EEVEE' |
| 4.2–4.x | 'BLENDER_EEVEE_NEXT' |
| 5.0+ | 'BLENDER_EEVEE' |
Severity: BLOCKER
Flag BLOCKER if code stores bpy.data.* references and uses them after:
bpy.ops.* call (operators can trigger undo)bpy.data.*.remove() callbpy.ops.wm.open_mainfile() / bpy.ops.wm.read_homefile()bpy.ops.object.mode_set().add() / .remove() (re-allocates C arrays)Detection: Track variable assignments from bpy.data.*. If the variable is used after any of the above operations without re-fetching → BLOCKER.
Flag WARNING if code does:
bpy.data.meshes.new("Name")
mesh = bpy.data.meshes["Name"] # May be "Name.001"
Correct pattern: mesh = bpy.data.meshes.new("Name") — capture the return value.
Flag BLOCKER if code creates a data block and object but never calls collection.objects.link(obj):
mesh = bpy.data.meshes.new("Mesh")
obj = bpy.data.objects.new("Object", mesh)
# MISSING: bpy.context.collection.objects.link(obj)
Flag BLOCKER if:
bm.verts[i] accessed without prior bm.verts.ensure_lookup_table() callbmesh.new() used without corresponding bm.free() (except edit-mode BMesh from bmesh.from_edit_mesh())bm.to_mesh(mesh) called without mesh.update() afterwardFlag BLOCKER if mesh.from_pydata() is called without mesh.update() afterward.
Severity: BLOCKER
Flag BLOCKER if any bpy.* call occurs inside:
threading.Thread target functionsconcurrent.futures.ThreadPoolExecutor / ProcessPoolExecutor submitted callablesCorrect pattern: Use queue.Queue + bpy.app.timers.register() to relay results to main thread.
Flag WARNING if a timer callback performs heavy computation (loops over large data sets, file I/O). Timers run on the main thread and block the UI.
Severity: WARNING for structural issues, BLOCKER for registration errors
Flag BLOCKER if register() function:
unregister() before unregistering the typeCorrect order: Register dependencies first (PropertyGroup → Operator → Panel). Unregister in reverse order.
Flag WARNING if addon registers handlers in register() but does not remove them in unregister().
Flag BLOCKER if a handler callback is appended to bpy.app.handlers.* without the @bpy.app.handlers.persistent decorator. Without it, the handler is removed on file load.
Flag BLOCKER if EnumProperty(items=callback_function) where the callback returns a freshly created list without caching it in a persistent variable. The list gets garbage-collected → crash or empty dropdown.
Flag INFO if target is Blender 4.2+ and code uses bl_info dict instead of blender_manifest.toml.
Severity: WARNING
Flag WARNING if bpy.ops.* is used where direct data access achieves the same result:
bpy.ops.object.location_clear() → obj.location = (0, 0, 0)bpy.ops.object.select_all(action='DESELECT') then individual select → obj.select_set()bpy.ops.transform.translate(value=...) → obj.location += Vector(...)Flag WARNING if a custom Operator modifies data but does not set bl_options = {'REGISTER', 'UNDO'}.
Severity: BLOCKER
Flag BLOCKER if code imports bgl on Blender 5.0+. The bgl module is removed.
Flag WARNING if code uses bgl on Blender 4.x without version guard — bgl is deprecated since 3.x.
All drawing code MUST use the gpu module (gpu.shader, gpu.types.GPUBatch, gpu.state).
Code will crash or corrupt data?
├── YES → BLOCKER
│ ├── Context access in restricted callback
│ ├── bpy access from thread
│ ├── Stale reference after undo/remove/mode-switch
│ ├── Removed API without version guard
│ ├── Missing ensure_lookup_table() on BMesh
│ ├── Missing bm.free() on standalone BMesh
│ ├── Missing collection.objects.link()
│ ├── Wrong registration order (PointerProperty before type)
│ ├── Missing @persistent on handler
│ ├── EnumProperty items GC (no cache)
│ ├── bgl import on Blender 5.0+
│ └── Missing mesh.update() after from_pydata()
├── NO → Code uses deprecated API?
│ ├── YES → WARNING
│ │ ├── Deprecated API with known removal version
│ │ ├── Dict context override on 3.2–3.6
│ │ ├── Operator without poll() pre-check
│ │ ├── Unnecessary bpy.ops usage
│ │ ├── Missing handler cleanup in unregister()
│ │ ├── Heavy computation in timer callback
│ │ └── Missing undo support in operator
│ └── NO → Best practice issue?
│ ├── YES → INFO
│ │ ├── No target version declared
│ │ ├── bl_info on 4.2+ (use blender_manifest.toml)
│ │ └── Style/naming conventions
│ └── NO → PASS
When a check fails, apply these fixes automatically where safe:
| Issue | Auto-Fix |
|---|---|
| Dict context override | Replace with context.temp_override() |
obj.select = True | Replace with obj.select_set(True) |
bpy.data.lamps | Replace with bpy.data.lights |
mesh.uv_textures | Replace with mesh.uv_layers |
Missing mesh.update() after from_pydata() | Insert mesh.update() after from_pydata() call |
Missing bm.free() | Insert bm.free() after last bm.to_mesh() call |
Missing ensure_lookup_table() | Insert bm.verts.ensure_lookup_table() before first index access |
Missing collection.objects.link() | Insert bpy.context.collection.objects.link(obj) after objects.new() |
bgl import on 5.0+ | Replace with gpu module equivalents |
scene["cycles"] on 5.0+ | Replace with scene.cycles attribute access |
del obj["prop"] on 5.0+ | Replace with obj.property_unset("prop") |
BLENDER_EEVEE on 4.2–4.x | Replace with BLENDER_EEVEE_NEXT |
bone.layers on 4.0+ | Replace with bone.collections usage |
NodeTree.inputs.new() on 4.0+ | Replace with NodeTree.interface.new_socket() |
Missing @persistent on handler | Add @bpy.app.handlers.persistent decorator |
After running all checks, produce a report:
## Validation Report
Target Version: Blender X.Y
Total Issues: N
### BLOCKERS (N)
- [CHECK X.Y] Description — file:line
### WARNINGS (N)
- [CHECK X.Y] Description — file:line
### INFO (N)
- [CHECK X.Y] Description — file:line
### Auto-Fixes Applied (N)
- Description — file:line
blender-core-api — bpy module structure and data access patternsblender-core-versions — Version matrix and breaking changesblender-core-runtime — Threading, handlers, timers, mathutilsblender-errors-context — Context error diagnosis and resolutionblender-errors-data — Data reference errors and safe access patternsblender-errors-version — Version compatibility error diagnosisWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lagzgabrielmuller-dot/kit-ingenieria-3d --plugin blender-bim-sverchok73 skills in this plugin
/aec-agents-workflow-orchestratorUse when a task spans multiple AEC technologies (Blender, IfcOpenShell, Bonsai, Sverchok) and you need to decide which tool handles which step, or when orchestrating multi-step BIM pipelines such as IFC creation to visualization to authoring. Prevents the common mistake of mixing IfcStore.get_file() with ifcopenshell.open() in the same context, or calling Bonsai operators outside a Bonsai-loaded session. Provides decision trees for technology selection, workflow sequencing, and bridge patterns between tools. Keywords: cross-technology, workflow orchestration, BIM pipeline, technology selection, Blender IfcOpenShell Bonsai integration, multi-step AEC, bridge pattern, which tool should I use, combine Blender and IFC, multi-tool workflow, how to connect tools.
/aec-core-bim-workflowsUse when implementing end-to-end BIM workflows that combine IfcOpenShell, Bonsai, and Blender -- such as IFC creation from scratch, model enrichment, validation pipelines, geometry extraction, or batch processing of building models. Prevents the common mistake of skipping unit and context setup before creating geometry, or directly modifying IFC attributes instead of using ifcopenshell.api.run(). Covers property set management across tools, spatial hierarchy patterns, and version compatibility for IFC2X3/IFC4/IFC4X3. Keywords: BIM workflow, IFC creation, model validation, property extraction, batch processing, spatial hierarchy, cross-technology, IfcOpenShell Bonsai Blender, pset management, how to create IFC model, step by step BIM, get properties from IFC.
Other plugins' skills for the same job