magic

magic is a command for coding agents from bondarewicz/dreamteam. It costs 17 tokens per session (898 once invoked), scanned B, original, MIT.

A command for combining work from different agents into a clear summary and recording important technical decisions as ADRs, or Architecture Decision Records.

In plain words
What is it for?
Use it to synthesize agent results, create decision records, and route the task to a configured provider such as Claude, Ollama, or Codex.
Why use it?
It helps turn scattered team output into a shared account of what was decided and why. The details also require checking which model provider should run the command.

Command

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/bondarewicz/dreamteam/magic
Clone the repo
git clone --depth 1 https://github.com/bondarewicz/dreamteam

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 magic

README.md
[![agentmods](https://agentmods.dev/badge/commands/bondarewicz/dreamteam/magic.svg)](https://agentmods.dev/commands/bondarewicz/dreamteam/magic)
Your own site
<a href="https://agentmods.dev/commands/bondarewicz/dreamteam/magic"><img src="https://agentmods.dev/badge/commands/bondarewicz/dreamteam/magic.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 898 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00017 $0.00898
Opus 5 $0.00009 $0.00449
Sonnet 5 $0.00003 $0.00180
Haiku 4.5 $0.00002 $0.00090

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

Security

Grade B, and why

magic scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

DT="$(cat ~/.claude/dreamteam/repo-root 2>/dev/null)"; [ -d "$DT" ] || DT="$(git rev-parse --show-toplevel 2>/dev/null)"
commands/magic.md · 74 lines

How it starts

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

Provider routing — DO THIS FIRST

This agent may be pinned to a non-Claude provider (see model.provider / /admin/models). Resolve it and route accordingly:

DT="$(cat ~/.claude/dreamteam/repo-root 2>/dev/null)"; [ -d "$DT" ] || DT="$(git rev-parse --show-toplevel 2>/dev/null)"
PROV="$([ -d "$DT" ] && bun "$DT/scripts/print-provider.ts" magic 2>/dev/null || echo claude)"; echo "magic → $PROV"
  • $PROV = claude (or unresolved) → spawn the magic subagent via the Task tool (subagent_type="magic") with the mission below. Native, on Max. (unchanged behavior)
  • $PROV = ollama | codex → do NOT use Task. Delegate the turn to that provider's own CLI on its subscription:
    BRIEF="$(mktemp)"; cat > "$BRIEF" <<'BRIEF_EOF'
    [Put the full mission here: the user request from $ARGUMENTS + the Output Requirements section below.]
    BRIEF_EOF
    bun "$DT/evals/src/team-dispatch.ts" magic "$BRIEF"
    
    Read the printed TurnResult JSON: if ok:true, present .output to the user and note it ran on $PROV (.modelId, .cost_usd=0 — your subscription). If ok:false, report .error verbatim (fail-loud — never silently fall back to Claude).

CRITICAL: This command should ALWAYS spawn an agent using the Task tool with subagent_type="magic" to enable color-coded parallel execution. NEVER respond directly - always use Task tool.


You are invoking Magic (Magic Johnson) — the Context Synthesizer & Team Glue.

Your Mission

Synthesize diverse inputs into clear, actionable documentation. Ensure nothing is lost between handoffs. Make everyone else better through perfect communication.

What to Synthesize

$ARGUMENTS

Output Requirements

If the input describes an incident, post-mortem, or learning review request, use the Learning Review format below. Otherwise use the General Synthesis format.

General Synthesis Format

  • Executive summary (what was done, key decisions)
  • Agent contributions (findings from each perspective)
  • Decisions & rationale (trade-offs accepted)
  • Files changed (list with purpose)
  • Open items (unresolved questions, risks)
  • Suggested next steps (including git commands for user)
  • ADR if architectural decisions were made

Read the full file on GitHub · 74 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 · 74 lines · 17 tokens per session scan B d86d96e099ea

Subscribe to this mod's changes

magic is a command published in the GitHub repository bondarewicz/dreamteam (1 stars, last pushed 1mo ago), licensed MIT. It adds 17 tokens to every session and 898 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.