max-build

A command for generating MAX/MSP patches, Gen~ code, JavaScript, and related audio or multimedia development files through specialist agents.

In plain words
What is it for?
Use it to create artifacts in an active MAX project, using the project's context and specialist generation agents.
Why use it?
It routes a request to specialists suited to patch structure, digital signal processing, user interfaces, JavaScript, RNBO, or C++ externals.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/taylorbrook/max-msp_cc_framework/max-build
Clone the repo
git clone --depth 1 https://github.com/taylorbrook/MAX-MSP_CC_Framework

Made for: Claude Code.

Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 824 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00011 $0.00824
Opus 5 $0.00005 $0.00412
Sonnet 5 $0.00002 $0.00165
Haiku 4.5 $0.00001 $0.00082

Measured 3d ago against content hash 3c8cbbf6c7e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

max-build scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/max-build.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/max-build

Generate MAX/MSP patches, Gen~ code, JavaScript, or other artifacts by routing the user's description through the agent system. Creates new .maxpat files directly via the Patcher API -- no intermediary scripts.

Behavior

  1. Load active project -- read patches/.active-project.json for the current project. If no active project, prompt the user to create one with /max-new.

  2. Load project context -- read the project's context.md for vision, decisions, and research.

  3. Route through max-router -- invoke the max-router skill with:

    • The user's task description
    • Project context
    • The router analyzes keywords/intent and dispatches to specialist agent(s)
  4. Specialist generation -- the router dispatches to one or more specialist agents:

    • max-patch-agent (control flow, routing, subpatchers)
    • max-dsp-agent (GenExpr, signal chains, audio)
    • max-js-agent (JavaScript, Node for Max)
    • max-ui-agent (presentation mode, layout, controls)
    • max-rnbo-agent (RNBO export, target validation, param mapping)
    • max-ext-agent (C++ externals, Min-DevKit scaffolding, build)

    Each specialist creates a Patcher instance, builds the patch structure using add_box() and add_connection(), then applies styling, layout, and validation via _apply_auto_styling(patcher), apply_layout(patcher), validate_patch(patcher.to_dict()).

  5. Critic loop -- run the max-critic skill on generated output:

    • Invoke review_patch(patch_dict, code_context) from src.maxpat.critics
    • If blockers found: request revisions from the generator
    • If clean or warnings-only: approve output with inline annotations
    • Loop continues until clean (no hard round limit)
  6. Write output -- save generated files via save_patch_roundtrip(patcher.to_dict(), path) to the project's generated/ directory. No intermediary Python scripts are created at any point.

  7. Commit to git -- after saving, save_patch_roundtrip() auto-commits the .maxpat file via auto_commit_patch(). If additional files were generated (e.g., .gendsp, .js) that were saved separately, run an explicit commit:

    from src.maxpat.project import auto_commit_patch
    auto_commit_patch(project_dir, base_dir, description="build: {brief description}", files=[...all generated file paths...])
    

    This ensures work is committed to git immediately and cannot be lost to stash operations or other instances.

Read the full file on GitHub · 77 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 77 lines · 11 tokens per session scan A 3c8cbbf6c7e8

Subscribe to this mod's changes

max-build is a command published in the GitHub repository taylorbrook/MAX-MSP_CC_Framework (41 stars, last pushed 7d ago), licensed MIT. It adds 11 tokens to every session and 824 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.