td-python
Skill40 starsChanged 5 months agoMITView on GitHub
Write Python scripts for TouchDesigner — parameter expressions, DAT callbacks, Script OPs, Extensions, and module patterns. Use when creating Python expressions, DAT scripts, Execute DATs, Script CHOPs/TOPs/SOPs/DATs, component extensions, or any TouchDesigner Python automation, interaction, or data scripting.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- eltallerdepiyamas/claude-skillsword for word, first seen Nov 15, 2026
Other versions1 project uses a version of this.
Word for word · 1
- eltallerdepiyamas/claude-skills★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- hou-pythonSkill
- hou-rsSkill
- hou-vexSkill
- sc-designerSkill
- td-glslSkill
- td-glsl-vertexSkill
- td-popsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Write Python optimized for TouchDesigner's scripting environment.
- Distinctive: line 70
When providing Python code, always include:
- Distinctive: line 79
Write the minimal working script
- Very specific: line 80
Add error handling and debug() calls
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TouchDesigner Python Scripting
Write Python optimized for TouchDesigner's scripting environment.
Quick Start
There are four main contexts where Python runs in TouchDesigner:
# 1. PARAMETER EXPRESSION (one-liner, auto-updates)
absTime.frame # current frame number
me.par.tx # this operator's tx parameter
op('noise1')['chan1'] # CHOP channel value
round(op('slider1').par.value0.eval(), 2)
# 2. TEXTPORT (live testing)
r = op('/project1/geo1')
r.par.tx = 5
print(dir(r))
# 3. DAT SCRIPT (full Python in a Text DAT)
def onCook(scriptOp):
scriptOp.clear()
scriptOp.appendRow(['name', 'value'])
# 4. CALLBACK (react to events)
def onValueChange(par, prev):
debug(par, prev)Critical Rules
- Use
debug()notprint()—debug()adds source location; essential for tracking down errors - Use
.eval()when passing par to functions —round(op('x').par.tx)fails;round(op('x').par.tx.eval())works - Never access TD objects at module root — put them in functions or the module will recompile on every change
me= the operator running this script — works in expressions and DATsop()paths are relative by default —/prefix makes them absolute from root
The Core Objects (Always Available, No Import Needed)
me # the operator this script belongs to
op('name') # find operator by relative path
op('/project1/geo1') # find operator by absolute path
op.MyGlobalShortcut # find component via Global OP Shortcut
parent() # one level up in hierarchy
parent(2) # two levels up
parent.MyShortcut # search upward for Parent Shortcut named "MyShortcut"
absTime.frame # current frame
absTime.seconds # current time in seconds
ext.MyExtension # access extension on this or parent componentCommon Patterns
See examples/PATTERNS.md for ready-to-use templates:
- Parameter expressions
- Callback DATs (parameter, CHOP, panel, execute)
- Script OPs (Script CHOP, TOP, SOP, DAT)
- Extensions
- DATs as modules
Response Format
When providing Python code, always include:
- Python code with comments
- Context — where this code goes (expression field, DAT name, callback function)
- TouchDesigner setup — what operators to create, how to wire them, which parameters to configure
Writing Process
- Identify the context (expression / callback / script OP / extension / module)
- Write the minimal working script
- Add error handling and
debug()calls - Note any required operator connections or parameter setup
Additional Resources
- examples/PATTERNS.md — Ready-to-use templates per context
- examples/COMPLETE.md — Full real-world examples
- reference/API.md — Core TD Python API reference
- reference/TROUBLESHOOTING.md — Common errors and fixes
- reference/BEST-PRACTICES.md — Organization, performance, style
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

