agentleFS
MicrosoftKnown publishermicrosoft/vscode/.github/skills/hover/SKILL.md

hover

Skill196k starsChanged 17 days agoMITView on GitHub

Use when adding, changing, or reviewing hovers or tooltips on VS Code widgets and UI elements, including buttons, actions, toolbars, lists, and trees. Covers custom versus native tooltips, hoverDelegate placement, HoverStyle, pointers, IHoverService delayed hovers, groupId, and shared instant-hover behavior across adjacent widgets.

Trending

More talk lately.about the whole repository

Dec 2025: 2 mentionsJan 2026: 1 mentionFeb 2026: 1 mentionMar 2026: 1 mentionApr 2026: 2 mentionsMay 2026: 4 mentionsJun 2026: 2 mentionsJul 2026: 2 mentionsAug 2026: 0 mentionsSep 2026: 3 mentionsOct 2026: 1 mentionNov 2026: 2 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/vscode repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/vscode

The biggest 5 of 96 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 96

Talked about on Bluesky, Hacker News and GitHub (96 times).

On Bluesky · 48

43 more on Bluesky

On Hacker News · 39

34 more on Hacker News

On GitHub · 9

4 more on GitHub

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep hovers Calm on first entry and Consistent while moving between related controls: the first hover waits for workbench.hover.delay, then …

    line 8
  2. Very specific:

    Use the widget's hover API or IHoverService, not native browser tooltips via element.title or setAttribute('title', ...).

    line 12
  3. Distinctive:

    Keep native tooltips a narrow exception for controls inside an existing custom hover/context view when opening another custom hover would …

    line 14
  4. Distinctive:

    Do not turn an entire feature native to solve one nested control's problem.

    line 15
  5. Distinctive:

    Read the target widget and its surrounding component before wiring a hover.

    line 35
  6. Very specific:

    Prefer setupDelayedHover / setupDelayedHoverAtMouse for new direct registrations.

    line 43
  7. Very specific:

    Do not use unconditional showInstantHover, a zero delay, a custom timer, or reducedDelay as a substitute for grouping.

    line 47
  8. Distinctive:

    Create one createInstantHoverDelegate() at the common owner and pass the same instance to every related widget:

    line 55
  9. Very specific:

    If constructing WorkbenchHoverDelegate for feature-specific overrides, enable { instantHover: true } for an element-placement group and …

    line 72
  10. Distinctive:

    Use a per-instance UUID when independent instances must stay separate.

    line 94
  11. Very specific:

    Do not use one generic global ID for unrelated controls, or a new ID for each item.

    line 95
  12. Distinctive:

    Use localized tooltip text.

    line 114
  13. Very specific:

    Keep rich hover content and its links/actions reachable.

    line 116

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

Hovers and tooltips

Keep hovers Calm on first entry and Consistent while moving between related controls: the first hover waits for workbench.hover.delay, then nearby, similar targets show their hovers immediately while the hover interaction remains active. Widget boundaries must not introduce another delay.

Use custom hovers by default

  • Use the widget's hover API or IHoverService, not native browser tooltips via element.title or setAttribute('title', ...). Remove conflicting HTML title attributes when introducing a custom hover.
  • A widget's title or tooltip option can still be correct when the widget routes it through the custom-hover machinery. Inspect the implementation rather than banning properties by name.
  • Keep native tooltips a narrow exception for controls inside an existing custom hover/context view when opening another custom hover would interfere with the parent. Pass nativeHoverDelegate through the widget's supported hoverDelegate option instead of hand-writing title attributes.
  • Do not turn an entire feature native to solve one nested control's problem. The current HoverService supports limited nested hovers, so nesting is not universally impossible; check the actual parent/context-view interaction before choosing this exception.

Choose placement and pointer together

Here, pointer means the small arrow connecting the hover to its target, not the mouse cursor.

TargetPlacementPointer
Small buttons, toolbar actions, icon actions, and other small clickable targetsElement-anchoredAlways
Ordinary list/tree items with simple text tooltipsMouse-anchoredNever
List/tree items with rich, information-heavy hoversElement-anchored, to the left or right of the rowAlways
Other UI elementsNormally element-anchoredAlways when element-anchored
  • For delayed element hovers, use setupDelayedHover with style: HoverStyle.Pointer, or explicitly set appearance.showPointer: true. Bare setupDelayedHover does not automatically add a pointer. HoverStyle.Pointer also defaults to compact styling; use explicit appearance options when that is not appropriate for rich content.
  • For mouse placement, use setupDelayedHoverAtMouse, normally with style: HoverStyle.Mouse. Never request a pointer. This API excludes position and pointer overrides from its public options; it positions relative to the mouse.
  • For rich row hovers, set position.hoverPosition to HoverPosition.LEFT or HoverPosition.RIGHT so the hover does not cover neighboring rows. Preserve normal viewport-aware fallback unless the feature specifically requires forced positioning.
  • For delegate-based widgets, use placement: 'element' with a pointer, or placement: 'mouse' without one. The managed-hover path derives the pointer from the delegate's placement; preserve this pairing in custom delegates and overrides too.

Choose the API the widget supports

Read the target widget and its surrounding component before wiring a hover.

SurfaceAPI
Existing widgets accepting hoverDelegate, such as buttons, action items, action bars, and toolbarsPass a shared instant-enabled IHoverDelegate
New direct hover registrations, or widgets accepting hoverLifecycleOptionsUse delayed hovers with a shared lifecycle groupId
A feature already owns the triggering events and needs to control showing the hoverUse showDelayedHover(options, { groupId }) and own the returned hover's lifecycle

Prefer setupDelayedHover / setupDelayedHoverAtMouse for new direct registrations. setupManagedHover is deprecated, but existing widgets still use it internally through hoverDelegate; do not bypass their supported API or rewrite them unnecessarily.

Inject IHoverService through the constructor where available. In vs/base, where importing platform services would violate layering, use getBaseLayerHoverDelegate() for direct registrations, or accept a delegate/lifecycle option from the caller.

Do not use unconditional showInstantHover, a zero delay, a custom timer, or reducedDelay as a substitute for grouping. The first ordinary pointer-triggered hover must still respect the configured workbench delay.

Share instant-hover state across the visual group

Choose the boundary by what the user sees, not by class ownership. Two toolbars next to each other with similar-looking actions form one hover group, even though they are separate widget instances. Likewise, adjacent individually rendered action items should share state.

Delegate-based widgets

Create one createInstantHoverDelegate() at the common owner and pass the same instance to every related widget:

const hoverDelegate = this._register(createInstantHoverDelegate());

const primaryToolbar = this._register(this.instantiationService.createInstance(
	WorkbenchToolBar, primaryContainer, { hoverDelegate }
));
const secondaryToolbar = this._register(this.instantiationService.createInstance(
	WorkbenchToolBar, secondaryContainer, { hoverDelegate }
));
  • The factory creates an element-placement, instant-enabled delegate. The initial hover uses the workbench delay; subsequent hovers using that instance can skip the delay during its short recently-hidden grace window.
  • getDefaultHoverDelegate('element') gives element placement but does not enable instant hover.
  • ToolBar and ActionBar create their own instant delegate when none is supplied. That groups items within each widget, not across two neighboring widgets. Explicitly supply the common delegate to connect them.
  • Forward the incoming action-view-item options in custom actionViewItemProvider implementations, especially hoverDelegate. Pass the same delegate to separately constructed action items and buttons too. Creating a delegate per item, per toolbar, or inside the provider breaks the shared behavior.
  • If constructing WorkbenchHoverDelegate for feature-specific overrides, enable { instantHover: true } for an element-placement group and share that instance. Do not accidentally disable the pointer through appearance overrides.

Delayed hovers

Choose one stable groupId for related targets and pass it in the lifecycle options, not the hover's content/appearance options:

const hoverLifecycleOptions: IHoverLifecycleOptions = { groupId: generateUuid() };

store.add(hoverService.setupDelayedHover(firstTarget, {
	content: firstTooltip,
	style: HoverStyle.Pointer
}, hoverLifecycleOptions));
store.add(hoverService.setupDelayedHover(secondTarget, {
	content: secondTooltip,
	style: HoverStyle.Pointer
}, hoverLifecycleOptions));

Here store owns this rendered surface and the tooltip strings are already localized. Create the group once for that surface, not inside each registration or options factory. Pass it into adjacent child widgets that expose hoverLifecycleOptions.

  • A delayed hover skips the delay when a currently visible hover belongs to the same group. Unlike the delegate path, this is not a shared recently-hidden timer.
  • Use a per-instance UUID when independent instances must stay separate. A feature-specific string is appropriate only when all uses intentionally belong to the same group.
  • Do not use one generic global ID for unrelated controls, or a new ID for each item. Do not confuse groupId with IHoverOptions.id, which controls hover equality, not grouping.
  • The delegate and delayed-hover mechanisms are separate. A groupId does not connect to an IHoverDelegate's state. When a visual group spans both APIs, inspect the widgets' supported extension points and align the group deliberately; do not assume the two mechanisms automatically coordinate.

For rich list rows, keep the row's group separate from dissimilar inline actions and combine it with side placement:

store.add(hoverService.setupDelayedHover(rowElement, {
	content: richContent,
	appearance: { showPointer: true },
	position: { hoverPosition: HoverPosition.RIGHT }
}, rowHoverLifecycleOptions));

Reuse rowHoverLifecycleOptions across the related rows; it contains their stable groupId.

Ownership and accessibility

  • Register a newly created scoped delegate immediately with its owner's disposable store. A delegate supplied by a parent is borrowed; the parent owns its disposal.
  • Register delayed-hover listeners and manually shown hover widgets with the appropriate component, template, or render store. Repeated rendering must not accumulate registrations on a long-lived store. Keep the delegate/group stable for the intended interaction lifetime.
  • Use localized tooltip text. Preserve accessible names, keyboard activation, focus restoration, and Escape dismissal; a tooltip is not a substitute for an accessible label.
  • For delayed hovers, setupKeyboardEvents: true adds Enter/Space handling to show and focus the hover. Use it only when those keys are not already owned by the target's action or navigation behavior.
  • Keep rich hover content and its links/actions reachable. Do not force hideOnHover: true on content the user must interact with. Follow the accessibility skill for the surrounding feature.

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.