brainstorm-with-file

An interactive command for exploring a coding question through several viewpoints and saving the discussion and ideas to files.

In plain words
What is it for?
Use it to explore redesigns, architecture choices, feature concepts, or other questions where you want creative, practical, and systematic input.
Why use it?
It keeps brainstorming, codebase findings, and decisions together so useful ideas are not lost in a chat.

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/catlog22/claude-code-workflow/brainstorm-with-file
Clone the repo
git clone --depth 1 https://github.com/catlog22/Claude-Code-Workflow

Made for: Claude Code.

Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,427 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.00020 $0.06427
Opus 5 $0.00010 $0.03214
Sonnet 5 $0.00004 $0.01285
Haiku 4.5 $0.00002 $0.00643

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

Security

Grade A, and why

brainstorm-with-file 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 2d 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/workflow/brainstorm-with-file.md · 633 lines

How it starts

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

Auto Mode

When --yes or -y: Auto-confirm decisions, use recommended roles, balanced exploration mode.

Workflow Brainstorm Command

Quick Start

# Basic usage
/workflow:brainstorm-with-file "如何重新设计用户通知系统"

# With options
/workflow:brainstorm-with-file --continue "通知系统"              # Continue existing
/workflow:brainstorm-with-file -y -m creative "创新的AI辅助功能"   # Creative auto mode
/workflow:brainstorm-with-file -m structured "优化缓存策略"       # Goal-oriented mode

Context Source: cli-explore-agent + Multi-CLI perspectives (Gemini/Claude or Professional Roles) Output Directory: .workflow/.brainstorm/{session-id}/ Core Innovation: Diverge-Converge cycles with documented thought evolution

Output Artifacts

Phase Artifact Description
1 brainstorm.md Complete thought evolution timeline (initialized)
1 Session variables Dimensions, roles, exploration vectors
2 exploration-codebase.json Codebase context from cli-explore-agent
2 perspectives.json Multi-CLI perspective findings (creative/pragmatic/systematic)
2 Updated brainstorm.md Round 2 multi-perspective exploration
3 ideas/{idea-slug}.md Deep-dive analysis for selected ideas
3 Updated brainstorm.md Round 3-6 refinement cycles
4 synthesis.json Final synthesis with top ideas, recommendations
4 Final brainstorm.md Complete thought evolution with conclusions
4.5 brainstorm-dashboard.html Interactive visualization of synthesis results

Output Structure

.workflow/.brainstorm/BS-{date}-{slug}/
├── brainstorm.md                  # ⭐ Complete thought evolution timeline
├── exploration-codebase.json      # Phase 2: Codebase context
├── perspectives.json              # Phase 2: Multi-CLI findings
├── synthesis.json                 # Phase 4: Final synthesis
├── brainstorm-dashboard.html      # Phase 4.5: Interactive visualization
└── ideas/                         # Phase 3: Individual idea deep-dives
    ├── idea-1.md
    ├── idea-2.md
    └── merged-idea-1.md

Read the full file on GitHub · 633 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. 2d ago First seen · 633 lines · 20 tokens per session scan A 490738e26a2a

Subscribe to this mod's changes

brainstorm-with-file is a command published in the GitHub repository catlog22/Claude-Code-Workflow (2,134 stars, last pushed 2mo ago), licensed MIT. It adds 20 tokens to every session and 6,427 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.