Agent skill

Vscode Window Messages

by forcedotcom in forcedotcom/salesforcedx-vscode

Guidelines for using vscode.window.showMessage methods. An agent skill from forcedotcom/salesforcedx-vscode.

BSD-3-ClauseAuto-check passedFrontend & Design

Install Vscode Window Messages

skills CLI
$ npx skills add forcedotcom/salesforcedx-vscode --skill vscode-window-messages -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install forcedotcom/salesforcedx-vscode vscode-window-messages --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/forcedotcom/salesforcedx-vscode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/vscode-window-messages .claude/skills/vscode-window-messages && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vscode-window-messages
GitHub stars
1k
Token cost
~2.1k tokens
SKILL.md length
359 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Guidelines for using vscode.window.showMessage methods. An agent skill from forcedotcom/salesforcedx-vscode.

  • Works in 2 steps: Add key/value to i18n.ts in package → Use nls.localize('your_message_key',…
  • Working with showInformationMessage
  • SKILL.md covers Quick Reference: Critical Rules, Use Direct vscode.window Calls, Internationalization with… and Handling Return Values, plus 5 more sections
  • Calls npm

What it does

Vscode Window Messages is an agent skill from forcedotcom/salesforcedx-vscode. Guidelines for using vscode.window.showMessage methods. Use when working with showInformationMessage, showWarningMessage, showErrorMessage.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design. It works with Visual Studio Code. The repository describes itself as: Salesforce Extensions for VS Code. The licence is BSD-3-Clause.

When your agent uses it

  • Working with showInformationMessage
  • ShowWarningMessage
  • ShowErrorMessage

Example prompts

  • “Use the vscode-window-messages skill to guideline for using vscode.window.showMessage methods. An agent skill from forcedotcom/salesforcedx-vscode”
  • “/vscode-window-messages”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Add key/value to i18n.ts in package
  2. Use nls.localize('your_message_key', ...args)

What it can do on your machine

Read from SKILL.md and the folder at commit f7bb6fe. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Vscode Window Messages loads about 2.1k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 359 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from forcedotcom/salesforcedx-vscode at commit f7bb6fe, republished under its BSD-3-Clause licence (© forcedotcom). 359 words, ~2,083 tokens.

Download SKILL.mdSave it as .claude/skills/vscode-window-messages/SKILL.md (or your agent's skills folder).
name
vscode-window-messages
description
Guidelines for using vscode.window.show*Message methods. Use when working with showInformationMessage, showWarningMessage, showErrorMessage.
review
always
version
1.1.0

VSCode Window Messages Best Practices

Quick Reference: Critical Rules

CategoryDODON'T
APIDirect vscode.window.show*MessageLegacy NotificationService
Messagesnls.localize('key', ...args)String literals or template literals without nls
Return ValuesHandle Thenable<string | undefined> or Thenable<MessageItem | undefined>Ignore return values
Button ActionsCheck return value for button clicksAssume user always clicks
Button Actionsnls.localizeString literals or template literals without nls
Modal Options{ modal: true, detail: ... } for blocking dialogsdetail without modal: true (detail modal-only); explicit 'Cancel' buttons (VS Code adds one automatically)
Effect (wait)Effect.promise() when response neededEffect.promise() for fire-and-forget
Effect (no wait)Effect.sync() for fire-and-forgetEffect.promise() when not waiting

Use Direct vscode.window Calls

Use vscode.window.show*Message directly. Don't use legacy NotificationService in new code.

typescript
import * as vscode from 'vscode';
import { nls } from '../messages/messages';

// CORRECT
await vscode.window.showInformationMessage(nls.localize('retrieve_canceled'));
await vscode.window.showErrorMessage(nls.localize('retrieve_failed', String(error)));

// WRONG
await notificationService.showInformationMessage(nls.localize('retrieve_canceled'));

Internationalization with nls.localize()

All message strings and button labels must use nls.localize(). Enforced by no-vscode-message-literals ESLint rule.

Button labels should use nls.localize() even for command titles. Importing package.nls.json directly strips locale context—only manifest %key% reads locale-specific JSON files. Use nls.localize() to preserve Japanese and other locales via i18n.ja.ts.

typescript
// CORRECT
await vscode.window.showInformationMessage(nls.localize('retrieve_canceled'));
await vscode.window.showErrorMessage(nls.localize('retrieve_failed', String(error)));
await vscode.window.showInformationMessage(`${nls.localize('prefix')} ${nls.localize('suffix')}`);

const answer = await vscode.window.showWarningMessage(
  nls.localize('confirm_delete'),
  nls.localize('yes_button'),
  nls.localize('no_button')
);

// WRONG
await vscode.window.showInformationMessage('Operation successful');
await vscode.window.showInformationMessage(`Operation ${status} successful`);
await vscode.window.showWarningMessage(nls.localize('confirm_delete'), 'Yes', 'No');

Adding new messages:

  1. Add key/value to i18n.ts in package
  2. Use nls.localize('your_message_key', ...args)

Handling Return Values

Returns clicked button or undefined if dismissed.

Return types:

  • String buttons: Thenable<string | undefined>
  • MessageItem buttons: Thenable<MessageItem | undefined>
typescript
// CORRECT - String buttons
const selection = await vscode.window.showWarningMessage(
  nls.localize('unsaved_changes'),
  nls.localize('save_button'),
  nls.localize('discard_button')
);

if (selection === nls.localize('save_button')) {
  await saveFile();
}

// CORRECT - MessageItem buttons
const item = await vscode.window.showWarningMessage(
  nls.localize('unsaved_changes'),
  { modal: true },
  { title: nls.localize('save_button') },
  { title: nls.localize('discard_button') }
);

if (item?.title === nls.localize('save_button')) {
  await saveFile();
}

// CORRECT - Fire and forget
void vscode.window.showInformationMessage(nls.localize('operation_completed'));

// WRONG
vscode.window.showInformationMessage(nls.localize('operation_completed')); // Missing void

Integration with Effect

When User Response is Required

Use Effect.promise() to wait for user response. Blocks execution until user responds.

typescript
import { Effect } from 'effect';

// CORRECT - Wait for response
const selection =
  yield *
  Effect.promise(() =>
    vscode.window.showWarningMessage(nls.localize('confirm_action'), nls.localize('yes'), nls.localize('no'))
  );

if (selection === nls.localize('yes')) {
  yield * performAction();
}

// CORRECT - Wait for error acknowledgment
yield * Effect.promise(() => vscode.window.showErrorMessage(nls.localize('critical_error')));
Show full SKILL.md (142 more words)Show less
When User Response is NOT Required (Fire-and-Forget)

Use Effect.sync() for non-blocking messages. Execution continues immediately.

typescript
import { Effect } from 'effect';

// CORRECT - Fire and forget
yield *
  Effect.sync(() => {
    void vscode.window.showInformationMessage(nls.localize('background_task_started'));
  });

yield * performBackgroundTask();

// WRONG - Blocks unnecessarily
yield * Effect.promise(() => vscode.window.showInformationMessage(nls.localize('background_task_started')));

// WRONG - Direct call in Effect.gen
yield *
  Effect.gen(function* () {
    await vscode.window.showErrorMessage('Error'); // Type error
  });

Message Types

  • showInformationMessage: Success, info, non-critical
  • showWarningMessage: Warnings, recoverable errors, user decisions
  • showErrorMessage: Errors, failures, critical issues
typescript
await vscode.window.showInformationMessage(nls.localize('retrieve_completed'));
await vscode.window.showWarningMessage(nls.localize('unsaved_changes'));
await vscode.window.showErrorMessage(nls.localize('retrieve_failed', errorMessage));

// Modal with detail (detail only shown for modal)
await vscode.window.showWarningMessage(
  nls.localize('destructive_action_warning'),
  { modal: true, detail: nls.localize('destructive_action_detail') },
  nls.localize('confirm')
);

Note: VS Code automatically adds a 'Cancel' button to modal dialogs. Do not add an explicit nls.localize('cancel_button') as an item when modal: true. Dismissing the dialog (via 'Cancel' or ESC) returns undefined.

MessageOptions and MessageItem

MessageOptions
  • modal?: boolean - System modal dialog, blocks interaction
  • detail?: string - Extra text (modal only)
Button Types

Strings or MessageItem objects:

typescript
// String buttons (prefer)
const result = await vscode.window.showWarningMessage(
  nls.localize('confirm_action'),
  nls.localize('yes'),
  nls.localize('no')
);
// result: string | undefined

// MessageItem (for modal ESC handling)
const result = await vscode.window.showWarningMessage(
  nls.localize('confirm_action'),
  { modal: true },
  { title: nls.localize('yes'), isCloseAffordance: false },
  { title: nls.localize('no'), isCloseAffordance: true }
);
// result: MessageItem | undefined

isCloseAffordance: true = button handles ESC. Modal-only. Modals auto-add Cancel; use this to control which custom button handles ESC.

Common Patterns

Conditional Messages
typescript
// Fire-and-forget
if (hasErrors) {
  void vscode.window.showErrorMessage(nls.localize('operation_completed_with_errors'));
} else {
  void vscode.window.showInformationMessage(nls.localize('operation_completed_successfully'));
}
User Confirmation (Requires Response)
typescript
import { Effect } from 'effect';

const confirm =
  yield *
  Effect.promise(() =>
    vscode.window.showWarningMessage(
      nls.localize('confirm_destructive_action'),
      nls.localize('proceed_button')
    )
  );

if (confirm === nls.localize('proceed_button')) {
  yield * performDestructiveAction();
}

ESLint Rule

no-vscode-message-literals enforces:

  • No string literals as first argument
  • No template literals unless they contain nls.localize() calls
  • Applies to showInformationMessage, showWarningMessage, showErrorMessage

Run npm run lint before committing.

© forcedotcom, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/vscode-window-messages of forcedotcom/salesforcedx-vscode.

Open the folder on GitHubat commit f7bb6fe

Compare with similar skills

Vscode Window Messages next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vscode Window Messages compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vscode Window Messages this skillforcedotcom/salesforcedx-vscode1k—~2.1kAutomated safety check: PassBSD-3-Clause
RayRailly/tinte624—~712Automated safety check: PassMIT
TinteRailly/tinte624—~1.6kAutomated safety check: PassMIT
Pierre Theme Packagepierrecomputer/pierre6.2k—~352Automated safety check: PassApache-2.0
Tinte LandingRailly/tinte624—~3.9kAutomated safety check: PassMIT
Accessibility Aria Expertmicrosoft/vscode-cosmosdb200—~3.2kAutomated safety check: PassMIT

Similar skills

  • Ray

    Railly/tinte

    Generate code screenshots via ray.tinte.dev API. An agent skill from Railly/tinte.

    624 GitHub stars~712 tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Tinte

    Railly/tinte

    Agent-native design system infrastructure. An agent skill from Railly/tinte.

    624 GitHub stars~1.6k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Pierre Theme Package

    pierrecomputer/pierre

    Shows an agent how to install and use the @pierre/theme package, which ships ten Pierre light and dark color themes for Shiki and VS Code.

    6.2k GitHub stars~352 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Tinte Landing

    Railly/tinte

    Design or substantially improve a landing page for tinte. An agent skill from Railly/tinte.

    624 GitHub stars~3.9k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Accessibility Aria Expert

    microsoft/vscode-cosmosdb

    Official

    Detects and fixes accessibility issues in React/Fluent UI webviews.

    200 GitHub stars~3.2k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Cross Platform Webview UI

    skymecode/deepseek-harness-for-vscode

    深色/浅色主题下 DeepSeek Harness for VS Code 原生工作台 webview 前端的跨平台(Windows / macOS)样式与功能一致性规范。当修改 media/chat.css、media/chat-responsive.css、src/webview/chat/.ts、src/webview/composer-configuration/.ts 或…

    154 GitHub stars~1.6k tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed

More from forcedotcom/salesforcedx-vscode

All 37 skills in this repo
  • Command UI

    forcedotcom/salesforcedx-vscode

    Command palette, CodeLens, context menus, package.nls titles, and NotificationModeService.

    1k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Services Extension Consumption

    forcedotcom/salesforcedx-vscode

    Consume the salesforcedx-vscode-services extension API. An agent skill from forcedotcom/salesforcedx-vscode.

    1k GitHub stars~5k tokensUpdated today
    Auto-check passed
  • Changelog

    forcedotcom/salesforcedx-vscode

    Polish the automated CHANGELOG on develop before the next stable build.

    1k GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Core Extension API

    forcedotcom/salesforcedx-vscode

    Public API exported by salesforcedx-vscode-core activate(). An agent skill from forcedotcom/salesforcedx-vscode.

    1k GitHub stars~842 tokensUpdated today
    Auto-check passed
  • Drivable Vscode

    forcedotcom/salesforcedx-vscode

    Operate a real VS Code instance through drivable-vscode. An agent skill from forcedotcom/salesforcedx-vscode.

    1k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Effect Best Practices

    forcedotcom/salesforcedx-vscode

    Enforces Effect-TS patterns for services, errors, layers, atoms, and Effect.pipe composition.

    1k GitHub stars~6.2k tokensUpdated today
    Auto-check passed

Questions about Vscode Window Messages

What does Vscode Window Messages do?

Guidelines for using vscode.window.showMessage methods. An agent skill from forcedotcom/salesforcedx-vscode. Vscode Window Messages is an agent skill from forcedotcom/salesforcedx-vscode.showMessage methods.

When should I use Vscode Window Messages?

Vscode Window Messages fits situations like: working with showInformationMessage; showWarningMessage; showErrorMessage.

How do I install Vscode Window Messages in Claude Code?

Run `npx skills add forcedotcom/salesforcedx-vscode --skill vscode-window-messages -a claude-code`. Or copy the skill folder (.claude/skills/vscode-window-messages in forcedotcom/salesforcedx-vscode) into .claude/skills/vscode-window-messages in your project. Claude Code loads it when a task matches its description.

How do I install Vscode Window Messages in Codex?

Run `npx skills add forcedotcom/salesforcedx-vscode --skill vscode-window-messages -a codex`. Or copy the skill folder (.claude/skills/vscode-window-messages in forcedotcom/salesforcedx-vscode) into .agents/skills/vscode-window-messages in your project. Codex loads it when a task matches its description.

Can I use Vscode Window Messages in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add forcedotcom/salesforcedx-vscode --skill vscode-window-messages -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vscode-window-messages, .gemini/skills/vscode-window-messages, .github/skills/vscode-window-messages and .opencode/skills/vscode-window-messages in your project.

What does Vscode Window Messages need to run?

Going by SKILL.md and its folder, Vscode Window Messages needs the command-line tools its instructions call (npm).

Does Vscode Window Messages access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Vscode Window Messages safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vscode Window Messages use?

Vscode Window Messages is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vscode Window Messages use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Vscode Window Messages?

Skills that share tags, products or a category with Vscode Window Messages: Ray (Railly/tinte, 624 stars), Tinte (Railly/tinte, 624 stars), Pierre Theme Package (pierrecomputer/pierre, 6.2k stars) and Tinte Landing (Railly/tinte, 624 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vscode Window Messages?

forcedotcom (a GitHub organization) maintains it in forcedotcom/salesforcedx-vscode, which has 1,035 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on October 7, 2026.

Source: forcedotcom/salesforcedx-vscode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.