一键导入
lsp-validation
Use Language Server Protocol tools for code validation, navigation, and refactoring. Essential for maintaining code quality.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use Language Server Protocol tools for code validation, navigation, and refactoring. Essential for maintaining code quality.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Automatically extract reusable patterns from Claude Code sessions and save them as learned skills for future use.
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.
Designer-turned-developer expertise for crafting stunning UI/UX even without design mockups
| name | lsp-validation |
| description | Use Language Server Protocol tools for code validation, navigation, and refactoring. Essential for maintaining code quality. |
Use the LSP (Language Server Protocol) tools to validate code quality, find references, navigate definitions, and perform safe refactoring.
lsp_diagnostics - Get Errors and WarningsWhen to use: After writing or modifying code to check for errors.
lsp_diagnostics(filePath: "/path/to/file.ts", severity: "error")
Severity levels:
error - Only errors (compilation failures)warning - Errors and warningsinformation - Includes informational messageshint - All diagnostics including hintsall - EverythingExample output:
Line 42: Cannot find name 'undefined_variable' (error)
Line 58: 'foo' is declared but never used (warning)
lsp_goto_definition - Jump to DefinitionWhen to use: To find where a symbol is defined.
lsp_goto_definition(filePath: "/path/to/file.ts", line: 10, character: 15)
Returns the file and location where the symbol at that position is defined.
lsp_find_references - Find All UsagesWhen to use: Before refactoring to understand impact.
lsp_find_references(filePath: "/path/to/file.ts", line: 10, character: 15, includeDeclaration: true)
Returns all locations where the symbol is used across the workspace.
lsp_rename - Safe RefactoringWhen to use: To rename a symbol across the entire codebase.
lsp_rename(filePath: "/path/to/file.ts", line: 10, character: 15, newName: "betterName")
Applies the rename across all files that reference the symbol.
1. Write/edit code
2. Run lsp_diagnostics with severity: "error"
3. If errors found:
- Fix the errors
- Re-run diagnostics
4. Run lsp_diagnostics with severity: "warning"
5. Address warnings if appropriate
1. Run lsp_diagnostics on all modified files
2. Ensure no errors
3. Review warnings
4. Proceed with commit only if clean
1. Use lsp_find_references to understand impact
2. Review all usages
3. If safe, use lsp_rename for symbol renaming
4. Or manually edit with confidence knowing all locations
| Agent | LSP Usage |
|---|---|
| tdd-guide | Run lsp_diagnostics after implementation |
| code-reviewer | Check for diagnostics during review |
| build-error-resolver | Use diagnostics to identify issues |
| refactor-cleaner | Use lsp_find_references before removing code |
| Agent | LSP Usage |
|---|---|
| orchestrator | Verify no errors after delegated work |
| architect | Use lsp_goto_definition for codebase navigation |
| security-reviewer | Trace data flow with references |
If LSP is unavailable for a file type:
The LSP tools work with any language that has a configured language server: