agentleFS
MicrosoftKnown publishermicrosoft/vscode/.github/skills/context-menus/SKILL.md

context-menus

Skill196k starsChanged 17 days agoMITView on GitHub

Use when adding, changing, or reviewing context menus or menu contributions, including a single new Action2 `menu` entry or MenuRegistry item with `group`/`order`, hand-built `showContextMenu` action lists, submenus, and separators. Covers group order, keeping related actions together, destructive-action placement, consistency across surfaces, and labels.

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

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 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.

  • 6

    Very specific

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

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

    Don't invent groups in menus that use this scheme.

    line 23
  2. Distinctive:

    Inline actions are in the menu too: Every hover or toolbar action of a row or header also appears in its context menu.

    line 32
  3. Very specific:

    Hide what doesn't apply; disable what can't run now: Use when for actions irrelevant to the object and precondition for applicable actions …

    line 34
  4. Very specific:

    Labels: Use Title Case. End with ...

    line 36
  5. Very specific:

    Dynamic actions join their group: When actions must be built in code, merge them into the matching group of the menu's actions instead of …

    line 37
  6. Distinctive:

    Don't place an item by looking at one file.

    line 41
  7. Very specific:

    Write down the resulting menu: groups in render order, items by order, and which when clauses show together.

    line 44
  8. Very specific:

    If the menu has an order snapshot test (search the tests for MenuRegistry.getMenuItems(<MenuId>)), add the new item to it so a later change …

    line 45
  9. Distinctive:

    When you restructure a menu's groups, repeat the search after updating your branch: contributions added in parallel changes still use the …

    line 46

≈ “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

Context menus

A context menu lists the actions for the clicked object in a predictable order, so users find the same action in the same place on every object and surface.

Group order

Groups render in lexicographic order of their ID, with navigation always first. Use these groups, in this order, for new menus and for all Agents window menus:

GroupPurpose
navigationOpen, create, or run the object. The default (double-click or Enter) action comes first.
1_stateChange the object's state, such as mark as read or archive.
2_organizeChange where the object is listed or how it is ordered, such as pin, move up or down, or move into another container.
3_copyCopy information about the object to the clipboard.
4_manageConfigure or edit the object itself. Destructive actions come last.
  • Order items within a group with order (or group@n in package.json) instead of relying on title sorting.
  • Don't invent groups in menus that use this scheme. A custom ID sorts lexicographically among the standard ones, often somewhere unexpected (1_move renders before 1_state), and splits related actions apart. A new group needs a purpose none of the standard groups covers.
  • Established workbench menus with documented groups (editor, Explorer, terminal, editor title) keep their own group IDs. Add to the closest matching group.
  • Group IDs of menus open to extensions are API. When you change one, update every contribution, including extensions/*/package.json.

Rules

  • Related actions stay together. Variants of one operation (Move Up and Move Down, Move to Session... and Move to New Session, Copy Link and Copy Path) share one group with consecutive order values, so they render next to each other. Never split them across groups.
  • Destructive actions last. An action that deletes or removes data is the final item of the menu. Never place it mid-menu.
  • Same object, same menu. An object shown in several places (list row, tab, header, card) offers the same actions in the same order. Reuse one MenuId or the same group IDs rather than building a parallel action list by hand.
  • Inline actions are in the menu too. Every hover or toolbar action of a row or header also appears in its context menu.
  • Only actions for the clicked object. List-wide or unrelated actions belong on the section header, view title, or empty space, not on an item.
  • Hide what doesn't apply; disable what can't run now. Use when for actions irrelevant to the object and precondition for applicable actions that are temporarily unavailable, such as single-item actions during multi-selection.
  • Keep it short. At most about 5 groups and 15 items, with one level of submenus. Use a submenu for 3 or more related targets, and a toggle rather than a submenu for a two-way choice.
  • Labels. Use Title Case. End with ... when the action asks for more input or confirmation. Labels must be unique within a menu.
  • Dynamic actions join their group. When actions must be built in code, merge them into the matching group of the menu's actions instead of appending them after a final separator. Join groups with Separator.join.

Placing an item

Don't place an item by looking at one file. Contributions to one menu are spread across files and layers.

  1. Find every contribution to the menu. Search for its MenuId and every alias of it (such as Menus.X or an exported XMenuId constant) across the repository, including package.json menus.
  2. Write down the resulting menu: groups in render order, items by order, and which when clauses show together. Put the new item next to its related actions, in the group matching its purpose.
  3. If the menu has an order snapshot test (search the tests for MenuRegistry.getMenuItems(<MenuId>)), add the new item to it so a later change can't separate it from its siblings.
  4. When you restructure a menu's groups, repeat the search after updating your branch: contributions added in parallel changes still use the old group IDs.

Based on the VS Code context menu UX guidelines, the Windows menu guidelines, and the Apple context menu guidelines.

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.