AgentSkillsCN

sulu

Superluminal(Sulu)Blender 插件的开发副驾驶。帮助您修改 UI 面板、属性、操作符,配置身份验证与 PocketBase 流程,处理作业提交与下载的交接,打包 BAT 依赖(压缩包/项目),进行 rclone 传输,并完成发布打包工作。

SKILL.md
--- frontmatter
name: sulu
description: Dev copilot for the Superluminal (Sulu) Blender add-on. Helps you change UI panels/properties/operators, auth + PocketBase flows, job submit/download handoffs, BAT dependency packing (Zip/Project), rclone transfers, and release packaging.
argument-hint: "[help|map|plan|debug|review|release|security] [args...]"
disable-model-invocation: false
allowed-tools: Read, Grep, Glob, Bash(python:*), Bash(git:*), Bash(rg:*), Bash(find:*), Bash(ls:*), Bash(tree:*), Bash(cat:*), Bash(head:*), Bash(tail:*), Bash(wc:*)

Sulu Blender Add-on Dev Skill — ultrathink

You are working on a Blender add-on that submits render jobs to the Superluminal render farm. This skill is a command router + guardrails + playbook index.

Non‑negotiable guardrails

  1. Never leak secrets: do not print or paste real tokens, passwords, session.json contents, R2 keys, or Auth-Token headers.
  2. No UI freezes: avoid adding blocking network calls inside Panel.draw() or any hot UI path.
    • If you must fetch remote data, prefer an operator, a timer, or a background thread + UI redraw.
  3. Blender threading rule: don’t touch bpy from background threads (except very controlled, read-only patterns). UI updates must happen on main thread.
  4. Workers are isolated: submit/download workers run as external Python processes. They should not assume a live bpy context.

Quick context (read-only)

  • Repo: !pwd
  • Python: !python --version 2>&1 | head -1
  • Git: !git status -sb 2>/dev/null || true
  • Changed: !git diff --name-only 2>/dev/null | head -60 || true
  • Tree: !ls -la | head -80

How to parse arguments

$ARGUMENTS:

  • $0 = task (help|map|plan|debug|review|release|security)
  • the rest = task args

If $0 is missing/unknown, behave as task=help.


TASK: help

Output a compact menu of the tasks below + 2-3 usage examples that match this repo.

TASK: map

Give a practical architecture map, referencing real files:

  • entrypoint / registration: __init__.py
  • state: storage.py
  • auth: pocketbase_auth.py
  • UI: panels.py, preferences.py, properties.py, operators.py
  • submit/download handoff + workers: transfers/submit/*, transfers/download/*
  • dependency scan + BAT packing: utils/project_scan.py, utils/bat_utils.py
  • rclone & transfer UX: transfers/rclone.py, utils/worker_utils.py Point to reference.md for deeper details.

TASK: plan <goal...>

Create a “surgical” plan for implementing the goal in THIS codebase:

  1. Clarify the goal in 1 sentence (assume sensible defaults if missing).
  2. List exactly which files to touch and why.
  3. Identify UI impact (what panel/operator changes).
  4. Identify worker impact (handoff JSON keys, backward-compat).
  5. Identify risk points (threading, auth, path resolution, cross-drive behavior, rclone).
  6. Provide a minimal diff strategy (small steps).
  7. Provide a validation checklist that can be done without Blender (static checks) + with Blender (manual).

TASK: debug <symptom...>

Use the playbooks. Always:

  • restate the symptom as a hypothesis tree,
  • point to specific code paths,
  • propose the fastest reproduction path,
  • propose instrumentation that doesn’t leak secrets.

Dispatch hints:

  • auth/login/token/401 → playbooks/debug-auth.md
  • submit/upload/pack/project/zip → playbooks/debug-submit-download.md + playbooks/project-vs-zip.md
  • download/rclone/403/time skew/disk full → playbooks/debug-submit-download.md
  • “setting not respected on farm” → playbooks/add-setting.md (handoff mismatch)

TASK: review

If a git diff exists, review it with Sulu-specific risk focus:

  • Blender register/unregister correctness (order + cleanup)
  • UI freezes (network calls in draw, heavy scans in draw)
  • token handling (no printing tokens, no saving passwords)
  • worker isolation (-I, no bpy usage in worker)
  • path normalization (replace("\\","/"), bpy.path.abspath, // rules)
  • project-vs-zip rules (cross-drive exclusions)
  • rclone failure classification (time skew, 403, disk full) Then provide a short “merge checklist”.

TASK: release

Analyze release packaging:

  • .github/workflows/main.yml + deploy.py
  • ensure correct zip root folder, excludes, version bump, and no secret/session files shipped Use playbooks/release.md.

TASK: security

Do a targeted security/privacy pass:

  • where tokens are stored (session.json via Storage)
  • auth headers usage (authorized_request)
  • worker handoff JSON contents (temp file includes token; ok but must be protected)
  • logs and exception reporting End with “top 5 improvements by impact”.

Supporting docs

Templates / scripts