Blender Rules logo

Blender Rules

Community
TMHSDigital
blender-rules

Blender 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.

Overview

PublisherTMHSDigital
RepositoryBlender-Developer-Tools
Skill nameblender-rules
Stars
20
Forks
5
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by TMHSDigital on GitHub. Read the source before you install it.

Installation

Install the Blender Rules AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/claude/skills/blender-rules
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TMHSDigital/Blender-Developer-Tools.git /tmp/Blender-Developer-Tools
mkdir -p .claude/skills
cp -r /tmp/Blender-Developer-Tools/claude/skills/blender-rules .claude/skills/blender-rules
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Blender Rules in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Blender Rules on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Blender Rules is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Blender Developer Tools rules (Claude Code)

Apply these when writing or reviewing Blender Python. Each rule links to the full version with Wrong/Right examples.

always-free-bmesh

Flag bmesh.new() calls without a paired bm.free() in a try/finally block. Blender frees an unreferenced BMesh only when its Python wrapper dies, which a traceback, global, closure or modal operator can delay for the whole session; an explicit free() in finally releases it deterministically.

Applies to: **/*.py. Full rule: rules/always-free-bmesh.mdc.

branch-eevee-engine-id

Flag render.engine = 'BLENDER_EEVEE_NEXT' or = 'BLENDER_EEVEE' written without a version branch. EEVEE Next used the id 'BLENDER_EEVEE_NEXT' on 4.2 through 4.5 LTS and took back 'BLENDER_EEVEE' in 5.0; each id raises TypeError (enum not found) on the other side. Branch on bpy.app.version >= (5, 0, 0). See the procedural-materials-and-shaders skill.

Applies to: **/*.py. Full rule: rules/branch-eevee-engine-id.mdc.

no-bgl

Flag import bgl and any bgl. call. The bgl OpenGL wrapper was deprecated in 3.x and is gone in Blender 5.x (importlib.util.find_spec('bgl') is None on 5.0, 5.1 and 5.2), so an add-on that imports it fails to register. Draw with the gpu module, gpu.state and gpu_extras.batch instead; see the gpu-drawing-and-overlays skill.

Applies to: **/*.py. Full rule: rules/no-bgl.mdc.

no-legacy-action-fcurves

Flag action.fcurves, action.groups and action.id_root on an Action. Blender 5.0 removed the flat legacy Action API (AttributeError on 5.x); F-curves live in a channelbag per slot. On 4.4/4.5 LTS the legacy path still runs but is a trap on a fresh Action (it creates a slot without binding it). Reach F-curves through the slot's channelbag, or use obj.keyframe_insert. See the slotted-actions-animation skill.

Applies to: **/*.py. Full rule: rules/no-legacy-action-fcurves.mdc.

no-legacy-vse-sequences

Flag sequence_editor.sequences and .sequences_all. Both are gone in Blender 5.x (AttributeError on 5.0, 5.1 and 5.2), while .strips and .strips_all already exist on 4.5 LTS, so use those everywhere with no version branch. See the vse-python skill.

Applies to: **/*.py. Full rule: rules/no-legacy-vse-sequences.mdc.

no-nodes-modifier-idprop-inputs

Flag writing a Geometry Nodes modifier input as an ID property (mod["Socket_2"] = value, mod[identifier] = value) without a version branch. Blender 5.2 removed that form (it raises TypeError, id properties not supported for this type); 5.2+ writes getattr(mod.properties.inputs, identifier).value, which does not exist on 4.5 LTS or 5.1. Branch on bpy.app.version >= (5, 2, 0). See the geometry-nodes-python skill.

Applies to: **/*.py. Full rule: rules/no-nodes-modifier-idprop-inputs.mdc.

no-removed-normals-api

Flag the mesh normals API removed in Blender 4.1 — use_auto_smooth, auto_smooth_angle, calc_normals_split(), free_normals_split(), create_normals_split(). Each raises AttributeError on 4.5 LTS and 5.x. Use Mesh.set_sharp_from_angle, object.shade_auto_smooth, and Mesh.corner_normals (always current) instead.

Applies to: **/*.py. Full rule: rules/no-removed-normals-api.mdc.

no-unapplied-modifiers-on-export

Flag an export call on objects that still carry unapplied modifiers when the export arguments do not request evaluated geometry. The engine then receives the authored cage, not the modifier result.

Applies to: **/*.py. Full rule: rules/no-unapplied-modifiers-on-export.mdc.

prefer-data-over-ops-in-loops

Flag bpy.ops.* calls inside iteration over many objects, meshes, or frames. Each bpy.ops call triggers a full depsgraph evaluation and UI redraw; loops slow down by orders of magnitude. Use bpy.data.* and bmesh instead.

Applies to: **/*.py. Full rule: rules/prefer-data-over-ops-in-loops.mdc.

prefer-temp-override-over-context-copy

Flag uses of bpy.context.copy() to override context for an operator call. Passing a context dict to an operator was deprecated in Blender 3.2 and removed in 4.0, so it already fails on the 4.5 LTS fallback. Use bpy.context.temp_override(**overrides) as a context manager instead.

Applies to: **/*.py. Full rule: rules/prefer-temp-override-over-context-copy.mdc.

principled-v2-socket-names

Flag Principled BSDF inputs looked up by their 3.x names (inputs["Emission"], ["Specular"], ["Clearcoat"], ["Subsurface"], ["Transmission"], ["Sheen"]) or by index. Principled v2 (Blender 4.0) renamed them, so they raise KeyError on 4.5 LTS and 5.x. Use the 4.0+ names (Emission Color, Specular IOR Level, Coat Weight, ...), which need no version branch. See the procedural-materials-and-shaders skill.

Applies to: **/*.py. Full rule: rules/principled-v2-socket-names.mdc.

target-extensions-platform-format

Flag new Blender add-ons that ship only a legacy bl_info dict without a blender_manifest.toml. New add-ons must use the Extensions Platform format. bl_info may appear alongside as a fallback for backward compatibility, but the manifest is the source of truth.

Applies to: **/__init__.py, **/blender_manifest.toml. Full rule: rules/target-extensions-platform-format.mdc.

type-annotate-props-and-defend-context

Flag two related anti-patterns. (1) bpy.props defined as class-level assignments instead of type annotations (deprecated since 2.8). (2) Code that touches bpy.context.active_object without guarding for None, or that assumes the active object is selected.

Applies to: **/*.py. Full rule: rules/type-annotate-props-and-defend-context.mdc.

use-correct-axis-rna-per-exporter

Flag export_scene.gltf calls that pass FBX axis_forward or axis_up, and export_scene.fbx calls that pass glTF export_yup. The two exporters do not share axis RNA.

Applies to: **/*.py. Full rule: rules/use-correct-axis-rna-per-exporter.mdc.

use-foreach-set-for-bulk-data

Flag Python loops that set vertex coordinates, normals, UVs, or other bulk per-element data one element at a time. For meshes of more than a few thousand elements, this is 100x to 1000x slower than mesh.vertices.foreach_set("co", flat_array), which writes through to C-level storage in one pass.

Applies to: **/*.py. Full rule: rules/use-foreach-set-for-bulk-data.mdc.

validate-imported-mesh-scale

Flag a glTF or FBX import followed by mesh operations with no transform_apply and no unit-scale check. Generated files often arrive with non-identity object scale or a non-meter scene scale; mesh edits then bake the wrong size.

Applies to: **/*.py. Full rule: rules/validate-imported-mesh-scale.mdc.

Frequently asked questions

What does the Blender Rules AI skill do?

Blender 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.

Why use Blender Rules on TypingMind?

Because you install it once and use it with any model. Blender Rules is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Blender Rules in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/claude/skills/blender-rules. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Blender Rules?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Blender Rules?

As many as you like. As long as a model supports skills, you can use Blender Rules with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Blender Rules AI skill free?

It is published on GitHub by TMHSDigital. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇