blender-operation-rules

blender-operation-rules is a skill for Claude Code, Codex from IvanYangYangXi/artclaw_bridge. It costs 119 tokens per session (2,292 once invoked), scanned A, original, MIT.

A set of rules for modifying scenes in Blender through Python. It explains Blender’s coordinate system, undo handling, context behavior, and changes in Blender 5.x’s animation data system.

In plain words
What is it for?
Use it before changing Blender scenes, such as creating, editing, deleting, positioning, or animating objects through Python.
Why use it?
It helps an agent make Blender changes consistently and safely, including keeping operations undoable and avoiding API mistakes caused by newer Blender versions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before changing Blender scenes, such as creating, editing, deleting, positioning, or animating objects through Python.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ivanyangyangxi/artclaw_bridge/blender-operation-rules
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add IvanYangYangXi/artclaw_bridge --skill blender-operation-rules
Clone the repo
git clone --depth 1 https://github.com/IvanYangYangXi/artclaw_bridge

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for blender-operation-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivanyangyangxi/artclaw_bridge/blender-operation-rules/github.svg)](https://agentmods.dev/skills/ivanyangyangxi/artclaw_bridge/blender-operation-rules)
Your own site
<a href="https://agentmods.dev/skills/ivanyangyangxi/artclaw_bridge/blender-operation-rules"><img src="https://agentmods.dev/badge/skills/ivanyangyangxi/artclaw_bridge/blender-operation-rules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for blender-operation-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/ivanyangyangxi/artclaw_bridge/blender-operation-rules"><img src="https://agentmods.dev/badge/skills/ivanyangyangxi/artclaw_bridge/blender-operation-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,292 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00119 $0.02292
Opus 5 $0.00060 $0.01146
Sonnet 5 $0.00024 $0.00458
Haiku 4.5 $0.00012 $0.00229

Measured 11d ago against content hash bcc535938229, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

blender-operation-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/official/blender/blender-operation-rules/SKILL.md · 275 lines

How it starts

The opening of the file, as written. The whole thing — 275 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Blender 操作通用规则

强制要求:所有涉及 Blender 场景修改的 AI 操作都必须遵守以下规则。


规则 0:预注入变量

mcp_blender-editor_run_python 执行代码时,以下变量已自动注入,无需手动 import 或赋值

变量 说明
bpy bpy 模块 Blender Python API
S list(bpy.context.selected_objects) 选中对象列表(执行时快照)
W bpy.data.filepath 当前文件路径(未保存则为空字符串)
L bpy 模块 标准 Library 引用(与其他 DCC 统一命名)
C bpy.context 上下文(Blender 惯例快捷变量)
D bpy.data 数据管理器(Blender 惯例快捷变量)
  • 将返回值赋给 result 变量,框架会自动提取并返回。
  • CD 是 Blender 自带 Python 控制台的标准惯例。

规则 1:坐标系

  • Blender 使用 Z-up 右手坐标系
  • 正面朝 -Y 方向(相机默认看向 -Z)
  • 旋转单位为 弧度,使用 math.radians() 转换:
import math
obj.rotation_euler = (math.radians(90), 0, 0)  # 绕 X 轴旋转 90°

规则 2:Undo 管理

  • execute_code 执行前会自动调用 bpy.ops.ed.undo_push(message="ArtClaw AI")
  • 用户可通过单次 Ctrl+Z 撤销 AI 的操作
  • 破坏性操作前(删除对象、清空场景等),建议先打印当前状态以便确认:
# 删除前先记录
print(f"即将删除 {len(S)} 个对象: {[o.name for o in S]}")

规则 3:Blender 5.x Layered Action 系统(Breaking Change)

关键变化:Blender 5.1+ 中,action.fcurves 属性已移除。

  • 新版 Action 默认使用 Layered Action 系统:action.is_action_layered == True
  • FCurves 必须通过分层路径访问:action.layers[].strips[].channelbags[].fcurves

正确的 FCurves 遍历方式

def get_all_fcurves(action):
    """兼容 Blender 5.x 的 FCurves 获取"""
    fcurves = []
    if hasattr(action, 'is_action_layered') and action.is_action_layered:
        # Blender 5.x Layered Action
        for layer in action.layers:
            for strip in layer.strips:
                for channelbag in strip.channelbags:
                    fcurves.extend(channelbag.fcurves)
    else:
        # Legacy Action(Blender 4.x 及更早)
        fcurves.extend(action.fcurves)
    return fcurves

错误示例(会在 5.x 报错)

# ❌ 错误:action.fcurves 在 5.x 中不存在
for fc in action.fcurves:
    print(fc.data_path)

规则 4:Principled BSDF 输入名变化(Blender 5.x)

Blender 5.x 中部分 Principled BSDF 输入名已更改:

旧名称(4.x) 新名称(5.x)
Specular Specular IOR Level
Transmission Transmission Weight

Read the full file on GitHub · 275 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 275 lines · 119 tokens per session scan A bcc535938229

Subscribe to this mod's changes

blender-operation-rules is a skill published in the GitHub repository IvanYangYangXi/artclaw_bridge (35 stars, last pushed 4mo ago), licensed MIT. It adds 119 tokens to every session and 2,292 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dcc-mcp-core

Foundation library for the DCC Model Context Protocol (MCP) ecosystem. Provides Rust-powered action management, skills system, IPC transport, MCP Streamable HTTP server (2025-03-26 spec, with 2025-06-18 and 2025-11-25 awareness), sandbox security, shared memory, screen capture, USD scene support, and telemetry for…

dcc-mcp/dcc-mcp-core · 109 tokens

maya-pipeline

Domain skill — Maya asset pipeline orchestration: set up project directory structures, export scenes to USD, and coordinate multi-step DCC workflows. Use when initialising a Maya project or exporting assets for a downstream pipeline. Not for raw geometry editing — use maya-geometry for that. Not for low-level USD file…

dcc-mcp/dcc-mcp-core · 74 tokens

imagemagick-tools

Infrastructure skill — image processing and manipulation via ImageMagick: resize, composite, convert formats, add watermarks. Use when batch-processing textures, thumbnails, or rendered images at the file level. Not for in-DCC texture or material editing — use a domain skill bound to the specific DCC for that.

dcc-mcp/dcc-mcp-core · 67 tokens

asset-source

Gateway skill for cross-DCC asset import — search and resolve assets into a validated AssetDescriptor (local path + attribution). Demo source returns static catalog entries; production sources can add download or remote resolution without changing the contract.

dcc-mcp/dcc-mcp-core · 47 tokens

ffmpeg-media

Infrastructure skill — media conversion and processing via FFmpeg: convert video/audio formats, extract frames, resize, and transcode. Use when manipulating raw media files (mp4, mov, wav, image sequences) regardless of DCC context. Not for DCC-specific render output handling — use a domain pipeline skill for…

dcc-mcp/dcc-mcp-core · 77 tokens

maya-geometry

Domain skill — Maya geometry primitives: create spheres, cubes, cylinders; bevel, extrude, and merge polygon components. Use for individual geometry creation or editing operations inside Maya. Not for full asset export pipelines — use maya-pipeline for that. Not for USD scene inspection — use usd-tools for that.

dcc-mcp/dcc-mcp-core · 65 tokens