agentleFS
haxsdhaxsd/haxsd-byok/.agents/skills/model-selection/SKILL.md

model-selection

Skill33 starsChanged 33 days agoMITView on GitHub

Implement and review desktop selection of configured models through the unified grouped ModelSelect component. Use when adding or changing model dropdowns, model filters, Commit model settings, single-model selection, multi-model selection, provider grouping, or configured-model option construction under apps/desktop.

20 other projects use a version of this.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Most recently taken up by

Used with

Projects with it also use architectural-proposals, ci-validation-gates and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Microsoft AzureSkill

    architectural-proposals

    How to write comprehensive architectural proposals that drive alignment before code is written

    Also in 3 projects that use this

  • Microsoft AzureSkill

    ci-validation-gates

    Defensive CI/CD patterns: semver validation, token checks, retry logic, draft detection — earned from v0.8.22

    Also in 3 projects that use this

  • +10 more from Azure

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use one presentation component for every UI that selects from already configured models:

    line 8
  2. Very specific:

    Use ModelSelect when choosing one or more existing configured models.

    line 29
  3. Very specific:

    Do not implement another model dropdown, reuse generic Select, or add a compatibility wrapper for configured-model selection.

    line 30
  4. Very specific:

    Keep ModelSelect presentation-only.

    line 31
  5. Very specific:

    Keep editable model-ID entry in Combobox.

    line 32
  6. Distinctive:

    Delete replaced model-selection components, exports, styles, helpers, and compatibility paths once references are gone.

    line 33
  7. Very specific:

    Commit always uses single mode and includes both configured built-in and configured plugin models.

    line 63
  8. Distinctive:

    Commit settings follow the settings-card edit-state pattern: read mode shows the persisted model, Edit creates a local draft, selection …

    line 64
  9. Distinctive:

    Keep supplier headers and checkbox options inside the virtualized list.

    line 73
  10. Distinctive:

    Keep the trigger's open/focus border visible while the portaled menu owns focus.

    line 76
  11. Distinctive:

    Search the repository for old model-selection components and zero-reference model option helpers.

    line 80
  12. Distinctive:

    Follow the user's validation instruction.

    line 86

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “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

Model Selection

Use one presentation component for every UI that selects from already configured models:

apps/desktop/src/
├── shared/ui/
│   ├── ModelSelect.tsx             # Single/multiple selection behavior and grouped floating menu
│   └── ModelSelect.module.scss     # Trigger, provider headers, checkbox rows, and footer
├── shared/utils/
│   └── modelProvider.ts            # Built-in model provider display name
└── features/
    ├── home/                        # Builds overview multi-select options
    └── settings/                    # Builds Commit single-select options and persists selection

server/src/
├── cursor/services/commit_message.rs # Validates built-in/plugin IDs and creates Commit invocation
├── provider/router.rs                # Routes stable IDs to built-in or plugin providers
└── plugin/registry.rs                # Resolves plugin model IDs and executes plugin streams

Component boundary

  • Use ModelSelect when choosing one or more existing configured models.
  • Do not implement another model dropdown, reuse generic Select, or add a compatibility wrapper for configured-model selection.
  • Keep ModelSelect presentation-only. Pages own model/plugin state, option construction, filtering, and persistence.
  • Keep editable model-ID entry in Combobox; creating or editing a model identifier is input, not configured-model selection.
  • Delete replaced model-selection components, exports, styles, helpers, and compatibility paths once references are gone.

Option contract

Construct every ModelSelectOption with:

  • value: stable persisted/request identifier. Built-in models use model_hash; plugin models use plugin model id.
  • label: user-facing model display name.
  • group: supplier display name.
  • icon/iconSrc: model/provider icon when available.

For built-in models, derive group with modelProviderName(model). It uses the configured group_name first and the API hostname otherwise. For plugin models, use the localized provider display name.

Preserve source order within each supplier. The first occurrence of a supplier determines group order.

Modes

Single owner value: string
    └── <ModelSelect mode="single"> ── choose one ── close ── persist

Multiple owner value: string[]
    └── <ModelSelect mode="multiple"> ── toggle many ── remain open ── apply/filter
  • Both modes render classic checkbox controls in option rows.
  • Single mode allows exactly one checked option and closes immediately after selection.
  • Multiple mode supports toggling, clearing, selecting all, and selecting none.
  • In multiple mode, every supplier header has a checkbox: unchecked means none selected, checked means all selected, and indeterminate means some selected. Toggling it selects or clears that supplier.
  • Indent child model rows relative to their supplier header so hierarchy remains visible.
  • Commit always uses single mode and includes both configured built-in and configured plugin models. Its 直连 option has value "", belongs to the Cursor group, and is the first option.
  • Commit settings follow the settings-card edit-state pattern: read mode shows the persisted model, Edit creates a local draft, selection only changes that draft, Cancel restores the persisted value, and Save persists once before returning to read mode.
  • Persist the stable plugin model id unchanged. Commit generation validates that identifier through PluginRegistry, then lets ProviderRouter dispatch it; do not query the built-in model table for plugin IDs.
  • Overview filtering uses multiple mode.

Floating-menu invariants

Also apply the project floating-ui and frontend skills:

  • Render the menu through a body portal and position it with @floating-ui/dom.
  • Keep supplier headers and checkbox options inside the virtualized list; keep multi-select bulk actions outside it.
  • Close on Escape and outside pointer interaction, then restore trigger focus.
  • Preserve aria-expanded, aria-controls, aria-haspopup, listbox semantics, and multi-select semantics.
  • Keep the trigger's open/focus border visible while the portaled menu owns focus.

Review checklist

  • Search the repository for old model-selection components and zero-reference model option helpers; delete them instead of retaining fallbacks.
  • Confirm all configured-model selectors import shared/ui/ModelSelect.
  • Confirm no feature implements checkbox selection, supplier grouping, portal positioning, or bulk actions independently.
  • Confirm single/multiple value types cannot be mixed.
  • Confirm Commit has 直连 first and cannot select multiple values.
  • Confirm supplier labels are based on supplier identity, not request protocol type.
  • Follow the user's validation instruction; when automated tests are not requested, report manual checks without running test or build commands.

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.