max-iterate

max-iterate is a command for Claude Code from taylorbrook/MAX-MSP_CC_Framework. It costs 13 tokens per session (2,269 once invoked), scanned A, original, MIT.

A MAX/MSP patch-editing command for changing existing audio or multimedia patches while preserving their structure and positions.

In plain words
What is it for?
Use it to inspect a .maxpat file, switch projects, and make focused changes to patches, including edits controlled by workflow flags.
Why use it?
It reduces the risk of breaking a patch or losing carefully arranged objects during edits.

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-iterate
Clone the repo
git clone --depth 1 https://github.com/taylorbrook/MAX-MSP_CC_Framework

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for max-iterate

README.md
[![agentmods](https://agentmods.dev/badge/commands/taylorbrook/max-msp_cc_framework/max-iterate.svg)](https://agentmods.dev/commands/taylorbrook/max-msp_cc_framework/max-iterate)
Your own site
<a href="https://agentmods.dev/commands/taylorbrook/max-msp_cc_framework/max-iterate"><img src="https://agentmods.dev/badge/commands/taylorbrook/max-msp_cc_framework/max-iterate.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,269 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.00013 $0.02269
Opus 5 $0.00006 $0.01135
Sonnet 5 $0.00003 $0.00454
Haiku 4.5 $0.00001 $0.00227

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

Security

Grade A, and why

max-iterate 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 4d 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-iterate.md · 184 lines

How it starts

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

/max-iterate

Apply modifications to existing .maxpat patches using the analyze-first protocol. Reads the patch, shows a structural analysis, then makes surgical or section-level edits while preserving all existing objects and user positioning.

Behavior

  1. Parse arguments for inline project switch -- before loading the active project, check if the first word of the argument string matches an existing project:

    from src.maxpat.project import get_active_project, set_active_project, list_projects, update_status, bump_version
    
    projects = list_projects(base_dir)
    args = user_input.strip()
    first_word = args.split()[0] if args else ""
    
    # Case-insensitive match against known project directories
    matched_project = None
    for p in projects:
        if p.lower() == first_word.lower():
            matched_project = p
            break
    
    if matched_project:
        set_active_project(matched_project, base_dir)
        change_description = " ".join(args.split()[1:])  # remaining text
    else:
        change_description = args  # entire string is the description
    
  2. Parse flags -- extract workflow flags from the argument string before interpreting the change description:

    • Scan change_description (the text remaining after inline project switch parsing) for --full, --discuss, --research, and --plan
    • --full expands to all three: discuss + research + plan
    • --discuss, --research, --plan can be used individually or combined
    • Strip all recognized flags from change_description so downstream steps see only the modification text
    • Store flags as booleans: do_discuss, do_research, do_plan
  3. Load active project -- read patches/.active-project.json for the current project (which may have just been set by the step above). If no active project, prompt the user.

  4. Auto-detect target .maxpat -- determine which patch file to edit:

    • Single .maxpat in generated/: use it automatically
    • Multiple .maxpat files: infer from the user's change description (match keywords to filenames)
    • Ambiguous: ask the user which file to edit

Read the full file on GitHub · 184 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. 4d ago First seen · 184 lines · 13 tokens per session scan A cdfaef0a29db

Subscribe to this mod's changes

max-iterate is a command published in the GitHub repository taylorbrook/MAX-MSP_CC_Framework (41 stars, last pushed 8d ago), licensed MIT. It adds 13 tokens to every session and 2,269 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.