validate-editor-names
БесплатноБез исполняемых скриптовНе проверенFind all hardcoded path-to-editor-name mappings in the CLI (cli/src/analysis.ts::getEditorSourceFromPath) and VS Code extension…
от rajbos★ 127 звёзд на GitHubОб этом скилле
Validate Editor Names Skill
Checks that the CLI and the VS Code extension always agree on editor display names, and that every name has an icon in the webview icon map.
There are three sources of truth that must stay in sync:
| Source | File | Function / symbol |
|---|---|---|
| CLI path detector | cli/src/analysis.ts |
getEditorSourceFromPath |
| VS Code path detector | src/workspaceHelpers.ts |
getEditorTypeFromPath (delegates to detectToolEditorFromPath + detectVSCodeVariantFromPath) |
| Webview icon map | src/editorIcons.ts |
EDITOR_ICON_MAP (the EditorName union type is derived from it in vscode-extension/src/webview/shared/formatUtils.ts) |
The JetBrains plugin (and any future CLI-based consumer) gets its editor names
exclusively from the CLI via CliBridge.kt. If the CLI returns a raw
lowercase key instead of a friendly display name the UI falls back to the raw
key everywhere: chart labels, the session list, the stats command.
What the script checks
- CLI-only coverage — every unique name returned by
getEditorSourceFromPathexists inEDITOR_ICON_MAP. - VS Code-only coverage — every unique name returned by
getEditorTypeFromPathexists inEDITOR_ICON_MAP. - Cross-function consistency — for a canonical set of test paths the CLI and VS Code detectors return identical names. Any mismatch is a bug.
- Ordering invariants — warns if a broad path pattern (e.g.
/.copilot/) appears before a more specific one (e.g./.copilot/jb/) in the CLI function, which would cause the broad check to shadow the specific one.
Usage
# Run all checks and print a human-readable report
node .github/skills/validate-editor-names/validate-editor-names.js
# Machine-readable JSON (for CI / further processing)
node .github/skills/validate-editor-names/validate-editor-names.js --json
# Show help
node .github/skills/validate-editor-names/validate-editor-names.js --help
Options
| Flag | Meaning |
|---|---|
--json |
Emit JSON only (no ANSI colour) |
--help |
Usage |
Exit codes
0— all checks pass1— one or more checks failed (missing icon, name mismatch, ordering issue)2— configuration / environment error (source files not found)
When to run this skill
- After adding a new editor adapter (
src/adapters/) - After modifying
getEditorSourceFromPathorgetEditorTypeFromPath - After updating
EDITOR_ICON_MAPinsrc/editorIcons.ts - When JetBrains (or another CLI-based view) shows raw editor keys instead of friendly names — this skill will pinpoint which path pattern is missing or mismatched
How to fix failures
| Failure type | Likely cause | Fix |
|---|---|---|
| Missing icon for CLI name | New editor added to CLI but not to src/editorIcons.ts |
Add entry to EDITOR_ICON_MAP (the EditorName union follows) |
| Missing icon for VS Code name | New editor added to VS Code adapter but not to src/editorIcons.ts |
Same as above |
| Name mismatch for a test path | CLI returns raw key; VS Code returns friendly name (or vice versa) | Align getEditorSourceFromPath to match getEditorTypeFromPath |
| Ordering issue | Broad includes check appears before specific one in CLI function |
Reorder checks in getEditorSourceFromPath so specific paths come first |
Related files
cli/src/analysis.ts—getEditorSourceFromPath(the CLI implementation)src/workspaceHelpers.ts—getEditorTypeFromPath,detectToolEditorFromPath,detectVSCodeVariantFromPathsrc/editorIcons.ts—EDITOR_ICON_MAP;vscode-extension/src/webview/shared/formatUtils.tsre-exports it and derives theEditorNametypejetbrains-plugin/src/main/kotlin/.../CliBridge.kt— the JetBrains host that calls the CLI binary and feeds the returned editor names straight into the shared webview bundle.github/skills/validate-session-schemas/— validates session file schemas (a complementary skill; run both when adding a new adapter)docs/logFilesSchema/— per-platform schema documentation
Установить validate-editor-names в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл validate-editor-names?
Find all hardcoded path-to-editor-name mappings in the CLI (cli/src/analysis.ts::getEditorSourceFromPath) and VS Code extension (src/workspaceHelpers.ts::getEditorTypeFromPath), verify they return matching friendly display names for the same path patterns, and confirm every CLI-returned name appears in the EDITOR_ICON_MAP in src/editorIcons.ts. Use after adding a new editor adapter, after CLI changes, or if JetBrains/other CLI-based consumers show raw editor keys instead of friendly names.
Как установить скилл validate-editor-names?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл validate-editor-names запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic