plugins/documentation/skills/decision-trees/SKILL.md
Creates decision trees that both humans and AI agents can follow reliably — captures expert knowledge as branching logic with concrete conditions, clear actions, and visible reasoning traces. Use when the user wants to document a decision process, create a troubleshooting guide, build a triage flowchart, write an escalation tree, or turn tribal knowledge into structured steps.
npx skillsauth add lucasilverentand/skills decision-treesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create decision trees that work for two audiences at once: humans scanning for the right path, and AI agents that must walk every node and show their reasoning.
basename $(git rev-parse --show-toplevel) 2>/dev/null || echo "not in a repo"git rev-parse --show-toplevel 2>/dev/null || pwdreferences/format.mdBefore writing anything, understand the decision space:
If the conversation already contains this knowledge (e.g., the user described their process), extract it rather than re-asking. Only ask about gaps.
Build the tree top-down, starting from the trigger:
See references/format.md for the exact syntax.
If the tree is embedded in a skill or covers complex/judgment-heavy decisions, write a reasoning prompt before the first branch. See "Reasoning prompts" below for the full guide. The prompt should frame the problem, name key signals to gather before entering the tree, and call out the common mistake — without biasing toward any branch.
Skip this for simple mechanical trees where every condition is a clear boolean check.
Follow these principles:
Conditions must be observable. Each branch condition should be something the reader (human or agent) can check right now — run a command, read a value, inspect a state. "Is the service degraded?" is not observable. "Does curl -s /health return a non-200 status?" is.
Actions must be complete. A leaf node isn't "fix the configuration" — it's "edit config/production.yml, set max_connections to 100, then restart with systemctl restart app". The person following the tree shouldn't need to figure out how to do the action.
Add reasoning hints for agents. When a condition requires judgment (not just a boolean check), add a brief note about what to look for. This helps agents produce useful reasoning traces without turning every node into a paragraph.
Cover the fallback. Every set of sibling conditions needs a catch-all: "None of the above" or "Something else" that either escalates or points to a different resource.
docs/decision-trees/, .context/, or alongside the code it relates to)## Decision tree heading, longer trees in references/Walk the tree yourself before delivering it:
When asked to review or improve an existing decision tree:
| Issue | Location | Suggestion |Add a reasoning prompt before complex trees to orient the reader. It frames the problem, names key signals to gather before entering the tree, and calls out the common mistake — without biasing toward any branch. Skip for simple mechanical trees. See references/reasoning-prompts.md for the full guide, format, and examples.
Single trees work for isolated decisions, but real problems often span multiple phases — diagnose, then fix, then verify. Or the problem space is too wide to fit in one tree without hitting the depth limit. Chaining lets you decompose these into a sequence of focused trees that hand off to each other.
Don't chain to avoid writing better conditions. If the tree is too deep because conditions are broad ("is it a frontend issue?"), sharpen the conditions first.
A chain is a set of trees with explicit handoff points. See references/chaining.md for the full format and examples. The key mechanics:
Place this above the individual trees so readers can see the full flow:
## Chain overview
1. **Diagnose** — determine what's failing and why → produces a diagnosis
2. **Remediate** — fix the issue based on the diagnosis → produces a fix
3. **Verify** — confirm the fix worked and no regressions were introduced
Each tree then lives under its own heading below the overview.
Agents follow each tree using the standard pro/con evaluation protocol. At a handoff point, the agent must:
When following a decision tree, produce a visible reasoning trace using pro/con evaluation at every branch point. Evaluate every sibling condition (not just the first plausible one), gather evidence before committing, and dispatch research agents when uncertain rather than guessing. See references/agent-trace.md for the full protocol, dispatching rules, and examples.
|File|What it covers|
|---|---|
|references/format.md|Syntax, node types, nesting rules, examples|
|references/chaining.md|Multi-tree chains: handoffs, chain patterns, carry-forward context|
|references/reasoning-prompts.md|Reasoning prompt format, when to include, examples|
|references/agent-trace.md|Pro/con evaluation protocol, dispatching research agents, trace format|
development
Cross-platform Apple Human Interface Guidelines: color, typography, layout, materials, motion, accessibility, SF Symbols, branding, plus shared UI elements (activity views, rating indicators, web views, …) and meta sections (components, patterns, technologies). Use when the design topic is platform-agnostic. User says: "iOS color tokens", "SF Symbols", "Apple typography", "dark mode guidance".
development
Guides a full system design from idea to spec — sequences requirements gathering, architecture decomposition, data modeling, API design, and document writing into a coherent workflow with clear handoffs. Use when the user asks to "design a system", "build X from scratch", "architect something end-to-end", "plan a new service", or has a broad design ask that spans multiple concerns. Also use when the user says things like "I need to build X" without specifying which aspect to start with. This is the entry point for any design task that isn't clearly scoped to a single skill (data model only, API only, etc.).
development
Synthesizes build-ready design systems and DESIGN.md files from chat briefs, screenshots, moodboards, videos, URLs, live pages, or local image folders while preserving the target product identity. Use when the user asks to "make a design system from these screenshots", "turn this moodboard into DESIGN.md", "extract the design language from this video", "define the UX vibe and rules from these references", or create cohesive UI rules from visual inspiration.
development
Reviews and critiques an existing or proposed system design — flags single points of failure, missing non-functional requirements, scaling bottlenecks, security gaps, operational blind spots, unjustified tech choices, and places where the design will fall over under load or failure. Produces a structured review with severity-tagged findings, not just vibes. Use when the user asks for a second opinion on an architecture, requests a design review, wants feedback on a proposed system, pastes a design doc, or says things like "review this design", "what's wrong with X", "poke holes in this", or "is this a good architecture".