ワンクリックで
brainstorm
Use when exploring a new idea, technology choice, or design problem before planning.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when exploring a new idea, technology choice, or design problem before planning.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when updating the toolkit to a new version.
Use when code changes need review before merging or completing.
Use when diagnosing toolkit health issues or optimizing configuration.
Use when contributing generic improvements back to the toolkit repo.
Use when setting up or reconfiguring the toolkit for a project.
Use when existing code needs iterative quality improvement.
| name | brainstorm |
| description | Use when exploring a new idea, technology choice, or design problem before planning. |
| argument-hint | "topic" [--quick] [--depth shallow|normal|deep] [--gemini] [--auto-plan] |
| user-invocable | true |
| model | opus |
Structured idea exploration and research before planning. Spawns a team of persona-based research agents that investigate approaches from different angles, evaluates trade-offs, and produces a documented recommendation.
Output: Idea documents are saved to docs/ideas/<topic-slug>.md in a format designed to feed into the /plan skill.
aliases:
/brainstorm: /brainstorm
/ideate: /brainstorm
defaults:
depth: normal
output_dir: docs/ideas
codex_iterations: 5
Customization: Override defaults in
toolkit.tomlunder[skills.brainstorm]. Runbash toolkit.sh customize skills/brainstorm/SKILL.mdto take full ownership of this skill.
/brainstorm "real-time updates" # Standard brainstorm (normal depth)
/brainstorm "auth system" --depth deep # Deep research with more agents
/brainstorm "caching strategy" --quick # Quick single-agent exploration
/brainstorm "state management" --gemini # Include Gemini second opinion
/brainstorm "API redesign" --no-commit # Generate doc without committing
/brainstorm "data pipeline" --auto-plan # Auto-spawn /plan after brainstorm
"brainstorm approaches for real-time notifications"
"explore options for database migration"
"research the best way to add authentication"
"I need to think through our caching strategy"
| Flag | Description | Default |
|---|---|---|
<topic> | Required. The idea, problem, or domain to explore | -- |
--quick | Alias for --depth shallow. Single-agent, no team. | off |
--depth <level> | shallow / normal / deep | normal |
--gemini | Include a Gemini second-opinion persona in the team | off |
--no-commit | Generate the idea doc but do not commit it | off |
--auto-plan | After brainstorm completes, automatically spawn /plan skill with the generated idea doc | off |
| Depth | Team? | Max personas | Codex iters | Use case |
|---|---|---|---|---|
shallow | No | 0 (orchestrator only) | 2 | Quick exploration, simple topics |
normal | Yes | 3-4 | 5 | Standard brainstorming |
deep | Yes | 5-6 | 8 | Complex multi-domain research |
| Rule | Description |
|---|---|
| 1. Research only | This skill produces idea documents. Do NOT write any implementation code. |
| 2. Ask before spending compute | Present the research plan to the user and get approval before spawning any team agents. |
| 3. Current sources only | ALWAYS include the current year in WebSearch queries. Discard information older than 2 years ago unless it represents fundamental principles. |
| 4. User input is the most valuable signal | Ask generously at checkpoints. Brainstorming is collaborative — don't guess when you can ask. |
| 5. Generic skill | No project-specific content in this file. Persona prompts must be generic. |
| 6. No time estimates | Focus on what and why, not when. |
| Rationalization | Why It Is Wrong | Correct Behavior |
|---|---|---|
| "The research plan is obvious, skip user approval" | Skipping Phase 2 approval wastes compute on wrong directions and violates Critical Rule #2 | Present the research plan and wait for explicit user approval before spawning agents |
| "This persona's findings overlap, merge them early" | Premature merging loses dissenting viewpoints that drive the best synthesis | Keep all persona reports separate until the synthesis phase; disagreements are signal, not noise |
| "The user's topic is clear enough, skip clarification" | Ambiguous scope produces unfocused research across all personas | Ask at least one clarifying question in Phase 0 unless the topic includes explicit constraints |
| "Three approaches are enough, no need for more" | Anchoring on early approaches misses unconventional options the persona team was designed to surface | Evaluate the persona catalog's full diversity; add approaches if any persona identifies a gap |
| "Web search returned enough results, skip deeper research" | Surface-level results miss implementation trade-offs that differentiate good from great recommendations | Each persona must cite at least one concrete source with specific findings, not just topic summaries |
Before doing ANY research:
--quick, --depth, --gemini, --no-commit, --auto-plan).real-time-updates).docs/ideas/<topic-slug>.md already exists. If so, ask: "An existing idea doc was found. Resume and extend it, or start fresh?"Checkpoint 1 — Scope & Goals:
Round 1 (AskUserQuestion, up to 4 questions):
Round 2 (AskUserQuestion, up to 3 more):
Wait for all answers before proceeding.
The orchestrator does quick preliminary research BEFORE spawning any agents. This informs agent selection and approach generation.
Codebase scan — Use Grep/Glob/Read to find anything related to the topic:
docs/plans/ or docs/ideas/Quick web search — Run 2-3 WebSearch queries with the current year:
"<topic> best practices <current-year>""<topic> comparison approaches""<topic> <detected-stack> implementation" (using stacks from project config)Topic classification — Classify the topic into one or more domains:
| Domain | Triggers |
|---|---|
architecture | System design, scaling, infrastructure, microservices, data flow |
technology | Library choice, framework, language, database, tool selection |
product | User features, UX flows, business logic, monetization |
algorithm | Data structures, ML models, optimization, performance tuning |
integration | APIs, third-party services, authentication, data pipelines |
devops | CI/CD, deployment, monitoring, infrastructure-as-code |
Generate 2-4 candidate approaches based on reconnaissance findings. Each approach should be a distinct strategy with a name and 1-2 sentence summary.
Select personas dynamically based on topic classification and depth (see Persona Selection below).
This is a critical user checkpoint. Before spending compute on agents, present the plan and get approval.
Display a structured summary:
## Brainstorm Plan: <topic>
**Domains identified**: architecture, technology
**Depth**: normal (3-4 research personas)
**Candidate approaches to investigate**:
1. A1: <approach name> — <brief description>
2. A2: <approach name> — <brief description>
3. A3: <approach name> — <brief description>
**Research personas I will spawn**:
- the-pragmatist: Will research proven solutions and community adoption
- the-innovator: Will research cutting-edge approaches and latest trends
- the-architect: Will analyze system design and codebase integration
**Codebase context found**:
- <relevant files/patterns found in Phase 1>
Then ask Checkpoint 2 questions:
Round 1 (AskUserQuestion, up to 4 questions):
Round 2 (AskUserQuestion, up to 3 more):
Incorporate user feedback. Adjust approaches, personas, and depth as requested.
Skip this phase entirely if --quick / shallow depth. In shallow mode, the orchestrator does all research itself (single-agent mode).
TeamCreate:
team_name: "brainstorm-<topic-slug>"
description: "Exploring: <topic>"
Task:
team_name: "brainstorm-<topic-slug>"
name: "<persona-name>"
subagent_type: "general-purpose"
prompt: <persona prompt with topic, approaches, context, and format>
When spawning each persona agent via Task(), use this template (replace placeholders):
You are {persona_name} for a brainstorm session on "{topic}".
## Your Persona
Thinking style: {persona_thinking_style}
Key question: {persona_key_question}
Research focus: {persona_research_focus}
Bias: {persona_bias}
## Topic
{topic}
## Constraints
{constraints_from_user}
## Candidate Approaches to Investigate
{approaches_list}
## Codebase Context
{codebase_findings_from_phase_1}
## User Goals and Priorities
{user_answers_from_phase_0}
## Instructions
1. Research each candidate approach from YOUR persona's perspective.
2. Always include the current year in your WebSearch queries.
3. Use WebSearch, WebFetch, Read, Grep, Glob, and context7 tools for research.
4. Structure your report using the Persona Report Format below.
5. Send your completed report back via SendMessage when done.
## Persona Report Format
Follow this structure exactly:
## {persona_name} Report: {topic}
### Key Findings
- <finding 1 with source>
- <finding 2 with source>
- <finding 3 with source>
### Approach Evaluations
#### A1: <Name>
- **My take**: <1-2 sentence opinion from your perspective>
- **Evidence**: <supporting evidence with sources>
- **Concerns**: <issues from your perspective>
(Repeat for each approach)
### My Recommendation
<which approach you favor and why>
### Surprising Findings
<anything unexpected>
### Sources
- <URLs and references>
Receive persona reports — Messages from teammates are delivered automatically. Wait for all personas to report.
Mid-research redirect — If you notice:
Ad-hoc user questions — If research reveals something the user should know about (a surprising constraint, a major fork, or a need for domain context), ask the user immediately. Do not wait for a checkpoint.
Collect all reports into a synthesis workspace.
The orchestrator (not agents) synthesizes all persona findings.
Read all persona reports.
For each candidate approach, build an evaluation matrix:
| Dimension | A1: Name | A2: Name | A3: Name |
|---|---|---|---|
| Implementation complexity | Low/Med/High | ... | ... |
| Operational complexity | ... | ... | ... |
| Scalability | ... | ... | ... |
| Ecosystem maturity | ... | ... | ... |
| Team familiarity | ... | ... | ... |
| Maintenance burden | ... | ... | ... |
| Reversibility | ... | ... | ... |
| Cost | ... | ... | ... |
Identify where personas agreed and where they disagreed. The disagreements are especially valuable — they surface real trade-offs.
Determine the recommended approach with confidence level and reasoning.
Write the initial draft of the idea document to docs/ideas/<topic-slug>.md.
Present the synthesis to the user. Highlight persona disagreements.
## Synthesis Complete
**Recommended approach**: A2: <name>
**Confidence**: Medium
**Reasoning**: <brief justification>
**Key tensions**:
- the-pragmatist recommends A1 (proven, lower risk)
- the-innovator recommends A3 (better long-term, but newer)
- the-architect says A2 fits the codebase best
**Evaluation matrix**: <show table>
Then ask Checkpoint 3 questions:
Round 1 (AskUserQuestion, up to 4 questions):
Round 2 (AskUserQuestion, up to 3 more — if user chose "one more round"):
If the user wants deeper research on a specific approach, spawn a single focused follow-up persona (via Task, not a full team cycle).
Same pattern as the /plan skill's Phase 2.
mcp__codex__codex:
approval-policy: "never"
prompt: "Review this idea exploration document for:
1. Completeness — are all approaches fairly evaluated?
2. Balanced analysis — any bias toward one approach?
3. Missing alternatives — obvious approaches not considered?
4. Research gaps — claims without evidence?
5. Actionability — can someone use this to start planning?
Start with ISSUES: if you find problems, or SOLID: if the doc is ready."
| Rule | Value |
|---|---|
| Maximum iterations | 2 (shallow) / 5 (normal) / 8 (deep) |
| Stop early when | Response starts with "SOLID:" |
| Continue when | Response starts with "ISSUES:" |
Incorporate feedback and regenerate on each iteration.
If Codex is unavailable: skip with note "Codex unavailable — manual review recommended."
Shutdown the team (if one was created):
SendMessage with type: "shutdown_request" per active persona). Do NOT send them sequentially.~/.claude/teams/ will not affect the project.Write the final idea document to docs/ideas/<topic-slug>.md.
Commit (unless --no-commit):
docs/ideas/ directory if it does not existdocs/ideas/<topic-slug>.mdgit commit -F <file> (avoids shell escaping issues with heredoc)Add idea exploration: <topic>Present final summary:
## Brainstorm Complete
**Topic**: <topic>
**Output**: docs/ideas/<topic-slug>.md
**Approaches evaluated**: 3
**Recommended**: A2: <name> (Medium confidence)
**Research personas used**: 3 (the-pragmatist, the-innovator, the-architect)
**Codex iterations**: 4 of 5
Auto-flow to /plan (if --auto-plan flag is set):
IF --auto-plan is set:
Spawn a fresh Task agent with clean context to run the plan skill. The agent must read the skill file itself — do not pass session state or synthesis context.
Task:
subagent_type: "general-purpose"
prompt: |
Read the skill file at skills/plan/SKILL.md, then execute /plan <topic-slug>.
The brainstorm idea doc is at docs/ideas/<topic-slug>.md — the plan skill
will auto-detect it during Phase 0.
Start fresh — do not assume any context from a previous session.
ELSE (flag not set):
Display: Next step: Run /plan <topic-slug> to create an implementation plan
Instead of functional roles, the team uses distinct personas that bring different thinking styles. This creates natural tension and diverse perspectives — essential for good brainstorming.
Inspired by divergent thinking frameworks, each persona has a personality, bias, and research style. The natural disagreements between personas surface real trade-offs that a single-perspective analysis would miss.
All personas are spawned as general-purpose subagent_type (they need WebSearch, WebFetch, context7, Read, Grep, Glob, and SendMessage).
Thinking style: Conservative, risk-aware, simplicity-focused
Key question: "What's the simplest thing that actually works in production?"
Research focus:
Bias: Prefers proven over novel. Will push back on complexity.
Thinking style: Forward-looking, trend-chasing, possibility-focused
Key question: "What would the ideal solution look like if we had no constraints?"
Research focus:
Bias: Prefers novel over proven. Will push for the future-facing option.
Thinking style: Skeptical, adversarial, devil's advocate
Key question: "Why would this fail? What's the hidden cost?"
Research focus:
Bias: Finds problems in everything. Will challenge the "obvious" choice.
Thinking style: Empathetic, experience-focused, user-centric
Key question: "Would someone actually enjoy using this?"
Research focus:
Bias: Prioritizes user experience over technical elegance.
Thinking style: Systems-thinking, structural, integration-focused
Key question: "How does this compose with what already exists?"
Research focus:
Bias: Prioritizes clean architecture and long-term maintainability.
Thinking style: Data-driven, thorough, evidence-focused
Key question: "What does the evidence actually say?"
Research focus:
Bias: Prioritizes evidence over opinion. Will flag unsubstantiated claims.
FUNCTION select_personas(domains, approaches, depth, flags):
personas = []
budget = {shallow: 0, normal: 4, deep: 6}[depth]
IF depth == "shallow":
RETURN [] # orchestrator handles everything
# Step 1: Core trio — always included in normal and deep
# the-pragmatist + the-innovator create productive tension
# the-researcher provides evidence-based depth (deep research is the skill's core value)
personas.append("the-pragmatist")
personas.append("the-innovator")
personas.append("the-researcher")
# Step 2: Add the-architect when system design or codebase integration matters
# (most topics benefit from architectural perspective)
IF "architecture" IN domains OR "integration" IN domains OR "devops" IN domains:
personas.append("the-architect")
ELIF depth == "deep":
personas.append("the-architect") # always include in deep mode
# Step 3: Add the-critic if multiple approaches need challenging
IF len(approaches) >= 2 AND len(personas) < budget:
personas.append("the-critic")
# Step 4: Add domain-contextual persona if budget allows
IF "product" IN domains AND "the-user-advocate" NOT IN personas AND len(personas) < budget:
personas.append("the-user-advocate")
# Step 5: In deep mode, fill remaining slots
IF depth == "deep":
FOR p IN ["the-critic", "the-user-advocate", "the-architect"]:
IF p NOT IN personas AND len(personas) < budget:
personas.append(p)
# Step 6: Add gemini if flagged or deep mode
IF flags.gemini OR depth == "deep":
IF len(personas) < budget:
personas.append("gemini-consultant")
# Step 7: Cap at budget
RETURN personas[:budget]
Normal mode (budget 4): pragmatist + innovator + researcher + (architect or critic) = 3-4 personas Deep mode (budget 6): pragmatist + innovator + researcher + architect + critic + (user-advocate or gemini) = 5-6 personas
The gemini-consultant is not a persona — it is a special agent that invokes the Gemini CLI for an external model's perspective. It uses the agents/gemini.md agent prompt.
Spawn via Task:
Task(
subagent_type: "general-purpose",
prompt: "Read agents/gemini.md for instructions on invoking the Gemini CLI.
Your task: Get Gemini's second opinion on this brainstorming topic.
Topic: {topic}
Approaches identified so far: {approach_list}
Ask Gemini to:
- Critique the approach list
- Suggest alternatives the team may have missed
- Provide a contrarian take on the recommended approach
Return Gemini's full response."
)
If the gemini CLI is not installed, skip with a log message: "Gemini CLI not found — skipping second opinion."
Invoke the gemini-consultant after all persona reports have been collected (end of Phase 4) and during the synthesis phase (Phase 5). Specifically:
Do NOT invoke gemini-consultant in parallel with other personas during Phase 4. Its value comes from reacting to the team's collective findings, not duplicating their research.
Each persona should structure their report as:
## <Persona Name> Report: <Topic>
### Key Findings
- <finding 1 with source>
- <finding 2 with source>
- <finding 3 with source>
### Approach Evaluations
#### A1: <Name>
- **My take**: <1-2 sentence opinion from this persona's perspective>
- **Evidence**: <supporting evidence with sources>
- **Concerns**: <issues from this persona's perspective>
#### A2: <Name>
<same structure>
### My Recommendation
<which approach this persona favors and why>
### Surprising Findings
<anything unexpected that emerged during research>
### Sources
- <URLs and references>
The skill should actively seek user input, not avoid it. Brainstorming is inherently collaborative — the user's domain knowledge, preferences, and intuitions are critical inputs that no amount of web research can replace.
Between checkpoints, the orchestrator should ask the user whenever:
Do NOT interrupt the user with ad-hoc questions when:
The idea document at docs/ideas/<topic-slug>.md:
# <Topic> — Idea Exploration
> **Status**: Draft | Reviewed | Ready for Planning
>
> **Created**: <date>
>
> **Depth**: shallow | normal | deep
>
> **Research personas**: <count> (<persona names>)
>
> **Codex iterations**: <N> of <max>
## Problem Statement
<What problem does this idea solve? Why does it matter? Context from the user.>
## Context
### Current State
<What exists today in the codebase? Related systems or features?>
### Constraints
<Technical, business, timeline, or platform constraints identified during clarification.>
### Goals
<What success looks like, from the user's perspective.>
## Approaches Evaluated
### A1: <Approach Name>
**Summary**: <1-2 sentence description>
**How it works**: <Technical overview>
**Strengths**:
- <strength 1>
- <strength 2>
**Weaknesses**:
- <weakness 1>
- <weakness 2>
**Key technologies**: <libraries, frameworks, services>
**Estimated complexity**: Low | Medium | High
### A2: <Approach Name>
<Same structure>
### A3: <Approach Name>
<Same structure>
## Evaluation Matrix
| Dimension | A1 | A2 | A3 |
| --------- | -- | -- | -- |
| Implementation complexity | rating | rating | rating |
| Operational complexity | rating | rating | rating |
| Scalability | rating | rating | rating |
| Ecosystem maturity | rating | rating | rating |
| Team familiarity | rating | rating | rating |
| Maintenance burden | rating | rating | rating |
| Reversibility | rating | rating | rating |
| Cost | rating | rating | rating |
## Persona Perspectives
### Where Personas Agreed
<Findings and recommendations where multiple personas converged — these are high-confidence conclusions.>
### Where Personas Disagreed
<The most valuable section. Captures tensions like the-pragmatist vs the-innovator, the-critic's concerns vs the-researcher's evidence. Each disagreement surfaces a real trade-off.>
## Recommendation
**Recommended approach**: A<N>: <Name>
**Confidence**: High | Medium | Low
**Reasoning**: <Why this approach is recommended. Reference persona evidence.>
**Key trade-off accepted**: <What you are giving up by choosing this approach.>
## Research Findings
### Industry Trends
<What is happening in the industry relevant to this topic?>
### Best Practices
<Established patterns and recommendations.>
### Libraries and Tools
<Specific tools researched with versions, maturity, and compatibility.>
### Real-World Examples
<How other projects or companies solve this problem.>
## Risks and Open Questions
| Risk | Severity | Mitigation |
| ---- | -------- | ---------- |
| <risk 1> | High/Med/Low | <mitigation strategy> |
### Open Questions
- <Unresolved question 1>
- <Unresolved question 2>
## Next Steps
1. Run `/plan <topic-slug>` to create a detailed implementation plan
2. <Any prerequisite research or spikes needed>
3. <Any stakeholder reviews recommended>
## Sources
- <URLs and references from all persona research>
| Error | Phase | Recovery |
|---|---|---|
| Topic too vague after both question rounds | Phase 0 | Proceed with best interpretation. Note uncertainty in the idea doc. |
| Existing idea doc found | Phase 0 | Ask user: resume/extend or start fresh. |
| TeamCreate fails | Phase 3 | Fall back to single-agent mode (orchestrator does all research). Log: "Team creation failed — running in single-agent mode." |
| Persona spawn fails | Phase 3 | Skip that persona, redistribute its research questions to another persona or handle in orchestrator. |
| Persona times out (no report) | Phase 4 | Wait up to 2 minutes. If no response, proceed without. Note gap in synthesis. |
| 50%+ personas fail | Phase 4 | Fall back to orchestrator-only research. Note: "Most research agents failed — results may be less comprehensive." |
| Persona sends empty/poor report | Phase 4 | Discard and note the gap. Do not retry. |
| WebSearch rate limited | Any | Retry after 30 seconds, max 3 retries. Proceed with available information. |
| Codex unavailable | Phase 7 | Skip Codex loop. Note: "Codex unavailable — manual review recommended." |
| Gemini CLI not installed | Phase 3 | Skip gemini-consultant persona. Log: "Gemini CLI not found — skipping second opinion." |
| Output directory does not exist | Phase 8 | Create docs/ideas/ directory. |
| Git commit fails | Phase 8 | Report error to user. Do not block on commit failure. |
| SendMessage delivery fails | Phase 4 | Retry once. If still failing, proceed without that persona's response. |
| TeamDelete fails | Phase 8 | Log warning. Team files in ~/.claude/teams/ will not affect the project. |
The idea document is designed as a natural precursor to /plan. The plan skill automatically detects idea docs.
Workflow: /brainstorm <topic> → docs/ideas/<topic>.md → /plan <topic> → docs/plans/<topic>.md → /implement
When the user runs /plan <topic-slug>, the plan skill:
docs/ideas/<topic-slug>.md in Phase 0| Idea doc section | Feeds into plan section |
|---|---|
| Problem Statement | Summary |
| Recommended Approach | Starting architecture |
| Evaluation Matrix | Principles (what to optimize for) |
| Research Findings | Research Findings (skip redundant research) |
| Risks and Open Questions | Risks & Mitigations |
| Libraries and Tools | Libraries Considered |
The plan skill also still works with free text (/plan some-feature) when no idea doc exists — the idea doc integration is additive, not required.