MCP HubMCP Hub
스킬 목록으로 돌아가기

lsp-verify

blackwell-systems
업데이트됨 5 days ago
53
2
53
GitHub에서 보기
메타testingdesign

정보

lsp-verify 스킬은 코드 변경 후 3단계 검증(진단, 컴파일 빌드, 테스트 스위트)을 수행하여 커밋 전에 문제가 없음을 보장합니다. 변경된 파일을 해당 테스트와 자동으로 매핑하고 심각도 순위 결과를 제공합니다. 개발자는 편집, 리팩터링 또는 신규 기능 개발 완료 후 최종 커밋 전 안전 검사로 이 스킬을 사용해야 합니다.

빠른 설치

Claude Code

추천
기본
npx skills add blackwell-systems/agent-lsp -a claude-code
플러그인 명령대체
/plugin add https://github.com/blackwell-systems/agent-lsp
Git 클론대체
git clone https://github.com/blackwell-systems/agent-lsp.git ~/.claude/skills/lsp-verify

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Requires the agent-lsp MCP server.

lsp-verify: Three-Layer Verification

When to Use

Run this skill after any significant change to verify correctness at every level:

  • After editing source files (logic changes, refactors, new functions)
  • After merging or rebasing branches
  • After dependency updates or configuration changes
  • Before committing or pushing code

Input

  • workspace_dir (required): absolute path to the workspace root (e.g. /Users/you/code/myproject)
  • changed_files (optional): list of files you edited — used for targeted diagnostics

Execution

Pre-step: Test correlation (when changed_files is provided)

Before running the three layers, call get_tests_for_file for each changed source file to build a source → test file map:

mcp__lsp__get_tests_for_file({ "file_path": "<changed/source/file>" })

Returns the test files that correspond to each source file. Store this map — it is used in Layer 3 to focus failure analysis. If changed_files is unknown, skip this step.

Run all three layers in parallel — they are independent and do not need to be sequenced. Issue all three calls in the same message to minimize wall time.

Layer 1: LSP Diagnostics

Call mcp__lsp__get_diagnostics with file_path set to each changed file. get_diagnostics takes a file path, not a workspace directory.

Note: requires LSP to be initialized. If not yet running, call start_lsp with the workspace root first.

mcp__lsp__get_diagnostics({ "file_path": "<path/to/changed/file>" })

Call once per changed file. If you don't know which files changed, call it on the primary files touched in this session. Rank results by severity: errors first, then warnings.

Layer 2: Build

mcp__lsp__run_build({ "workspace_dir": "<workspace_dir>" })

Returns { "success": bool, "errors": [...] }. A failed build means the code does not compile. Build errors are blocking — must be resolved before shipping.

Layer 3: Tests

mcp__lsp__run_tests({ "workspace_dir": "<workspace_dir>" })

Does NOT require start_lsp. Returns { "passed": bool, "failures": [...] }.

Large output warning: run_tests on large repos can return hundreds of thousands of characters and exceed the context window. If the result is saved to a file rather than returned inline, do NOT attempt to read the whole file. Instead, search it for failures:

grep -E "^(FAIL|--- FAIL)" <output_file>

Or scope tests to the correlated test files from the pre-step to avoid the size issue entirely:

GOWORK=off go test -count=1 -short ./internal/mypackage/... 2>&1 | grep -E "FAIL|ok"

Using test correlation: If the pre-step produced a source → test file map, cross-reference failing test names against that map. For each failure, note whether it is in a correlated test file (directly covers the changed code) or an unrelated test file (collateral failure from a shared dependency). This distinction guides where to investigate first.

Test failures are blocking — they indicate regressions or unmet contracts.

Output Format

After running all three layers, produce a structured report:

## Verification Report

### Layer 1: LSP Diagnostics
[CLEAN / N errors, M warnings]

<details if N > 0 or M > 0>
Errors:
- file:line - message

Warnings:
- file:line - message
</details>

### Layer 2: Build
[PASSED / FAILED - N errors]

<details if FAILED>
- error message (file:line)
</details>

### Layer 3: Tests
[PASSED / FAILED - N failures]

<details if FAILED>
- test name: message (file:line) [correlated / unrelated]
</details>

<if test correlation map exists>
Test files covering changed source:
  changed/source/file.go → test/source_file_test.go
</if>

### Summary
Overall: CLEAN / NEEDS ATTENTION
Blocking issues: [errors that must be fixed before shipping]
  • CLEAN: no errors in any layer (warnings are advisory only)
  • NEEDS ATTENTION: one or more blocking issues found

Blocking vs Advisory

LayerErrorsWarnings
LSP DiagnosticsBlockingAdvisory
BuildAll blockingN/A
TestsAll blockingN/A

Build errors and test failures block shipping. LSP warnings and style suggestions are advisory — document them but do not treat as blockers unless they indicate logical errors.

When Verification Passes: Optional Format

If all three layers are CLEAN and changed_files is known, offer to format the changed files before committing:

mcp__lsp__format_document({ "file_path": "<changed-file>" })

Apply the returned TextEdit[] via apply_edit if non-empty. Run once per changed file. Skip if the user did not request formatting.


When Errors Are Found: Applying Code Actions

If Layer 1 returns errors, the LSP may offer quick fixes. For each error location, call suggest_fixes to surface available fixes:

mcp__lsp__suggest_fixes({
  "file_path": "<file>",
  "line": <error line>,
  "column": <error column>
})

Returns a list of available actions (e.g. "Add missing import", "Implement interface methods", "Remove unused variable"). Pick the most appropriate one and apply it:

mcp__lsp__apply_edit({
  "file_path": "<file>",
  "old_text": "<text to replace>",
  "new_text": "<replacement>"
})

Or if the code action returns a workspace_edit, pass it directly to apply_edit via the workspace_edit parameter.

After applying, re-run Layer 1 on the affected file to confirm the error is resolved before moving on. Do not apply multiple code actions in bulk without verifying each one — they may interact.

When to use: Compile errors from missing imports, unimplemented interface methods, or type mismatches often have one-click fixes available. Manual reasoning is still required for logic errors.

GitHub 저장소

blackwell-systems/agent-lsp
경로: skills/lsp-verify
0
agentskillsai-agentsai-toolingclaudeclaude-codecode-intelligence

연관 스킬

content-collections

메타

이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.

스킬 보기

polymarket

메타

이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.

스킬 보기

creating-opencode-plugins

메타

이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.

스킬 보기

sglang

메타

SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.

스킬 보기