frontend-component-decision-trees
Skill4 starsChanged 7 months agoMITView on GitHub
Use this skill whenever the user needs to choose the correct UI component for forms, notifications, errors, loading, buttons, overflow, onboarding, or design system contributions. Always start with the Main Entry Point dispatcher to select the right tree, then follow the exact branching logic. This skill prevents ad-hoc component choices by enforcing production design system decision trees.
In this repository124 other files it gives its agents.
- apple-contactsSkill
- atlassian-cli-jiraSkill
- bellardSkill
- brainstormingSkill
- career-interviewSkill
- carmackSkill
- cavecrewSkill
- caveman-commitSkill
- caveman-compressSkill
- caveman-helpSkill
- caveman-reviewSkill
- cavemanSkill
- caveman-statsSkill
- ci-watchSkill
- clone-configSkill
- cloudflare-emailSkill
- course-correctSkill
- datastar-patternsSkill
- datastarSkill
- datastar-taoSkill
- defuddleSkill
- description-linterSkill
- deterministic-simulation-testingSkill
- dispatching-parallel-agentsSkill
- dopplerSkill
- dx-auditSkill
- evolution-changelogSkill
- evolution-engineSkill
- executing-plansSkill
- farleySkill
- finishing-a-bones-leafSkill
- gh-project-charterSkill
- gh-project-operationsSkill
- gh-project-setupSkill
- gh-project-sharedSkill
- goal-completeSkill
- golang-patternsSkill
- hellandSkill
- hickeySkill
- hippSkill
- investigating-agent-sessionsSkill
- landingSkill
- linear-cliSkill
- linear-methodSkill
- memorizeSkill
- midscene-testingSkill
- monitoring-the-operatorSkill
- normanSkill
- obsidian-basesSkill
- obsidian-canvasSkill
- obsidian-markdownSkill
- orchestrator-modeSkill
- orchestrator-suitSkill
- ousterhoutSkill
- pikchr-generatorSkill
- pocock-cavemanSkill
- pocock-diagnoseSkill
- pocock-git-guardrailsSkill
- pocock-handoffSkill
- pocock-setup-pre-commitSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
If multiple apply, start with the most specific primary reference.
- Distinctive: line 50
Read only the relevant reference file(s).
- Distinctive: line 58
Ask at most one clarifying question if context is ambiguous.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Component Decision Trees
When to Use This Skill (Trigger Conditions)
- User asks "what component should I use for...", "which UI pattern for X", "form control recommendation", "notification vs toast vs banner", "loading state choice", "button vs link", "how to handle overflow/truncation", "onboarding pattern", or "should we add this to the design system?"
- Any frontend architecture, component library design, design review, or spec writing task involving UI element selection.
- The conversation is about making a repeatable, defensible choice rather than a one-off visual preference.
Do NOT use for pure visual polish, copywriting, icon selection, or non-component decisions.
Main Entry Point — Scenario to Tree Dispatcher
Always run this dispatcher first. Identify the scenario, then jump to the matching reference file in references/.
| User Scenario | Primary Reference | Key Questions to Ask |
| Form inputs (radio, checkbox, dropdown, switch, toggle) | references/form-components.md | Multi-select? Short vs long labels? Filtering? |
| Notifications / feedback (toast, banner, modal, dialog, push) | references/notifications.md | System or user generated? Passive or actionable? Attention level? |
| Errors, alerts, validation, empty states | references/errors-alerts.md | Critical error or warning? Element, page, or global? |
| Loading / waiting states | references/loading.md | Duration? Predictable content? Progress trackable? |
| Buttons, CTAs, alignment, grouping | references/calls-to-action.md | Emphasis level? Alignment needs? Number of actions? |
| Truncation, overflow, "show more", scroll | references/truncation-overflow.md | Primary or secondary info? Fixed container? |
| Onboarding / feature discovery | references/onboarding.md | Interrupt, subtle show, or contextual discovery? |
| Adding new component/pattern to DS | references/design-system-contribution.md | Ready to share? Multi-product? Maintainers agree? |
Quick Start Questions (ask these to route):
- Form control choice? → form-components.md
- Status / error / feedback messaging? → notifications.md or errors-alerts.md
- Waiting for content? → loading.md
- Action button or link? → calls-to-action.md
- Content hidden or overflowing? → truncation-overflow.md
- Guiding user through feature? → onboarding.md
- Design system governance? → design-system-contribution.md
If multiple apply, start with the most specific primary reference.
How to Use the References
Each file in references/ contains:
- The full decision tree with root questions and branches
- "When to Use" and "When to Use Something Else" guidance
- Accessibility rules and anti-patterns
- Concrete examples and tables from the source design systems
- Output contract for that tree
Read only the relevant reference file(s). Do not load all of them into context at once.
Output Requirements (Every Time)
- State the exact component chosen.
- Quote the root question and the branch taken.
- One-sentence rationale.
- 1–2 rejected alternatives with the branch that would have selected them.
- Cite the reference file used.
- Ask at most one clarifying question if context is ambiguous.
This structure guarantees repeatable, source-backed decisions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

