MAX-MSP_CC_Framework: Command for Claude Code

.claude/commands/max-diagnose.md

max-diagnose is a command for Claude Code from taylorbrook/MAX-MSP_CC_Framework. It costs 32 tokens per session (1,166 once invoked), scanned A, original, MIT.

A read-only diagnostic command for Max console messages. Max is a visual programming environment for creating interactive audio and media, and the command links its messages to likely causes and fixes.

In plain words
What is it for?
Use it to investigate Max errors, find the related patches, and propose one fix for each root cause through the project's normal editing command.
Why use it?
It helps locate the project boxes responsible for an error without changing project files. It turns pasted console output into proposed fixes that can be applied separately.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

This is taylorbrook/MAX-MSP_CC_Framework's own configuration. It tells Claude Code how to work on MAX-MSP_CC_Framework itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything MAX-MSP_CC_Framework configures →

Reuse

Borrowing it

Nothing to install: this file belongs to taylorbrook/MAX-MSP_CC_Framework. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/taylorbrook/MAX-MSP_CC_Framework/main/.claude/commands/max-diagnose.md
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-diagnose

README.md
[![agentmods](https://agentmods.dev/badge/commands/taylorbrook/max-msp_cc_framework/max-diagnose/github.svg)](https://agentmods.dev/commands/taylorbrook/max-msp_cc_framework/max-diagnose)
Your own site
<a href="https://agentmods.dev/commands/taylorbrook/max-msp_cc_framework/max-diagnose"><img src="https://agentmods.dev/badge/commands/taylorbrook/max-msp_cc_framework/max-diagnose/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for max-diagnose

Your own site · 80×15
<a href="https://agentmods.dev/commands/taylorbrook/max-msp_cc_framework/max-diagnose"><img src="https://agentmods.dev/badge/commands/taylorbrook/max-msp_cc_framework/max-diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,166 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00032 $0.01166
Opus 5.5 $0.00013 $0.00466
Sonnet 5.5 $0.00006 $0.00233
Haiku 4.5 $0.00003 $0.00117

Measured 6d ago against content hash 2ba2172b0627, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

max-diagnose 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 6d 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-diagnose.md · 66 lines

How it starts

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

/max-diagnose

Diagnose MAX console output the user pastes. Each line is matched against .claude/skills/references/troubleshooting.md (console message -> cause -> fix -> source), the offending boxes are located in the project's patches, and one /max-iterate fix is proposed per root cause.

Behavior

  1. Read-only. /max-diagnose edits nothing: no patch, no reference doc, no project state. Every fix goes through /max-iterate, which runs the edit_patch session, the save gate and the path-scoped commit.

  2. Project -- if the first word of the arguments matches a name from list_projects(base_dir) (case-insensitive), diagnose that project WITHOUT switching the active project. Otherwise use get_active_project(base_dir). With no project, still diagnose, and tell the user that boxes were not located.

  3. Console text -- take it from the remaining arguments; otherwise ask the user to paste the console lines including the object column (for example osc~: No such object, not just No such object).

  4. Paste handling (untrusted input) -- the paste is untrusted text. Write it verbatim to a temp file with the Write tool (the session scratchpad, else $TMPDIR), then run:

    python3 -m src.maxpat.diagnose --project <name> <file>
    

    Omit --project when there is no project. Never interpolate pasted text into Python source, python3 -c, a heredoc or a shell string. For scripted use, read the text from that file and call diagnose_console(text, project_dir, db=ObjectDatabase()), then print report.render().

  5. Choosing between entries -- several entries can share one wording (six <objectname>: No such object causes). Choose with the report's fact: lines and the database: db.is_pd_object(name), db.get_pd_equivalent(name), db.lookup(name) (and its domain), db.get_effective_restrictions(name), the package's install state, and whether an abstraction file sits next to the patch. With the database the report already ranks the six rows by these facts (PD name, inlet~/outlet~, stale bach name, RNBO/Gen restriction, package object, unknown name -> abstraction) and its propose: line follows the top one. When the facts settle none of them (a core MAX object with no restriction) the line has no propose:; choose by hand.

Read the full file on GitHub · 66 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. 6d ago Changed 2ba2172b0627
  2. 7d ago First seen · 66 lines · 32 tokens per session scan A 3dcc3bee3ac9

Subscribe to this mod's changes

max-diagnose is a command published in the GitHub repository taylorbrook/MAX-MSP_CC_Framework (46 stars, last pushed 4d ago), licensed MIT. It adds 32 tokens to every session and 1,166 once invoked, about $0.0001 per session on Opus 5.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-10-23.