sync-host-views
БесплатноБез исполняемых скриптовНе проверенKeep the Visual Studio, JetBrains and desktop-app webview views (screens) in sync with the VS Code views, while preserving the exact set of views each host…
от rajbos★ 127 звёзд на GitHubОб этом скилле
Sync Host Views Skill
The VS Code extension owns all webview "views" (a.k.a. screens). The Visual Studio extension, the JetBrains plugin and the desktop app are thin hosts that load a subset of the same compiled webview bundles inside a WebView2 / JCEF / Electron browser.
No host commits webview content to git any more (see
docs/adr/VS-WEBVIEW-BUNDLE-SOURCING.md): all three copy the bundles fresh from
vscode-extension/dist/webview at build time — Visual Studio via the
.csproj's CopyWebviewBundles MSBuild target, JetBrains via
prepareBundledAssets in build.gradle.kts, the desktop app via
copyStaticAssets in desktop/esbuild.js. So there is nothing left for this
skill to refresh or flag as stale; it only tracks view-LIST drift — which
named bundles each host's build config references — the same way for every
host:
- 🛑 Never silently add a new VS Code view to a host. New views are detected and handed to the user to decide.
- 🔎 Flag views a host references that VS Code no longer builds (orphans).
One view == one screen
Each entry in the VS Code esbuild entryPoints map is exactly one webview bundle
and one user-facing screen. "Add a screen" therefore means "add a bundle to the
host include list and wire up navigation to it" — that is the human decision
this skill protects.
The three sources of truth
| Role | File | Symbol |
|---|---|---|
| Canonical view set (VS Code) | vscode-extension/esbuild.js |
entryPoints keys mapping to src/webview/<name>/main.ts |
| Built artifacts | vscode-extension/dist/webview/<name>.js |
one .js per view (produced by pnpm run package) |
| Visual Studio host list | visualstudio-extension/src/AIEngineeringFluency/AIEngineeringFluency.csproj |
_WebviewBundle Include="…\dist\webview\<name>.js" items (CopyWebviewBundles target) |
| JetBrains host list | jetbrains-plugin/build.gradle.kts |
prepareBundledAssets → from(".../dist/webview") { include("<name>.js", …) } |
| Desktop app host list | desktop/esbuild.js + desktop/src/main.ts |
WEBVIEW_BUNDLES (copied bundles) and PANEL_MENU (tray / Go menu entries) — a view counts as shipped only when it is in both |
Run the script (see below) for the current per-host view counts and coverage — this drifts every time a view is added or a host picks one up. Views a host doesn't ship are intentionally excluded, not missing.
Why nothing is committed for any host
No host commits webview bundle content to git. Each copies the compiled
bundles fresh from vscode-extension/dist/webview at its own build time:
- Visual Studio does it via the
CopyWebviewBundlesMSBuild target inAIEngineeringFluency.csproj(BeforeTargets="Build"), and the CI/local build scripts (visualstudio-build.yml,visualstudio-publish.yml,release.yml,build.ps1) additionally do a wholesale directory copy before MSBuild runs. - JetBrains does it via
prepareBundledAssetsinbuild.gradle.kts. - Desktop app does it via
copyStaticAssetsindesktop/esbuild.js, which copies eachWEBVIEW_BUNDLESentry intodesktop/dist/webview. On its own it builds the extension bundles only when they are missing, so the CI and local build paths (desktop-build.yml,desktop-publish.yml,build.ps1 -Project desktop) rebuild them first — in production mode for anything that is packaged.
This used to differ — Visual Studio committed its copies to the repo as a
"possibly stale" fallback, which drifted out of sync in practice (see
docs/adr/VS-WEBVIEW-BUNDLE-SOURCING.md). That fallback has been removed:
every host now works exactly like JetBrains always did, so there is nothing left
for this skill to refresh or check for staleness — only the hosts'
include lists (which named views each ships) can still drift from the
canonical VS Code set, and that's all this script tracks.
What the script reports
sync-host-views.js classifies, per host, every canonical view as:
- tracked — the host's build config lists this view.
- NEW — VS Code builds it but the host does not list it. Requires a human
decision; the script exits
3. - ORPHAN — the host lists a view VS Code no longer builds. Mechanical drift;
the script exits
1.
For the desktop app it also reports half-wired views, both exit 1:
UNREACHABLE (in WEBVIEW_BUNDLES but not PANEL_MENU — copied, but no menu
opens it) and UNBUNDLED (in PANEL_MENU but not WEBVIEW_BUNDLES — the menu
opens a blank page).
Usage
# Detect drift and new screens (read-only). Run from the repo root.
node .github/skills/sync-host-views/sync-host-views.js
# Machine-readable output (CI / further processing).
node .github/skills/sync-host-views/sync-host-views.js --json
# Help.
node .github/skills/sync-host-views/sync-host-views.js --help
Build the bundles first if dist/webview is empty (only affects the informational
`dist/webview buil
Установить sync-host-views в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sync-host-views?
Keep the Visual Studio, JetBrains and desktop-app webview views (screens) in sync with the VS Code views, while preserving the exact set of views each host ships. Detects views added to the VS Code extension (vscode-extension/esbuild.js entryPoints) that the Visual Studio host (AIEngineeringFluency.csproj), JetBrains host (jetbrains-plugin/build.gradle.kts) or desktop app (desktop/esbuild.js WEBVIEW_BUNDLES + desktop/src/main.ts PANEL_MENU) do not yet ship, and surfaces them for a human decision instead of auto-adding. Use after building/updating the VS Code webviews, before a Visual Studio, JetBrains or desktop release, or whenever a host is missing a screen VS Code now has.
Как установить скилл sync-host-views?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sync-host-views запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic