skills/lsp-first/SKILL.md
LSP 優先開發策略工具。Use for: (1) 查詢 LSP 操作指令, (2) 配置新語言 LSP 插件, (3) LSP vs MCP 工具選擇決策, (4) 自建 LSP 插件指南。Use when: 需要搜尋符號/定義/引用、想知道 LSP 和 MCP Serena 各自適合什麼場景、新增語言支援需要配置 LSP 時。
npx skillsauth add tarrragon/claude lsp-firstInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
LSP 能解決的問題必須優先使用 LSP
| 優勢 | 說明 | 效益 | |------|------|------| | 效能 | ~50ms vs ~45 秒 | 900x 加速 | | Token 效率 | 結構化資料輸出 | 降低 API 成本 | | 語意精準 | 語言伺服器分析 | 非文字比對 |
詳細效能資料:references/performance-comparison.md
Session 啟動時自動執行 LSP 環境檢查
基本 LSP(所有專案必備)
語言特定 LSP(根據專案類型)
.claude/hooks/lsp-environment-check.py.claude/hooks/lsp-check-config.json.claude/hooks/startup-check-hook.sh (步驟 6.6)| 操作 | 用途 | 使用場景 | |------|------|---------| | goToDefinition | 跳轉符號定義 | 追蹤函式來源、查看類別定義 | | findReferences | 查找所有引用 | 重構前影響分析、變更評估 | | hover | 懸停型別資訊 | 查看 API 文件、確認參數型別 | | documentSymbol | 列出檔案符號 | 快速理解檔案結構 | | workspaceSymbol | 跨檔案搜尋 | 找出類別定義、模糊查詢 | | goToImplementation | 實作查找 | 追蹤抽象類別實作 | | prepareCallHierarchy | 呼叫層級準備 | 準備函式呼叫分析 | | incomingCalls | 呼叫來源 | 找出誰呼叫了這個函式 | | outgoingCalls | 呼叫目標 | 找出這個函式呼叫了誰 |
各操作詳解、範例和 Dart MCP 替代方案:references/lsp-operations.md
搜尋工具的完整選擇決策樹和場景對照表,詳見 /search-tools-guide。
以下為 LSP 專屬的選擇要點:
| 能力 | LSP 操作 | |------|---------| | 呼叫層級分析 | incomingCalls / outgoingCalls | | 介面實作查找 | goToImplementation | | 精確型別推導 | hover(語意級別) |
Dart MCP 和 Serena MCP 的工具列表與使用建議:/search-tools-guide
自 W6-001 引入三 MCP(codebase-memory-mcp / codegraph / serena)後,「Serena 是唯一語意工具」的舊敘事已升級為「三刀流互補」。LSP-first 原則仍為精度錨點,但查詢入口擴展至三 MCP。
| 工具 | 在 LSP-first 流程中的角色 | |------|--------------------------| | LSP / serena | 精度錨點:符號定義、引用追蹤、安全重命名、call hierarchy(型別感知不可替代) | | codebase-memory-mcp | 概念查詢入口:跨檔案語義搜尋、找「處理 X 概念的所有檔案」(BM25 + 向量混合) | | codegraph | 結構查詢入口:caller / callee / impact 圖譜追蹤,跨語言符號關係 |
find_symbolsearch_graph(src/、docs/)或 rg(.claude/)impact + serena find_referencing_symbols 雙重驗證rename_symbol / replace_symbol_body完整三刀流決策樹、九維度對照表、命令速查、cbm 對 .claude/ 不索引的限制:/search-tools-guide(含 references/codebase-memory-tool.md)
自建插件、官方插件市場、跨平台安裝、故障排除:references/lsp-setup-guide.md
/search-tools-guide - 搜尋工具選擇指南(含 Dart MCP、Serena、Grep 完整對照)/startup-check - Session 啟動檢查Last Updated: 2026-03-02 Version: 1.0.0
development
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
development
Claude Code release notes 框架影響評估工具。比對 last-reviewed 版本篩出新版本,逐項分類(對框架有幫助 / 需評估 / 無影響 / 不適用),對採用項引導建 ANA + WRAP + spawn 落地。Use when: 執行 /release-notes 看到新版本、定期檢查 CC 更新、評估新功能對專案框架的影響時。Triggers: release notes, release-notes, CC 更新, claude code 更新, 版本更新評估, 新功能評估, 框架影響評估。
development
Assertion design judgment framework for flaky and design-quality issues. Use when writing tests, reviewing assertions, diagnosing flaky tests, or deciding if a timing/float/cache assertion is appropriate. Do NOT use for API syntax or refactoring.
tools
Chrome Extension 實機測試與 debug 工作流,以 chrome-devtools-mcp 為核心工具。Use when: (1) 完成功能後實機驗證 / manual test / 試看看 / 跑看看 / verify feature, (2) extension debug / popup 不作動 / content script 不注入 / service worker 報錯 / background 出問題, (3) 安裝 unpacked extension / load unpacked / 載入未封裝, (4) 看 console / 看 network / 看 log / view console / inspect requests, (5) 功能更新後重新載入 extension / rebuild reload / reload extension。涵蓋 Manifest V3 service worker / content script / popup / options page 的 chrome-devtools-mcp 工具呼叫流程。不取代 Puppeteer / Playwright 自動化 E2E(CI 用),定位為開發期手動驗證與 LLM-assisted debug。