mit einem Klick
decide
// Generate an interactive decision configurator from research or plan analysis. Presents options as explorable cards with trade-offs, costs, and filtering. Integrates with Planner to collect DEC-ID decisions.
// Generate an interactive decision configurator from research or plan analysis. Presents options as explorable cards with trade-offs, costs, and filtering. Integrates with Planner to collect DEC-ID decisions.
Analyze system health, surface patterns, manage improvement suggestions. Self-improvement flywheel for the hook/agent/dispatch system.
Multi-model deep research with comparative assessment (OpenAI + Perplexity + Gemini). Queries 3 deep research providers in parallel and produces a comparative synthesis.
Analyze a project's MASTER_PLAN.md to assess coherence, evolution trajectory, and intent alignment. Modes: default (full analysis), compare (delta between reckonings), operationalize (convert findings to actionable work via /decide), steer (strategic brainstorming grounded in findings).
Trace systemic brittleness from symptom to root cause. Data-flow analysis of hooks, state, and dispatch paths to find where signals break, race, or carry garbage. Produces single-gate fixes, not fallback chains.
| name | decide |
| description | Generate an interactive decision configurator from research or plan analysis. Presents options as explorable cards with trade-offs, costs, and filtering. Integrates with Planner to collect DEC-ID decisions. |
| argument-hint | [topic, research path, or 'plan' to use current plan context] |
| context | fork |
| agent | general-purpose |
| allowed-tools | Bash, Read, Write, Glob, Grep, AskUserQuestion |
Generate interactive decision configurators that transform complex trade-off analysis into explorable interfaces. Presents options as cards with visual hierarchy, automatic filtering, cascading dependencies, and live cost tracking.
Use this skill when decisions have:
Don't use for:
The skill can extract decision points from three sources:
Research directories — /decide .claude/research/DeepResearch_Auth_2026-02-11
MASTER_PLAN.md context — /decide plan
Conversation context — /decide monitor purchase decision
If argument is a filesystem path:
If argument is "plan":
If argument is topic/question:
If no source is clear:
For each decision source, identify:
Steps — Sequential decision points (e.g., "Choose auth method" → "Choose database" → "Choose deployment")
Options — Alternatives within each step
Filtering logic — Cascading constraints
filterBy (data-based) or visibleWhen (state-based)Cost tracking — Live impact bar
Summary & Export — Final output
Write decision-config.json following the schema. The config is the single source of truth for the configurator. The build script injects it verbatim into the HTML template.
Reference the fixtures as examples:
Purchase decision pattern — See fixtures/monitor-setup.json:
meta.type: "purchase"Technical decision pattern — See fixtures/tech-stack.json:
meta.type: "technical"Key config patterns:
filterBy: Filter options in step B based on data field from selected option in step A
{
"id": "monitor",
"filterBy": { "dataField": "tier", "matchStep": "priority" }
}
Meaning: "Show only monitors where option.data.tier matches the selected priority option's ID"
visibleWhen: Show/hide option based on exact state match
{
"id": "triple-arm",
"visibleWhen": { "step": "quantity", "equals": "qty-3" }
}
Meaning: "Show this arm option only when step 'quantity' has option 'qty-3' selected"
impactBar.items: Dynamic cost calculation
{
"label": "Monitors",
"fromStep": "monitor",
"multiplyByStep": "quantity"
}
Meaning: "Get price from selected monitor, multiply by quantity value"
When generating config:
Write the config to decision-config.json in the working directory (or user-specified path).
Run the build script with --serve to start a local server. This is required — the Confirm button POSTs decisions back to the server, which writes them to decisions.json on disk.
python3 ~/.claude/skills/decide/scripts/build.py decision-config.json --serve
CRITICAL: Run this with run_in_background: true so you can continue operating while the user interacts with the configurator. Set timeout: 600000 (10 minutes).
The script will:
http://localhost:{port}/ in browserDecisions will be saved to: {cwd}/decisions.jsondecisions.json and print >>> DECISIONS CONFIRMEDFlags:
--serve — start local server (primary mode, enables auto-submit)--open — open as file:// (fallback, clipboard-only, no auto-submit)--decisions-out PATH — custom path for decisions.json outputTell the user:
Generated decision configurator — opening in browser.
Server running at http://localhost:{port}/
The configurator presents {N} decision steps with {M} total options.
Make your selections, then click "Confirm Decisions" — your choices will be submitted automatically.
Then wait for the user to say they're done (or check the background task for the >>> DECISIONS CONFIRMED message).
When the user confirms, the server writes decisions.json to disk. Read it directly.
Method 1: Read from file (primary — works with --serve)
cat decisions.json
Or use the Read tool on the decisions.json path that the server printed at startup. This is the default path — {cwd}/decisions.json unless --decisions-out was specified.
Check the background task output for the >>> DECISIONS CONFIRMED line to know when the file is ready. If the user says "done" but the file doesn't exist yet, tell them: "Please click the green 'Confirm Decisions' button in the configurator first."
Method 2: Chrome extension (if available)
If browser automation tools are available (mcp__claude-in-chrome__*):
// Via javascript_tool on the configurator tab:
JSON.stringify(window.__DECISIONS__)
Method 3: User pastes from clipboard
Fallback for --open (file://) mode where the server isn't running. The Confirm button copies JSON to clipboard.
Once you have the decisions JSON, parse it and take concrete action. The JSON looks like:
{
"decisions": {
"auth-method": {
"decId": "DEC-AUTH-001",
"selected": "jwt-pkce",
"title": "JWT + PKCE Flow",
"rationale": "Stateless, scales horizontally"
}
},
"timestamp": "2026-02-11T14:30:00Z"
}
Action depends on the invoking context:
Return the parsed decisions to the calling Planner agent. The Planner will:
### Planned Decisions in MASTER_PLAN.md:
- DEC-AUTH-001: JWT + PKCE Flow — Stateless, scales horizontally — Addresses: REQ-P0-001
**Decision IDs:** fields with the confirmed DEC-IDsTo enable this, output the decisions as a structured block the Planner can parse:
CONFIRMED DECISIONS:
- DEC-AUTH-001 (auth-method): JWT + PKCE Flow — "Stateless, scales horizontally"
- DEC-DATA-001 (database): PostgreSQL + Prisma — "Type-safe queries with Prisma Client"
- DEC-DEPLOY-001 (deployment): Docker + Fly.io — "Full control over runtime environment"
SOURCE: configurator confirmed at {timestamp}
Present the decisions and take the next step:
### Planned Decisions sectionsFor purchase decisions (meta.type = "purchase"), skip plan integration. Instead:
{cwd}/decisions.json for referenceAlways end with forward motion — never leave decisions hanging without a next action.
Refinement workflow: If the user wants to adjust after confirming:
python3 ~/.claude/skills/decide/scripts/build.py decision-config.json --output configurator.html --openThe schema is defined in schema/decision-config.schema.json. Key fields:
title (string, required) — Configurator titlesubtitle (string, optional) — Subtitle/descriptiontype (enum, required) — "purchase" | "technical" | "implementation" | "configuration"
researchDir (string, optional) — Path to research directoryplanContext (object, optional) — { masterPlan, phase, requirements[] }id (string, required) — Unique step identifiertitle (string, required) — Step titlesubtitle (string, optional) — Step subtitledecId (string, optional) — DEC-ID from MASTER_PLAN.mdfilterBy (object, optional) — { dataField, matchStep }infoBox (object, optional) — { html, variant: "default" | "critical" | "warning" }options[] (array, required, min 1) — Options for this stepid (string, required) — Unique option identifiertitle (string, required) — Option titlebadge (object, optional) — { text, color }recommended (bool, default false) — Show "RECOMMENDED" ribboneliminated (bool, default false) — Gray out and disableprice (object, optional) — { amount: number, label: string }specs[] (array, optional) — Bullet points
tags[] (array, optional) — Tags with ok/not-ok states
links[] (array, optional) — Resource links
data (object, optional) — Arbitrary data for filteringvisibleWhen (object, optional) — { step, equals }items[] (array, required if impactBar present)
totalLabel (string, optional, default "Total")prefix (string, optional, default "$")title (string, required if summary present)gridItems[] (array, optional) — Summary grid
actions[] (array, optional) — Action items
footer (object, optional) — { html }export (object, optional) — { enabled: bool, filename, includeDecIds: bool }summary (string, optional) — Executive summary from researchsources[] (array, optional) — Research sources
{
"meta": {
"title": "Monitor Setup Configurator",
"subtitle": "Triple-checked buying guide for Mac workstation",
"type": "purchase"
},
"steps": [
{
"id": "priority",
"title": "What matters most?",
"subtitle": "This determines your resolution tier",
"options": [
{
"id": "5k",
"title": "Maximum Text Crispness",
"badge": { "text": "218 PPI", "color": "green" },
"recommended": true,
"price": { "amount": 0, "label": "5K Resolution" },
"specs": [
{ "text": "218 PPI — native 2x Retina on macOS", "type": "highlight" },
{ "text": "Zero interpolation, zero scaling artifacts", "type": "highlight" }
],
"data": { "tier": "5k" }
},
{
"id": "4k",
"title": "Good Text, Great Value",
"badge": { "text": "163 PPI", "color": "amber" },
"price": { "amount": 0, "label": "4K Resolution" },
"specs": [
{ "text": "163 PPI — requires fractional macOS scaling", "type": "neutral" },
{ "text": "Subtle font softness possible", "type": "warning" }
],
"data": { "tier": "4k" }
}
],
"infoBox": {
"html": "<strong>For astigmatism:</strong> 5K is dramatically crisper.",
"variant": "critical"
}
},
{
"id": "monitor",
"title": "Choose your monitor",
"filterBy": { "dataField": "tier", "matchStep": "priority" },
"options": [
{
"id": "asus-5k",
"title": "ASUS ProArt PA27JCV",
"badge": { "text": "5K • BEST VALUE", "color": "green" },
"recommended": true,
"price": { "amount": 799, "label": "per monitor" },
"specs": [
{ "text": "5120 x 2880 — 218 PPI", "type": "highlight" },
{ "text": "99% DCI-P3, Delta E < 2", "type": "highlight" }
],
"links": [
{ "label": "Amazon", "url": "https://amazon.com/...", "detail": "Ships to 20002" }
],
"data": { "tier": "5k" }
}
]
}
],
"impactBar": {
"items": [
{ "label": "Monitors", "fromStep": "monitor", "multiplyByStep": "quantity" },
{ "label": "Arms", "fromStep": "arms" },
{ "label": "Cables", "perUnit": 30, "multiplyByStep": "quantity", "approximate": true }
],
"totalLabel": "Total Setup Cost",
"prefix": "$"
},
"summary": {
"title": "Your Setup — Ready to Buy",
"gridItems": [
{ "label": "Monitors", "template": "{quantity.value}x {monitor.title}", "highlight": false },
{ "label": "Total Cost", "template": "${total}", "highlight": true }
],
"export": { "enabled": false }
}
}
{
"meta": {
"title": "Authentication & Database Decisions",
"subtitle": "Choose your tech stack for the auth microservice",
"type": "technical",
"planContext": {
"masterPlan": "MASTER_PLAN.md",
"phase": "Phase 1: Core Authentication",
"requirements": ["REQ-P0-001", "REQ-P0-002"]
}
},
"steps": [
{
"id": "auth-method",
"title": "Choose authentication method",
"decId": "DEC-AUTH-001",
"options": [
{
"id": "jwt-pkce",
"title": "JWT + PKCE Flow",
"badge": { "text": "Modern", "color": "purple" },
"recommended": true,
"specs": [
{ "text": "Stateless, scales horizontally", "type": "highlight" },
{ "text": "No server-side session storage needed", "type": "highlight" },
{ "text": "Requires careful token rotation strategy", "type": "warning" }
],
"links": [
{ "label": "RFC 7636 (PKCE)", "url": "https://...", "detail": "OAuth 2.0 extension" }
]
},
{
"id": "session-based",
"title": "Session-Based Auth",
"badge": { "text": "Traditional", "color": "blue" },
"specs": [
{ "text": "Simple to implement", "type": "highlight" },
{ "text": "Requires sticky sessions or shared state", "type": "warning" }
]
}
]
},
{
"id": "database",
"title": "Choose database",
"decId": "DEC-DATA-001",
"options": [
{
"id": "postgres-prisma",
"title": "PostgreSQL + Prisma",
"recommended": true,
"specs": [
{ "text": "Type-safe queries with Prisma Client", "type": "highlight" },
{ "text": "Built-in migration system", "type": "highlight" }
]
}
]
}
],
"impactBar": {
"items": [
{ "label": "Auth", "fromStep": "auth-method" },
{ "label": "Database", "fromStep": "database" }
],
"totalLabel": "Total",
"prefix": ""
},
"summary": {
"title": "Your Tech Stack",
"gridItems": [
{ "label": "Auth Method", "template": "{auth-method.title}", "highlight": false },
{ "label": "Database", "template": "{database.title}", "highlight": false },
{ "label": "Total", "template": "{total}", "highlight": true }
],
"export": {
"enabled": true,
"filename": "tech-decisions.json",
"includeDecIds": true
}
}
}
The /decide skill is invoked by the Planner during Phase 2 (Architecture Design). The full round-trip:
/decidePlanner Phase 2, Step 2 (Research Gate):
→ Identifies 3+ decisions with trade-offs
→ Invokes: /decide plan
→ Skill generates configurator, opens in browser
→ Skill tells user to click "Confirm Decisions" when done
→ Skill WAITS for user to return
User explores options, sees trade-offs, makes selections, clicks "Confirm Decisions".
window.__DECISIONS__ (for Chrome extension)User says "done" or "confirmed"
→ Skill reads window.__DECISIONS__ via Chrome extension
→ OR asks user to paste from clipboard
→ Parses the decisions JSON
CONFIRMED DECISIONS:
- DEC-AUTH-001 (auth-method): JWT + PKCE Flow — "Stateless, scales horizontally"
- DEC-DATA-001 (database): PostgreSQL + Prisma — "Type-safe queries with Prisma Client"
- DEC-DEPLOY-001 (deployment): Docker + Fly.io — "Full control over runtime environment"
SOURCE: configurator confirmed at 2026-02-11T14:30:00Z
The Planner receives the structured block and writes each decision into the plan:
### Planned Decisions
- DEC-AUTH-001: JWT + PKCE Flow — Stateless, scales horizontally — Addresses: REQ-P0-001, REQ-P0-003
- DEC-DATA-001: PostgreSQL + Prisma — Type-safe queries with Prisma Client — Addresses: REQ-P0-002
- DEC-DEPLOY-001: Docker + Fly.io — Full control over runtime environment — Addresses: REQ-P0-004
The Addresses: field comes from the config's meta.planContext.requirements array, mapped by the Planner based on which requirements each decision satisfies.
{
"decisions": {
"auth-method": {
"decId": "DEC-AUTH-001",
"selected": "jwt-pkce",
"title": "JWT + PKCE Flow",
"rationale": "Stateless, scales horizontally"
},
"database": {
"decId": "DEC-DATA-001",
"selected": "postgres-prisma",
"title": "PostgreSQL + Prisma",
"rationale": "Type-safe queries with Prisma Client"
}
},
"timestamp": "2026-02-11T14:23:45Z"
}
The Planner proceeds to Phase 2 Step 3 (Finalize decisions) with the user's confirmed selections, then Phase 3 (Issue Decomposition) and Phase 4 (MASTER_PLAN.md generation). The DEC-IDs from /decide carry through to @decision annotations in code, creating full traceability: User selection → DEC-ID in plan → @decision in code.
Config validation fails:
Build script not found:
No decision source found:
Research directory exists but no reports:
/decide .claude/research/DeepResearch_Auth_2026-02-11
→ Generates configurator from deep research findings on auth methods
/decide plan
→ Generates configurator from current MASTER_PLAN.md architectural decisions
/decide monitor purchase decision
→ Analyzes recent conversation about monitor purchasing, generates configurator
/decide "nextjs vs remix" after research
→ Looks for recent research on Next.js vs Remix, generates framework comparison configurator
Write a compact result summary so the parent session receives key findings:
cat > .claude/.skill-result.md << 'SKILLEOF'
## Decision Configurator Result
**Decisions made:** [n]
**Confirmed DEC-IDs:** [DEC-XXX-001, DEC-XXX-002, ...]
### Decisions Summary
1. [DEC-ID]: [Choice made] — [1-line rationale]
2. [DEC-ID]: [Choice made] — [1-line rationale]
### Pending
- [Any decisions deferred or needing follow-up]
SKILLEOF
Keep under 2000 characters. This is consumed by a hook — the parent session will see it automatically.
This skill enables the Planner to present complex trade-off analysis as explorable interfaces, making architectural decisions tangible and user-driven.