Logo Sverchok Agents Code Validator

Sverchok Agents Code Validator

Tổ chức
Impertio-Studio
sverchok-agents-code-validator

Use when reviewing, validating, or auditing Sverchok node code for correctness. Runs 19 automated checks covering data nesting correctness, updateNode callbacks, list matching patterns, socket consistency, import validation, and IfcSverchok compliance. Prevents shipping node code with silent data corruption or missing update triggers. Keywords: Sverchok validation, code review, data nesting check, updateNode check, socket consistency, import validation, IfcSverchok compliance, code quality, my node has errors, check node code.

Tổng quan

Nhà phát hànhImpertio-Studio
Kho mãBlender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package
Tên kỹ năngsverchok-agents-code-validator
Sao
44
Bản fork
5
Tệp đi kèm
3
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 3 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Impertio-Studio công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Sverchok Agents Code Validator trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/sverchok/agents/sverchok-agents-code-validator
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package.git /tmp/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package
mkdir -p .claude/skills
cp -r /tmp/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/skills/sverchok/agents/sverchok-agents-code-validator .claude/skills/sverchok-agents-code-validator
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Sverchok Agents Code Validator trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Sverchok Agents Code Validator ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Sverchok Agents Code Validator không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Sverchok Code Validator Agent

Systematic validation checklist for reviewing Sverchok node code. Run this checklist against any Sverchok Python code to identify errors, anti-patterns, and correctness issues. Targets Sverchok v1.4.0 on Blender 4.0+.

Quick Reference: When to Activate

Activate this validator when:

  • Reviewing, auditing, or validating Sverchok node scripts
  • Checking custom node code before deployment
  • Generating new Sverchok node code (run validator on output)
  • Investigating data corruption, silent failures, or incorrect geometry
  • Reviewing SNLite scripts, SN Functor B scripts, or custom node classes

Validation Checklist

Run each check in order. Each check has a severity level:

  • BLOCKER: Code will crash, produce data corruption, or cause silent failures
  • WARNING: Code has a bug, performance issue, or missing best practice
  • INFO: Code works but does not follow Sverchok conventions

CHECK 1: Data Nesting Correctness

Severity: BLOCKER

Verify that all sv_set() calls use the correct nesting level for their socket type.

Required nesting levels:

Socket TypeRequired LevelExample
SvVerticesSocket3[[(x,y,z), (x,y,z)]]
SvStringsSocket2[[1, 2, 3]]
Edges2[[(0,1), (1,2)]]
Faces2[[(0,1,2)]]
SvMatrixSocket1[Matrix(), Matrix()]

Detection: Find all self.outputs[...].sv_set(...) calls. Trace the argument back to its construction. Verify the outermost list depth matches the socket type.

Flag BLOCKER if:

  • Vertices are output at level 2 (missing object wrapper): sv_set([(0,0,0), (1,0,0)])
  • Strings/edges/faces are output at level 1 (flat list): sv_set([1, 2, 3])
  • Matrices are output at level 2 (double-wrapped): sv_set([[Matrix()]])

CHECK 2: updateNode Callback on All Properties

Severity: BLOCKER

Every bpy.props.*Property declaration that affects node output MUST include update=updateNode.

Detection: Find all lines matching *Property( (FloatProperty, IntProperty, BoolProperty, EnumProperty, StringProperty, FloatVectorProperty, IntVectorProperty, BoolVectorProperty). Verify each contains update=updateNode.

Flag BLOCKER if: Any property lacks update=updateNode.

Exception: Properties that only control UI display (not computation) may omit updateNode. Flag INFO instead if the property name suggests UI-only use (e.g., show_options, expand_ui).


CHECK 3: Output Connection Check

Severity: WARNING

The process() method SHOULD exit early if no outputs are connected.

Detection: Check the first lines of process() for:

python
if not any(s.is_linked for s in self.outputs):
    return

Flag WARNING if: process() does not check output connections before performing computation. This causes unnecessary computation when no downstream node uses the output.


CHECK 4: match_long_repeat Before zip

Severity: BLOCKER

When iterating over multiple inputs with zip(), inputs MUST first be matched using match_long_repeat().

Detection: Find all zip(...) calls in process() where arguments are socket input data. Check that match_long_repeat() was called on those inputs before the zip().

Flag BLOCKER if: zip() is used on socket inputs without prior match_long_repeat(). Plain zip() silently truncates data to the shortest input.


CHECK 5: Socket Creation Only in sv_init/sv_update

Severity: BLOCKER

Socket creation (self.inputs.new(...) or self.outputs.new(...)) MUST only occur in sv_init() or sv_update().

Detection: Find all .inputs.new( and .outputs.new( calls. Verify each occurs inside sv_init or sv_update methods.

Flag BLOCKER if: Socket creation occurs inside process(). This creates a new socket on every evaluation, corrupting the node.


CHECK 6: deepcopy for Input Data

Severity: WARNING

Input data retrieved via sv_get() SHOULD NOT be mutated in-place without deepcopy=True.

Detection: Find sv_get() calls. If the returned data is subsequently modified (.append(), [i] = ..., del, .pop(), .extend(), .insert(), .sort(), .reverse()), verify that deepcopy=True was passed (or that a manual copy was made).

Flag WARNING if: Input data is mutated without deepcopy. This corrupts cached data and affects upstream nodes.

Note: sv_get(deepcopy=True) is the default in recent Sverchok versions. Flag only if deepcopy=False is explicitly set and data is mutated.


CHECK 7: Correct SNLite Aliases

Severity: BLOCKER

In SNLite header declarations, socket type aliases MUST use the correct single-letter codes.

Valid aliases:

AliasSocket Type
sSvStringsSocket
vSvVerticesSocket
mSvMatrixSocket
oSvObjectSocket
CSvCurveSocket
SSvSurfaceSocket
SoSvSolidSocket
SFSvScalarFieldSocket
VFSvVectorFieldSocket
DSvDictionarySocket
FPSvFilePathSocket

Flag BLOCKER if: SNLite header uses invalid aliases such as vertices, string, matrix, float, int, vector.


CHECK 8: Node Docstring Format

Severity: INFO

Custom node classes SHOULD include a docstring with Triggers: and Tooltip: lines.

Expected format:

python
class SvMyNode(SverchCustomTreeNode, bpy.types.Node):
    """
    Triggers: keyword1 keyword2
    Tooltip: Short description
    """

Flag INFO if: Docstring is missing, or Triggers: / Tooltip: lines are absent. These are used by Sverchok's node search (Shift+S).


CHECK 9: Standard Process Method Pattern

Severity: WARNING

The process() method SHOULD follow the standard 5-step pattern:

  1. Early exit if no output connected
  2. Read inputs with sv_get(default=...)
  3. Match input lengths with match_long_repeat()
  4. Process each object in a loop
  5. Set outputs with sv_set()

Flag WARNING if: process() deviates significantly (e.g., missing default values on sv_get, no list iteration, direct scalar output without wrapping).


CHECK 10: IfcSverchok Double-Nesting

Severity: BLOCKER

Data sent to IfcSverchok nodes MUST use standard Sverchok nesting (level 2 for strings).

Detection: If the node tree contains IfcSverchok nodes (bl_idname starting with SvIfc), verify that all data passed to IFC node inputs follows Sverchok nesting conventions.

Flag BLOCKER if: Single-nested data is passed to IFC nodes:

python
# WRONG
self.outputs['Names'].sv_set(["Wall_001"])
# CORRECT
self.outputs['Names'].sv_set([["Wall_001"]])

CHECK 11: BMesh Cleanup (bm.free())

Severity: BLOCKER

Every bmesh.new() or bmesh_from_pydata() call MUST have a corresponding bm.free() call.

Detection: Track BMesh variable assignments. Verify each has a bm.free() call after the last usage. Exception: BMesh obtained via bmesh.from_edit_mesh() must NOT be freed manually.

Flag BLOCKER if: A standalone BMesh is created without bm.free(). This leaks memory.


CHECK 12: NumPy Optimization Opportunities

Severity: INFO

Flag opportunities where Python loops over vertex/numeric data could be replaced with NumPy vectorized operations.

Detection: Find for loops that iterate over vertex lists performing element-wise arithmetic.

Flag INFO if: A loop performs operations like (v[0] * s, v[1] * s, v[2] * s) that could be (np.array(verts) * s).tolist().


CHECK 13: Import Validation

Severity: BLOCKER

Verify that all Sverchok imports are correct and available.

Required imports per pattern:

UsageRequired Import
updateNodefrom sverchok.data_structure import updateNode
match_long_repeatfrom sverchok.data_structure import match_long_repeat
SverchCustomTreeNodefrom sverchok.node_tree import SverchCustomTreeNode
bmesh_from_pydatafrom sverchok.utils.sv_bmesh_utils import bmesh_from_pydata
pydata_from_bmeshfrom sverchok.utils.sv_bmesh_utils import pydata_from_bmesh
SvNoDataErrorfrom sverchok.core.sv_custom_exceptions import SvNoDataError

Flag BLOCKER if: Code uses updateNode, match_long_repeat, or SverchCustomTreeNode without the correct import statement. Flag BLOCKER if code imports from non-existent Sverchok modules.


CHECK 14: Socket Name Consistency sv_init↔process

Severity: BLOCKER

Socket names used in sv_get() / sv_set() calls in process() MUST match the names defined in sv_init().

Detection: Extract socket names from self.inputs.new('...', 'Name') and self.outputs.new('...', 'Name') in sv_init(). Compare against self.inputs['Name'] and self.outputs['Name'] references in process().

Flag BLOCKER if: A socket name in process() does not match any socket created in sv_init(). This causes a KeyError at runtime.


CHECK 15: match_long_repeat Unpacking Pattern

Severity: WARNING

The result of match_long_repeat() MUST be unpacked correctly.

Correct pattern:

python
verts, scale = match_long_repeat([verts, scale])

Flag WARNING if: Result is not unpacked (assigned to single variable) or unpacking count does not match input count.


CHECK 16: sv_get Default Pattern

Severity: WARNING

sv_get() calls SHOULD provide a default parameter for optional inputs.

Detection: Find sv_get() calls without default= on non-mandatory inputs.

Flag WARNING if: An optional input uses sv_get() without a default value. This raises an exception when the socket is unconnected.

Correct pattern:

python
verts = self.inputs['Vertices'].sv_get(default=[[]])
scale = self.inputs['Scale'].sv_get(default=[[1.0]])

CHECK 17: Registration Completeness

Severity: BLOCKER

Custom node classes MUST define all required registration attributes.

Required attributes:

AttributePurpose
bl_idnameUnique identifier (must start with Sv)
bl_labelDisplay name in the node editor

Recommended attributes:

AttributePurpose
sv_categoryCategory for Shift+S menu
bl_iconIcon identifier

Flag BLOCKER if: bl_idname or bl_label is missing. Flag INFO if sv_category or bl_icon is missing.


CHECK 18: Property Type Validation

Severity: BLOCKER

Verify that bpy.props types are used correctly in node class annotations.

Flag BLOCKER if:

  • FloatProperty used where IntProperty is needed (counts, indices)
  • CollectionProperty or PointerProperty used without proper registration
  • Property type annotation uses = instead of : (Blender 2.80+ requires annotation syntax)

Correct:

python
count: IntProperty(name='Count', default=5, update=updateNode)

Wrong:

python
count = IntProperty(name='Count', default=5, update=updateNode)  # Old syntax

CHECK 19: Edge/Face Data Format Validation

Severity: BLOCKER

Edge data MUST be tuples/lists of exactly 2 integers. Face data MUST be tuples/lists of 3 or more integers.

Detection: Trace edge and face data construction. Verify tuple sizes.

Flag BLOCKER if:

  • Edge tuples contain fewer or more than 2 elements
  • Face tuples contain fewer than 3 elements
  • Edge/face indices are floats instead of integers

Severity Summary Decision Tree

Code will crash or corrupt data?
├── YES → BLOCKER
│   ├── Wrong nesting level on sv_set() (CHECK 1)
│   ├── Missing updateNode on property (CHECK 2)
│   ├── zip() without match_long_repeat (CHECK 4)
│   ├── Socket creation in process() (CHECK 5)
│   ├── Invalid SNLite alias (CHECK 7)
│   ├── Wrong IfcSverchok nesting (CHECK 10)
│   ├── Missing bm.free() (CHECK 11)
│   ├── Missing/wrong imports (CHECK 13)
│   ├── Socket name mismatch sv_init↔process (CHECK 14)
│   ├── Missing bl_idname or bl_label (CHECK 17)
│   ├── Wrong property annotation syntax (CHECK 18)
│   └── Invalid edge/face tuple size (CHECK 19)
├── NO → Code has bug or missing best practice?
│   ├── YES → WARNING
│   │   ├── No output connection check (CHECK 3)
│   │   ├── Input mutation without deepcopy (CHECK 6)
│   │   ├── Non-standard process() pattern (CHECK 9)
│   │   ├── Wrong match_long_repeat unpacking (CHECK 15)
│   │   └── sv_get() without default (CHECK 16)
│   └── NO → Convention issue?
│       ├── YES → INFO
│       │   ├── Missing Triggers/Tooltip docstring (CHECK 8)
│       │   ├── NumPy optimization opportunity (CHECK 12)
│       │   └── Missing sv_category or bl_icon (CHECK 17)
│       └── NO → PASS

Auto-Fix Patterns

When a check fails, apply these fixes automatically where safe:

IssueAuto-Fix
Missing object wrapper on verticesWrap in [data] → sv_set([vertices])
Missing object wrapper on stringsWrap in [data] → sv_set([numbers])
Missing updateNodeAdd update=updateNode to property
Missing output checkInsert early-exit block at start of process()
zip() without matchingInsert match_long_repeat() before zip()
Missing bm.free()Insert bm.free() after last BMesh usage
Invalid SNLite aliasReplace with correct single-letter alias
Missing default= on sv_get()Add default=[[]] for geometry, default=[[0]] for numbers
Old property syntax (=)Convert to annotation syntax (:)
Single-nested IFC dataWrap in extra list level
Missing import for updateNodeAdd from sverchok.data_structure import updateNode
Missing import for match_long_repeatAdd from sverchok.data_structure import match_long_repeat

Validation Report Format

After running all checks, produce a report:

## Validation Report
Target: Sverchok v1.4.0
Total Issues: N

### BLOCKERS (N)
- [CHECK X] Description — file:line

### WARNINGS (N)
- [CHECK X] Description — file:line

### INFO (N)
- [CHECK X] Description — file:line

### Auto-Fixes Applied (N)
- Description — file:line

Reference Links

Dependency Skills

  • sverchok-errors-common — Common Sverchok error patterns and diagnosis
  • sverchok-impl-custom-nodes — Custom node development patterns
  • sverchok-impl-ifcsverchok — IfcSverchok integration patterns

Official Documentation

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Sverchok Agents Code Validator làm được gì?

Use when reviewing, validating, or auditing Sverchok node code for correctness. Runs 19 automated checks covering data nesting correctness, updateNode callbacks, list matching patterns, socket consistency, import validation, and IfcSverchok compliance. Prevents shipping node code with silent data corruption or missing update triggers. Keywords: Sverchok validation, code review, data nesting check, updateNode check, socket consistency, import validation, IfcSverchok compliance, code quality, my node has errors, check node code.

Vì sao nên dùng Sverchok Agents Code Validator trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Sverchok Agents Code Validator là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Sverchok Agents Code Validator trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/sverchok/agents/sverchok-agents-code-validator. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Sverchok Agents Code Validator?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Sverchok Agents Code Validator với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Sverchok Agents Code Validator với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Sverchok Agents Code Validator có miễn phí không?

Có. Kỹ năng này được Impertio-Studio phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇