用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/dylanroscover/Embody --skill create-extension命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
MUST READ before first MCP tool call in a session. Complete Envoy tool catalog with parameters and usage.
Procedure for preparing version release commits -- changelog, README, templates, versioning
Merge or compare two divergent TouchDesigner .tox/.toe binaries that git cannot three-way-merge. Load when a merge/rebase conflicts on a .tox or .toe, when asked to merge, port, reconcile, or diff two versions of a TD component, or when comparing a component across branches, machines, or TD builds.
正在显示 SKILL.md
基于 SOC 职业分类
| name | create-extension |
| description | MUST READ before calling create_extension. Required parameters, lifecycle methods, and wiring steps. |
Use the create_extension MCP tool to create a fully-wired TD extension:
create_extension(
parent_path='/path/to/parent',
class_name='MyFeatureExt',
name='MyFeature', # Optional: COMP name
code='...', # Optional: initial Python code
promote=True, # Optional: promote extension methods
ext_name='MyFeature', # Optional: extension name
ext_index=0 # Optional: extension index
)
This creates: baseCOMP + text DAT + extension wiring, initialized and ready to use.
Always implement these in your extension class:
class MyFeatureExt:
def __init__(self, ownerComp):
self.ownerComp = ownerComp
def onDestroyTD(self):
"""Called on old instance before TD reinitializes. Clean up callbacks, timers, etc."""
pass
def onInitTD(self):
"""Called at end of frame after init. Safe to access other extensions and cooked network."""
pass
Extension classes and source DATs must follow the NameExt convention:
MyFeatureExtMyFeatureExt (matches class name)# Promoted methods (uppercase) — called directly on the component:
op.MyFeature.DoSomething()
# Non-promoted methods (lowercase) — accessed through ext:
op.MyFeature.ext.MyFeature.helperMethod()
NEVER cache extension references in variables — always call inline. Cached refs go stale on reinit.
If the extension lives inside a TDN-strategy COMP (or the extension's ownerComp is one), onInitTD will fire before TDN import reconstructs the network. Any state set up during onInitTD — created operators, parameter values, stored data — is overwritten when ImportNetwork runs with clear_first=True.
Always defer initialization:
def onInitTD(self):
"""Defer setup so it runs after TDN import completes."""
run('args[0].postInit()', self, delayFrames=5)
def postInit(self):
"""Safe to set up state here — TDN import is complete."""
# Create operators, set parameters, initialize state
pass
This applies on project open, after every Ctrl+S (strip/restore cycle), and on manual TDN reimport. The deferred method must be idempotent — it may run multiple times.