All shelves / Mods / Workflow
decision-tree
By ray-amjad
decision-tree is a Claude Code workflow mod by ray-amjad.
When Claude ends a reply with a question, explains the choice in a side pane and lets you explore any option, or your own, in a forked session.
Draws
Install
The marketplace name is claude-code-mods.
/plugin install decision-tree --marketplace ray-amjad/claude-code-modsIt runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
- Version
- 0.2.3
- License
- MIT
- Repo stars
- 94
- Last change
- 2026-10-17
What it can reach
- Draws in the session
- Runs a command when you press
The one-line install adds the marketplace too: answer y, then pick a scope. The author tested it on 2.1.296. After every turn a regex looks at the end of the reply for a question mark in the last paragraph, or two or more numbered or lettered options, and most turns stop there with no model call. Otherwise Haiku, the gateModel setting, confirms that you have to decide something, and a fork of the session with no tools explains the choice: the question, each option with what it leads to and its pros and cons, and a recommendation, drawn one box per option with the recommended one in green. Explore on a box forks the real session at the message that asked, with claude -p and read-only tools, and in 12 to 20 seconds shows what it would do and the next question it would ask; the Other box, or /explain other, explores your own answer. Continue branch opens the branch as a live session, in a new Herdr pane inside Herdr, or copied to your clipboard otherwise. Each branch is a full claude -p run with a turn's cost. Under 144 columns you get a toast, and /explain opens the pane above the prompt. The tree lives in the mod's memory, so a new question, a restart, or a reload clears it, while the branch sessions stay on disk and can be resumed by id. Explore uses --resume-session-at, which the author says is an undocumented Claude Code flag. It does nothing in -p or SDK sessions unless DECISION_TREE_WAIT=1 is set.
The marketplace name is claude-code-mods, the same string hamzafer, arasovic, and karanb192 use. Add ray-amjad/claude-code-mods. The marketplace also holds diagram-pane, secret-box, prompt-bouncer, and other mods. This one installs on its own. Weighing a choice before you answer it is why this page files it under workflow. qa-guide-aieo-product, by aieo-product, opens a pane when Claude asks a question that explains why, what each option does, and which option it would pick. open-asks, by erikdarlingdata, draws each question the session is waiting on in a band above the prompt, with the recommended answer. This one also lets you try an answer in a forked session before you give it. You answer Claude in the prompt as usual, and nothing in the pane goes back to Claude: every branch is its own session file, so the main conversation never sees it. /explain map shows every question and option you explored as one tree, and /explain back and top move up it.
Demo

What it hooks into
session.startWhen a session startsclassic.StopA Claude Code eventturn.completeWhen a turn endscommand.runWhen you run its slash command/explainui.renderDraws into the sessionPane
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Slash commands 1
/explainShow the decision tree; A to H explores an option, other <answer> explores your own
Files
The author's README and source, 4 files. They load when you open them.
Facts
- Author
- ray-amjad
- Category
- Workflow
- Marketplace
- claude-code-mods
- Folder
- plugins/decision-tree
- Version
- 0.2.3
- License
- MIT
- Repo stars
- 94
- Last change
- 2026-10-17
- Language
- TypeScript
- Files
- 8