agentleFS
herrkaeferherrkaefer/herrkaefer-skills/skills/ui-component-selector/SKILL.md

ui-component-selector

Skill0 starsChanged 57 days agoMITView on GitHub

Map plain-language UI requests to candidate interface components using The Component Gallery and the project's existing frontend framework or design system, then recommend a choice or present meaningful alternatives before implementation. Use when a user describes adding or changing an interaction without naming an exact component; do not use for styling-only changes or when the exact component is already unambiguous.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 13 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use all available context:

    line 18
  2. Very specific:

    Read-only project evidence such as dependencies, lockfiles, imports, components.json, Tailwind configuration, and existing component files.

    line 23
  3. Distinctive:

    If no design system is present, retain generic HTML, CSS, and JavaScript candidates.

    line 38
  4. Distinctive:

    Retrieve candidates: Search The Component Gallery for two to five plausible patterns.

    line 40
  5. Distinctive:

    Before implementation, consult the current official documentation because the gallery can be incomplete or stale.

    line 48
  6. Distinctive:

    Decide or ask: If one candidate clearly satisfies the behavior and project constraints, briefly report the choice.

    line 54
  7. Distinctive:

    Keep the decision set small.

    line 73
  8. Distinctive:

    Use the best user-visible capability available.

    line 85
  9. Distinctive:

    Use text-only output only after an actual visual-delivery attempt fails.

    line 97
  10. Distinctive:

    Before finishing or implementing, apply this delivery gate: every fully presented candidate has a user-visible preview or disclosed …

    line 101
  11. Distinctive:

    Treat The Component Gallery as a discovery and comparison source, not the implementation source of truth.

    line 122
  12. Distinctive:

    Do not change code when the user requested only identification, explanation, or evaluation.

    line 124
  13. Distinctive:

    Do not choose solely from popularity, screenshot appearance, or name overlap.

    line 126
  14. Distinctive:

    Do not hide uncertainty. When project detection or retrieval fails, say what could not be verified and present the best grounded fallback.

    line 127

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

UI Component Selector

Translate the user's intended behavior into the right UI pattern without requiring them to know component terminology. Ground recommendations in The Component Gallery, then align them with the components already available in the current project.

Inputs

Use all available context:

  • The user's plain-language description and whether they asked for advice, implementation, or modification of an existing interface.
  • The current UI and trigger location, when modifying an existing interface.
  • Read-only project evidence such as dependencies, lockfiles, imports, components.json, Tailwind configuration, and existing component files.
  • The frontend framework, design system, and already-installed components. Do not introduce a new framework or component library merely to satisfy this workflow.

Workflow

  1. Understand the interaction. Extract the user's goal, trigger, placement, content, modality, selection behavior, and whether the content is informational or actionable. Translate non-English descriptions into several concise English search concepts; do not rely on a literal translation or a single guessed component name.
  2. Inspect the project. Identify the active framework and design system from project evidence. Prefer the project's existing components and conventions. If no design system is present, retain generic HTML, CSS, and JavaScript candidates.
  3. Retrieve candidates. Search The Component Gallery for two to five plausible patterns. Open candidate component pages and use their canonical name, alternate names, description, related components, and Examples as evidence. Examples are reference cards with screenshots and outbound links, not guaranteed live demos.
  4. Align with the project. Within each candidate page, prefer an Example from the detected design system. Otherwise prefer the same framework or technology. Record the Component Gallery page and the linked official component page. Before implementation, consult the current official documentation because the gallery can be incomplete or stale.
  5. Eliminate semantic mismatches. Distinguish components by user purpose, not visual similarity. For example, use Select for choosing a form value, Combobox when the user can type or filter, Dropdown Menu for actions or navigation, and Popover for arbitrary anchored interactive content.
  6. Decide or ask. If one candidate clearly satisfies the behavior and project constraints, briefly report the choice. Continue to implementation only when the user's original request authorized implementation. If two or more candidates remain meaningfully different, present the smallest useful set and wait for the user's choice or ask one question that separates them. Do not pause for cosmetic variants that do not change behavior.
  7. Present the result. Make the result decision-ready. For every candidate, show its canonical name, project-specific component name when available, a short plain-language explanation, the important distinction, and links to the Component Gallery page and official documentation. Actively attempt to show a trustworthy visual preview for every presented candidate and identify the recommended candidate.

Delivery

Deliver the result in the user-visible response. Model-facing evidence is not delivery: opening an image with read, view, a browser, or another inspection tool does not count unless that preview is also surfaced to the user.

Keep the decision set small. Each candidate offered to the user must be one complete unit containing:

  • its canonical and project-specific names, with the recommendation marked;
  • a real preview from the matched Example or official component;
  • a short explanation of the decisive difference;
  • clickable Component Gallery and official component links.

In a Resolved result, fully present the selected candidate and mention rejected patterns briefly. In Needs choice, every selectable candidate must have the complete unit above.

Use the best user-visible capability available; do not require a named product tool. Prefer a native presentation only when it can display the required preview and links. Otherwise embed the freshly resolved image in the final message using the supported format, such as Markdown image syntax, or attach a page screenshot or faithful local render. A text-only choice control may collect the decision after the visual candidates, but it never replaces them.

An empty project is not a reason to skip external previews. Gallery image URLs may be used transiently in the current response but must not be persisted as stable data. When rendering success is observable, verify it; otherwise place a direct image link beside the embed as a fallback.

Use text-only output only after an actual visual-delivery attempt fails. State the failure and retain direct Example and official links. Do not substitute an ASCII or text schematic unless the user asks for one.

Before finishing or implementing, apply this delivery gate: every fully presented candidate has a user-visible preview or disclosed fallback, a Gallery link, and an official link. If not, continue retrieval or repair the response instead of treating the selection as delivered.

Output contract

End component selection in one of these states:

  • Resolved: one component is clearly appropriate. Show its preview when the source provides one, report the evidence, and, if authorized, continue the user's implementation or modification request.
  • Needs choice: two or more candidates remain valid. Recommend one, explain the decisive differences, present visual previews and links, and wait. Use the documented text-only fallback only after visual attempts fail.
  • No match: the gallery or current design system has no suitable component. Say so explicitly and fall back to the current library's official documentation or a standards-based native implementation.

Boundaries

  • Treat The Component Gallery as a discovery and comparison source, not the implementation source of truth.
  • Do not change code when the user requested only identification, explanation, or evaluation.
  • Do not choose solely from popularity, screenshot appearance, or name overlap.
  • Do not hide uncertainty. When project detection or retrieval fails, say what could not be verified and present the best grounded fallback.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.