sp-operation-rules

sp-operation-rules is a skill for Claude Code, Codex from IvanYangYangXi/artclaw_bridge. It costs 128 tokens per session (1,908 once invoked), scanned A, original, MIT.

A guide to operating Substance Painter, a tool for painting materials and textures onto 3D models. It explains the Python interface, project checks, layer and texture-set work, baking, exporting, and precautions for changes that cannot be undone through the interface.

In plain words
What is it for?
Use it when opening or checking projects, editing layer stacks and texture sets, baking model data, exporting textures, or carrying out other Substance Painter operations through Python.
Why use it?
It helps prevent errors such as using the wrong Python module, editing a project that is not open, or losing work during irreversible changes. Saving before destructive operations provides a recovery point.

Skill for Claude CodeCodex

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

Good fit Use it when opening or checking projects, editing layer stacks and texture sets, baking model data, exporting textures, or carrying out other Substance Painter operations through Python.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ivanyangyangxi/artclaw_bridge/sp-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 sp-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 sp-operation-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivanyangyangxi/artclaw_bridge/sp-operation-rules/github.svg)](https://agentmods.dev/skills/ivanyangyangxi/artclaw_bridge/sp-operation-rules)
Your own site
<a href="https://agentmods.dev/skills/ivanyangyangxi/artclaw_bridge/sp-operation-rules"><img src="https://agentmods.dev/badge/skills/ivanyangyangxi/artclaw_bridge/sp-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 sp-operation-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/ivanyangyangxi/artclaw_bridge/sp-operation-rules"><img src="https://agentmods.dev/badge/skills/ivanyangyangxi/artclaw_bridge/sp-operation-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,908 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.00128 $0.01908
Opus 5 $0.00064 $0.00954
Sonnet 5 $0.00026 $0.00382
Haiku 4.5 $0.00013 $0.00191

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

Security

Grade A, and why

sp-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 12d 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/substance_painter/sp-operation-rules/SKILL.md · 257 lines

How it starts

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

SP 操作通用规则

所有涉及 Substance Painter 场景修改的操作都必须遵守以下规则。

⚠️ 仅适用于 Substance Painter — 通过 run_python 执行


📦 规则 0:API 模块

SP Python API 模块为 substance_painter不是 sp

核心子模块:

子模块 用途
substance_painter.project 项目管理(打开/保存/关闭)
substance_painter.textureset 纹理集管理
substance_painter.layerstack 层栈操作(核心)
substance_painter.export 纹理导出
substance_painter.baking 贴图烘焙
# ✅ 正确导入
import substance_painter.project
import substance_painter.textureset
import substance_painter.layerstack

# ❌ 错误 — 不要用缩写
import substance_painter as sp  # 导入本身可以,但代码中应使用完整模块路径

✅ 规则 1:项目状态检查(强制)

每次操作前必须检查项目是否已打开。 未打开项目时大部分 API 调用会抛出异常。

import substance_painter.project

if not substance_painter.project.is_open():
    print("❌ 错误:没有打开的项目,请先打开一个 SP 项目")
else:
    # ... 安全执行操作 ...
    pass

获取项目路径

import substance_painter.project

if substance_painter.project.is_open():
    file_path = substance_painter.project.file_path()
    print(f"当前项目: {file_path}")

⚠️ 规则 2:无 Undo API — 破坏性操作须谨慎

SP Python API 不支持 undo group 或撤销管理。一旦执行,无法通过 API 回滚。

强制要求

  1. 破坏性操作前保存项目
import substance_painter.project

# 在删除层、批量修改等操作前先保存
substance_painter.project.save()
print("✅ 项目已保存,准备执行操作")
  1. 破坏性操作前向用户确认,包括:

    • 删除层 / 删除层组
    • 批量修改层属性
    • 清空层栈
    • 覆盖导出文件
  2. 非破坏性操作可直接执行(查询信息、添加层、调整参数等)


🎨 规则 3:层操作核心

SP 的核心工作流围绕 层(Layer) 管理。

层栈获取

import substance_painter.textureset
import substance_painter.layerstack

# 获取第一个纹理集
ts = substance_painter.textureset.all_texture_sets()[0]
stack = substance_painter.textureset.Stack.from_name(ts.name())

# 获取根层节点列表
root_layers = substance_painter.layerstack.get_root_layer_nodes(stack)
for layer in root_layers:
    print(f"  {layer.get_name()} ({type(layer).__name__})")

层类型

类型 说明
FillLayer 填充层 — 用纯色/材质填充
PaintLayer 绘画层 — 手绘笔刷内容
GroupLayer 组层 — 用于组织层结构

Read the full file on GitHub · 257 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. 12d ago First seen · 257 lines · 128 tokens per session scan A a705780234ba

Subscribe to this mod's changes

sp-operation-rules is a skill published in the GitHub repository IvanYangYangXi/artclaw_bridge (35 stars, last pushed 4mo ago), licensed MIT. It adds 128 tokens to every session and 1,908 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

commercial-3d-product-render

Product lookdev and render-review helpers for commercial 3D work.

dcc-mcp/dcc-mcp-core · 21 tokens

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

dcc-cua

A routing guide for controlling application interfaces through the project’s DCC-CUA system. DCC applications are digital-content tools such as Maya, Blender, and Houdini.

dcc-mcp/dcc-mcp-core · 131 tokens

marketplace-publish-extension

Infrastructure skill — publish (register/update) an extension package to a marketplace catalog. Reads the extension's SKILL.md frontmatter, constructs a CatalogEntry, and upserts it into the target marketplace.json. Optionally commits and pushes when the catalog source is a git repository. Use after scaffolding an…

dcc-mcp/dcc-mcp-core · 88 tokens

clawhub-compat

Example skill — demonstrates full compatibility with the ClawHub/OpenClaw skill format. Use as a reference when creating skills for both the dcc-mcp-core ecosystem and ClawHub marketplace. Not intended for production use — this is an authoring reference only.

dcc-mcp/dcc-mcp-core · 59 tokens

example-layered-skill

Example skill — reference implementation of the internal layered architecture pattern (Tools / Services / Utils) for complex skills with shared business logic. Use as a template when a skill outgrows a single scripts/execute.py file. Not intended for production use — see docs/guide/skills.md for the architectural…

dcc-mcp/dcc-mcp-core · 70 tokens