/blender-developer-tools:addon-scaffoldingfrom blender-developer-tools
Scaffolds Blender add-ons as Extensions Platform packages with blender_manifest.toml, modular layout, and register/unregister patterns. Targets 5.2 LTS with 4.5 LTS fallback.
Ships in blender-developer-tools. 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.
None: SKILL.md is the whole skill.
Use this skill when the user:
bl_info, blender_manifest.toml, "extension", "register_classes_factory"bl_info format to the Extensions Platformid, human-readable name)blender_version_min = "4.5.0" so the add-on works on 4.5 LTS, 5.1 and 5.2 LTS)Name <[email protected]> form)SPDX:MIT, SPDX:GPL-2.0-or-later, etc.)Since 4.2 and required in 5.x for new submissions to the official extensions site, add-ons ship as Extensions. An Extension is a directory containing a blender_manifest.toml plus Python modules.
blender_manifest.toml required fieldsschema_version = "1.0.0"
id = "my_addon"
version = "0.1.0"
name = "My Add-on"
tagline = "Short description, max 64 chars, no trailing period"
maintainer = "Your Name <[email protected]>"
type = "add-on"
blender_version_min = "4.5.0"
license = ["SPDX:GPL-3.0-or-later"]
copyright = ["2026 TMHSDigital"]
Field rules that AIs commonly get wrong:
tagline is hard-capped at 64 characters and must not end with a period. Blender's manifest validator rejects both.id must be a valid Python identifier with no double underscore and no leading or trailing underscore: my_tool passes; com.acme.tool, _tool, tool_ and my__tool fail blender --command extension validate (pkg_idname_is_valid_or_error in the bundled blender_ext.py, same rules on 4.5 and 5.2). The directory name does not need to match the id but conventionally does.license and copyright are arrays of strings, not bare strings.blender_version_min is the floor. Setting it to "4.5.0" lets the same code run on 4.5 LTS and any 5.x. Setting it to "5.0.0" cuts off LTS users with no warning.schema_version is "1.0.0" for the current manifest schema. Do not bump it.Optional but commonly wanted:
website = "https://github.com/TMHSDigital/your-repo"
tags = ["Mesh", "Geometry Nodes"]
permissions = { network = "Optional, only used to fetch updates" }
tags must come from Blender's known tag list. permissions maps each capability the add-on uses to a human-readable reason; the valid keys are files, network, clipboard, camera and microphone. It is a declaration shown to users and reviewers on the extensions platform, not a sandbox: Blender does not restrict what add-on Python can do, with or without it. Declare everything the code actually uses. For network access, also honor bpy.app.online_access (the user's "Allow Online Access" preference) and do nothing online when it is False.
The conventional layout for a non-trivial add-on:
my_addon/
blender_manifest.toml
__init__.py # registration entry point only
operators.py # Operator subclasses
panels.py # Panel subclasses
properties.py # PropertyGroup subclasses, PointerProperty bindings
utils.py # Pure helpers, no bpy imports beyond types
Keep __init__.py small. It registers and unregisters classes; everything else lives in submodules.
register_classes_factory patternThis is the canonical 5.x registration pattern. It eliminates the loop boilerplate that AIs frequently bug.
import bpy
from bpy.utils import register_classes_factory
from . import operators, panels, properties
classes = (
properties.MyAddonProperties,
operators.MESH_OT_my_addon_action,
panels.VIEW3D_PT_my_addon,
)
_register_classes, _unregister_classes = register_classes_factory(classes)
def register():
_register_classes()
bpy.types.Scene.my_addon = bpy.props.PointerProperty(type=properties.MyAddonProperties)
def unregister():
del bpy.types.Scene.my_addon
_unregister_classes()
Why this pattern:
register_classes_factory returns a (register, unregister) pair that loops over classes in the right direction (forward for register, reverse for unregister) and skips the wrong-order foot-gun.bpy.types.Scene.my_addon = ...) must be deleted before the corresponding PropertyGroup class is unregistered. Hence del bpy.types.Scene.my_addon precedes _unregister_classes().PropertyGroup subclasses must come before any class that references them via PointerProperty.import bpy
from bpy.utils import register_classes_factory
class MY_ADDON_PG_settings(bpy.types.PropertyGroup):
intensity: bpy.props.FloatProperty(name="Intensity", default=1.0, min=0.0, max=10.0)
class MESH_OT_my_addon_action(bpy.types.Operator):
bl_idname = "mesh.my_addon_action"
bl_label = "My Addon Action"
bl_options = {'REGISTER', 'UNDO'}
@classmethod
def poll(cls, context):
return context.active_object is not None and context.active_object.type == 'MESH'
def execute(self, context):
obj = context.active_object
settings = context.scene.my_addon
self.report({'INFO'}, f"Ran on {obj.name} with intensity {settings.intensity:.2f}")
return {'FINISHED'}
class VIEW3D_PT_my_addon(bpy.types.Panel):
bl_label = "My Addon"
bl_idname = "VIEW3D_PT_my_addon"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = "My Addon"
def draw(self, context):
layout = self.layout
settings = context.scene.my_addon
layout.prop(settings, "intensity")
layout.operator("mesh.my_addon_action")
classes = (
MY_ADDON_PG_settings,
MESH_OT_my_addon_action,
VIEW3D_PT_my_addon,
)
_register_classes, _unregister_classes = register_classes_factory(classes)
def register():
_register_classes()
bpy.types.Scene.my_addon = bpy.props.PointerProperty(type=MY_ADDON_PG_settings)
def unregister():
del bpy.types.Scene.my_addon
_unregister_classes()
Emitting only bl_info and skipping blender_manifest.toml. New add-ons must ship as Extensions for the official extensions platform. bl_info may appear alongside the manifest as a fallback for backward compatibility, but the manifest is the source of truth.
Manual register/unregister loops with the wrong direction:
# WRONG: same direction in unregister, classes referencing each other will fail
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls) # missing reversed()
Use register_classes_factory and let it own the order.
Forgetting to delete bound properties before unregister. Unregistering MY_ADDON_PG_settings while bpy.types.Scene.my_addon still points to it does not raise: the class goes away and the pointer stays registered, pointing at a type that no longer exists. Reading that property afterwards returned an empty stub on 4.5.14 and crashed Blender 5.2.1 (EXCEPTION_ACCESS_VIOLATION). Delete the pointer first, then unregister the classes in reverse. Witness: examples/addon-register-lifecycle/ (--classes-first leaves the pointer behind, exit 6).
Overlong tagline or trailing period in tagline. The validator rejects both.
Hardcoding blender_version_min = "5.0.0" without reason. Cuts off the LTS user base. Default to "4.5.0" unless you genuinely require a 5.x-only API.
blender_manifest.toml alone covers 4.2 and later, including 4.5 LTS and 5.2 LTS: with blender_version_min = "4.5.0", a bl_info dict adds nothing. Keep bl_info alongside the manifest only if the add-on must also install on 4.1 or earlier, or through the legacy add-on folder / "Install legacy Add-on" path. Blender prefers the manifest when both are present.
bl_info = {
"name": "My Addon",
"blender": (4, 5, 0),
"version": (0, 1, 0),
"category": "Mesh",
}
extension-addon-template template under templates/ for a ready-to-copy version of this layout.operators, ui-panels, and custom-properties skills for the contents of each submodule.target-extensions-platform-format and type-annotate-props-and-defend-context.Each example runs headless, asserts the contract, and exits non-zero when it breaks. Run one with blender --background --python <script> --; pass a falsifier flag to watch the check fail.
addon-register-lifecycle: Check-only witness for the first things every add-on author writes. Falsify: --drop-manifest (exit 3).Short standalone patterns to copy. Each one runs in CI on 5.2 and 4.5 with a check and a falsifier.
bpy.utils.register_classes_factory: https://docs.blender.org/api/current/bpy.utils.htmlWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tmhsdigital/blender-developer-tools --plugin blender-developer-tools27 skills in this plugin
/ai-mesh-cleanupOrdered cleanup for an imported generated or scanned mesh before it goes to an engine: scene units, apply rotation and scale, origin to base, recalculate normals, evaluated triangle count, decimate to a budget, convex collider. Use when the user has a GLB, glTF or FBX that is not engine-ready, mentions unit scale, unapplied transforms, triangle budget, LODs or a collision hull, or is about to run mesh operations on an import without checking its scale. Targets 5.2 LTS with 4.5 LTS fallback./bake-high-to-lowCage-bake high-poly surface detail onto a low-poly target as a tangent-space normal map with bpy.ops.object.bake (Cycles, selected-to-active, active Image Texture node, UV layer, save_render). Use when the user wants a normal map from a dense mesh onto a game-resolution or decimated LOD, mentions cage_extrusion or use_selected_to_active, or gets a bake that returns CANCELLED, comes out black or flat, or fails with 'No active UV layer found'. Targets 5.2 LTS with 4.5 LTS fallback./blender-rulesBlender Python anti-pattern rules (bmesh leaks, bpy.ops in loops, deprecated context-copy overrides, bulk mesh writes, prop annotations and context guards, Extensions manifest, import scale, export modifiers, glTF/FBX axis RNA, the removed bgl module, the normals API removed in 4.1). Use when writing, reviewing or fixing any bpy / Blender add-on or script code./bl-info-migrationMigrate a legacy bl_info add-on to the Extensions Platform in three steps, with a before/after diff and the dual-format pattern. Use when the user has a bl_info dictionary in __init__.py, asks whether bl_info is deprecated or still supported, wants to publish to extensions.blender.org or ship an extension .zip, or sees warnings about legacy add-ons at install time. Targets 5.2 LTS; manifests work from 4.2./compositor-nodesBuild and render through the scene compositor from Python across the 4.5 LTS to 5.x split: scene.use_nodes plus scene.node_tree and a Composite node on 4.5, a CompositorNodeTree node group assigned to scene.compositing_node_group with interface sockets and a Group Output on 5.x, a Render Layers to Glare (Fog Glow) chain, the Glare node's move from enum properties to menu input sockets, and render.use_compositing. Use when the user scripts compositor nodes, adds bloom or glow, hits AttributeError on scene.node_tree in 5.x, sets glare_type or quality and gets AttributeError on 5.x, looks for the removed EEVEE use_bloom toggle, or renders and sees no compositor effect. Targets 5.2 LTS with 4.5 LTS fallback./constraints-and-parentingParent objects without moving them, aim them with constraints, and author empties as engine attach sockets, all on the data API: child.parent plus matrix_parent_inverse = parent.matrix_world.inverted(), stale matrix_world until view_layer.update(), Object.constraints.new('DAMPED_TRACK') read back through the evaluated depsgraph, right-handed socket bases, and the transform_apply-on-an-Empty-root hazard. Use when a child teleports after `.parent =`, matrix_world reads old values, a script calls bpy.ops.object.constraint_add in a loop, an aim constraint rolls or does nothing, or a spawn system seats modules on SKT_ socket empties with an identity local transform. Targets 5.2 LTS with 4.5 LTS fallback.Other plugins' skills for the same job