Agent skill

Lit Webview Architecture

by forcedotcom in forcedotcom/salesforcedx-vscode

Design or refactor a Lit webview's package boundary, Effect service contract, host adapter, lifecycle, registration, or browser bundle.

BSD-3-ClauseAuto-check passed

Install Lit Webview Architecture

skills CLI
$ npx skills add forcedotcom/salesforcedx-vscode --skill lit-webview-architecture -a claude-code

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

GitHub CLI
$ gh skill install forcedotcom/salesforcedx-vscode lit-webview-architecture --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/lit-webview-architecture .claude/skills/lit-webview-architecture && 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
lit-webview-architecture
GitHub stars
1k
Token cost
~734 tokens
SKILL.md length
294 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Design or refactor a Lit webview's package boundary, Effect service contract, host adapter, lifecycle, registration, or browser bundle.

  • VS Code webviews that separate browser-safe UI from extension-host APIs and message protocols
  • SKILL.md covers Browser-safe contract, Effect lifecycle and Registration and bundling
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Lit Webview Architecture is an agent skill from forcedotcom/salesforcedx-vscode. Design or refactor a Lit webview's package boundary, Effect service contract, host adapter, lifecycle, registration, or browser bundle. Use for VS Code webviews that separate browser-safe UI from extension-host APIs and message protocols.

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

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

  • VS Code webviews that separate browser-safe UI from extension-host APIs and message protocols

Example prompts

  • “/lit-webview-architecture”

What it can do on your machine

Read from SKILL.md and the folder at commit c8d281a. 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

    No scripts in the folder and no shell commands in SKILL.md.

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

  • Network

    No URLs in SKILL.md.

    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

Lit Webview Architecture loads about 734 tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 294 words of instructions outside code blocks.

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

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 c8d281a, republished under its BSD-3-Clause licence (© forcedotcom). 294 words, ~734 tokens.

Download SKILL.mdSave it as .claude/skills/lit-webview-architecture/SKILL.md (or your agent's skills folder).
name
lit-webview-architecture
description
Design or refactor a Lit webview's package boundary, Effect service contract, host adapter, lifecycle, registration, or browser bundle. Use for VS Code webviews that separate browser-safe UI from extension-host APIs and message protocols.
review
never

Lit webview architecture

Boundary: UI owns presentation, browser-safe state/actions, and lifecycle coordination; host owns VS Code APIs, transport, metadata/network authorities, and localization.

Browser-safe contract

  • Immutable view state, UI actions, and typed errors from Effect Schemas. Tagged/literal unions instead of loose primitives, enums, or duplicated constants when invalid states matter.
  • Directional host-to-UI and UI-to-host message schemas. Handler variant added with its behavior; exhaustive Match; no opposite-direction placeholder arms.
  • Unknown data validated at entry. DOM CustomEvent: structural type/detail guard, then Schema validation of detail; inherited DOM accessors do not form a plain schema struct.
  • Required localized labels injected by the host; no defaults hiding missing localization.
  • No VS Code, JSforce, extension service, or extension-message imports in the browser-safe package. Host data normalized and validated before UI state.
  • Only subpaths with known consumers exported; no root/testing barrels. Type-only dependencies in devDependencies with import type.

Effect lifecycle

  • 1 service contract: initial state, state stream, typed action dispatch. Extension-owned live layer plus deterministic test layers.
  • 1 composition-root-owned scoped fiber per mounted webview: controller, queues, subscriptions, DOM listeners, finalizers.
  • Listeners/subscriptions acquired and released as scoped resources. Disconnect interrupts and awaits the session fiber.
  • Fiber-identity guard on finalizer cleanup; an old disconnect cannot clear a newer rapid reconnection.
  • Components only render state and dispatch intent—no runtimes, scattered Effect.runFork/Effect.runPromise, or host calls.

Registration and bundling

  • Explicit host-called custom-element registration; every customElements.define guarded by customElements.get; no registration import side effects.
  • New entries built with shared browser esbuild config. IIFE retained while HTML loads a classic deferred script; ESM requires matching script/resource-rewrite changes.
  • Non-published UI workspaces marked private and excluded from publication/versioning. Contract tests scan source and bundles for host imports and Effect execution in presentation code.
  • Compile/bundle/test order expressed in Wireit; browser tests consume the intended emitted application.

Examples: packages/soql-builder-ui/src/application.ts, packages/soql-builder-ui/src/register.ts, packages/soql-builder-ui/test/package-contract.test.mjs, packages/salesforcedx-vscode-soql/src/soql-builder-ui/lit/.

© 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/lit-webview-architecture of forcedotcom/salesforcedx-vscode.

Open the folder on GitHubat commit c8d281a

Compare with similar skills

Lit Webview Architecture 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.

Lit Webview Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lit Webview Architecture this skillforcedotcom/salesforcedx-vscode1k—~734Automated safety check: PassBSD-3-Clause
Agent Browser CLIvercel-labs/agent-browser44k24 repos~864Automated safety check: PassApache-2.0
Electron App Automationvercel-labs/agent-browser44k5 repos~1.7kAutomated safety check: PassApache-2.0
Microsoft Skill CreatorMicrosoftDocs/mcp1.9k3 repos~2.1kAutomated safety check: PassCC-BY-4.0
Evals Contextzgsm-ai/costrict4.5k1 repos~1.9kAutomated safety check: PassApache-2.0
Ketch1broseidon/ketch7021 repos~3.9kAutomated safety check: PassMIT

Similar skills

  • Agent Browser CLI

    vercel-labs/agent-browser

    Official

    Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking…

    44k GitHub starsUsed in 24 repos~864 tokens
    Productivity & AutomationAuto-check passed
  • Electron App Automation

    vercel-labs/agent-browser

    Official

    Automates Electron desktop apps such as VS Code, Slack or Discord by connecting agent-browser to their Chrome DevTools Protocol port.

    44k GitHub starsUsed in 5 repos~1.7k tokens
    Productivity & AutomationAuto-check passed
  • Microsoft Skill Creator

    MicrosoftDocs/mcp

    Official

    Create agent skills for Microsoft technologies using official documentation.

    1.9k GitHub starsUsed in 3 repos~2.1k tokens
    Agent WorkflowsAuto-check passed
  • Evals Context

    zgsm-ai/costrict

    Provides context about the CoStrict evals system structure in this monorepo.

    4.5k GitHub starsUsed in 1 repo~1.9k tokens
    AI & LLM EngineeringAuto-check passed
  • Ketch

    1broseidon/ketch

    Research skill for ketch — a fast stateless CLI for web search, OSS code search, curated library docs, page scraping, and site crawling; an optional MCP server exists for operators who want it, but…

    702 GitHub starsUsed in 1 repo~3.9k tokens
    Data & AnalyticsAuto-check passed
  • Make Custom Agent

    dotnet/efcore

    Official

    Create custom GitHub Copilot agents. An agent skill from dotnet/efcore.

    15k GitHub stars~2.5k tokensUpdated today
    Auto-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 Lit Webview Architecture

What does Lit Webview Architecture do?

Design or refactor a Lit webview's package boundary, Effect service contract, host adapter, lifecycle, registration, or browser bundle. Lit Webview Architecture is an agent skill from forcedotcom/salesforcedx-vscode. Design or refactor a Lit webview's package boundary, Effect service contract, host adapter, lifecycle, registration, or browser bundle.

When should I use Lit Webview Architecture?

Lit Webview Architecture fits situations like: VS Code webviews that separate browser-safe UI from extension-host APIs and message protocols.

How do I install Lit Webview Architecture in Claude Code?

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

How do I install Lit Webview Architecture in Codex?

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

Can I use Lit Webview Architecture 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 lit-webview-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lit-webview-architecture, .gemini/skills/lit-webview-architecture, .github/skills/lit-webview-architecture and .opencode/skills/lit-webview-architecture in your project.

What does Lit Webview Architecture need to run?

SKILL.md names no scripts, command-line tools or credentials: Lit Webview Architecture is instructions for the agent only.

Does Lit Webview Architecture access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Lit Webview Architecture 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 Lit Webview Architecture use?

Lit Webview Architecture 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 Lit Webview Architecture use?

About 734 tokens (SKILL.md is roughly 2.9k 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 Lit Webview Architecture?

Skills that share tags, products or a category with Lit Webview Architecture: Agent Browser CLI (vercel-labs/agent-browser, 44k stars), Electron App Automation (vercel-labs/agent-browser, 44k stars), Microsoft Skill Creator (MicrosoftDocs/mcp, 1.9k stars) and Evals Context (zgsm-ai/costrict, 4.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lit Webview Architecture?

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 9, 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.