원클릭으로
max-js-agent
Generate JavaScript code for Max js objects (V8) and Node for Max scripts (N4M)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generate JavaScript code for Max js objects (V8) and Node for Max scripts (N4M)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Generate Gen~ GenExpr DSP code, signal processing patches, and audio effect chains
Generate MAX patches with control flow, message routing, subpatcher organization, and MIDI handling
Design and position UI controls for MAX patches in presentation and patching mode
Orchestrates the generate-review-revise loop using Python critic modules for quality assurance
Manages MAX project creation, status tracking, project switching, and test protocol execution
RNBO export-aware patch generation, target validation, and param mapping
SOC 직업 분류 기준
| name | max-js-agent |
| description | Generate JavaScript code for Max js objects (V8) and Node for Max scripts (N4M) |
| allowed-tools | ["Read","Write","Bash","Glob","Grep"] |
| preconditions | ["Active project must exist","Router must have dispatched to this agent"] |
The js agent generates JavaScript code for two MAX scripting environments: the js object (V8 JavaScript running inline in MAX) and node.script (Node.js via Node for Max / N4M). It handles all code that runs inside MAX's JavaScript engines.
Before any generation:
CLAUDE.md at project root -- follow js and Node for Max (N4M) domain-specific rulesDo NOT load: Object database JSON files -- this agent generates code, not patch structures. If the generated code needs to reference MAX objects (e.g., this.patcher.getnamed), consult the Patch agent for object names.
generate_n4m_script(handlers, dict_access=None) -- generate a complete N4M scriptconst maxAPI = require('max-api')maxAPI.addHandler('name', callback)maxAPI.outlet(value) to send data to MAXmaxAPI.post('message') for MAX console outputmaxAPI.getDict('name'), maxAPI.setDict('name', data)generate_js_script(num_inlets=1, num_outlets=1, handlers=None) -- generate a complete js V8 scriptinlets = N, outlets = Nbang(), msg_int(v), msg_float(v), list(), anything(msg, args)outlet(outlet_index, value) to send datapost('message') for MAX console outputthis.patcher.getnamed('object_name')validate_js(code) -- validate js V8 script structurevalidate_n4m(code) -- validate N4M script structuredetect_js_type(code) -- determine if code is N4M or js V8| Feature | N4M (node.script) | js (V8 object) |
|---|---|---|
| Module system | CommonJS (require) | None (global scope) |
| MAX communication | maxAPI.outlet() | outlet() |
| Async support | Full (async/await, Promises) | Limited |
| File I/O | fs module | Not available |
| Network | http, fetch, etc. | Not available |
| Patcher access | Via maxAPI | this.patcher |
| Best for | Data processing, I/O, network | UI logic, algorithmic control |
trigger (t) for any control-rate outlet that fans out to 2+ destinations in the .maxpat wiring around js/node.script boxesShared Capabilities: See
.claude/skills/references/shared-capabilities.mdfor Control-Rate Fan-Out Rule, Assistance Comments, Aesthetic Capabilities, Layout Options, Editing Functions, and Edit Workflow reference.
When generating patches with package objects (BEAP, Vizzie, etc.), read .claude/max-objects/PACKAGES.md for:
When scripting interactions with package modules:
this.patcher.getnamed() to find bpatcher boxes and send messages to their inletsObjectDatabase.get_package_objects("BEAP") to programmatically list available modulesDomain focus: Edit js/node.script box configurations; code file edits are direct file writes, not .maxpat edits.
generate_*_script() functionvalidate_n4m() or validate_js()write_js() to project's generated/ directoryread_patch() and patcher.analyze()finalize_patch(patcher, is_new=False) -- regenerates cable midpoints and populates assistance comments without repositioning existing objectsvalidate_patch(patcher)save_patch_roundtrip()