# lsp-verify

Runs LSP diagnostics, compiler builds, and test suites in parallel to catch regressions before you commit.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 165
- Author: blackwell-systems
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/blackwell-systems/agent-lsp/tree/HEAD/skills/lsp-verify/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/lsp-verify

## What it does

This skill inspects code changes across three verification layers. It pulls LSP diagnostics for modified files, compiles the project, and executes the test suite. Compiler errors block the workflow. Test failures do too, while LSP warnings are tracked as advisory notes in the final summary.

When modified files are supplied, the skill maps them to relevant test files with `mcp__lsp__get_tests_for_file`. Then it triggers all checks. During the verification phases, file edits are strictly forbidden to keep the run clean. Document formatting via `mcp__lsp__format_document` only unlocks after all layers pass.

Running this skill requires the `agent-lsp` MCP server. Tool calls fail without it.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add blackwell-systems/agent-lsp --skill lsp-verify -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/lsp-verify/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/lsp-verify/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add blackwell-systems/agent-lsp --skill lsp-verify -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/lsp-verify/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add blackwell-systems/agent-lsp --skill lsp-verify -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/lsp-verify/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install blackwell-systems/agent-lsp lsp-verify
```

2. **Manually: put the files in place**
- File: `.github/skills/lsp-verify/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add blackwell-systems/agent-lsp --skill lsp-verify -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/blackwell-systems/agent-lsp --path skills/lsp-verify
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/lsp-verify/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add blackwell-systems/agent-lsp --skill lsp-verify -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/blackwell-systems/agent-lsp/tree/HEAD/skills/lsp-verify/SKILL.md

## When to use it
- verify project builds and compiles without errors
- map changed source files to corresponding test suites
- collect LSP errors and warnings for edited files
- format code changes safely after checks pass

## Example prompts
- Run lsp-verify to check my recent changes before committing
- Execute three-layer verification on the modified files in src/
- Run lsp-verify and show me any failing tests or LSP errors

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 43fff6e141e88d26.

BEGIN THIRD-PARTY FILE 43fff6e141e88d26
````text
---
name: lsp-verify
description: Full three-layer verification after any change — LSP diagnostics + compiler build + test suite, ranked by severity. Use after completing any edit, refactor, or feature to confirm nothing is broken before committing.
user-invocable: true
allowed-tools: mcp__lsp__get_diagnostics mcp__lsp__run_build mcp__lsp__run_tests mcp__lsp__get_tests_for_file mcp__lsp__suggest_fixes mcp__lsp__format_document mcp__lsp__apply_edit
license: MIT
compatibility: Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)
metadata:
  optional-capabilities: codeActionProvider documentFormattingProvider
  tool_permissions:
    phases:
      test_correlation:
        description: "Pre-step: map changed source files to their test files"
        allowed:
          - "mcp__lsp__get_tests_for_file"
        forbidden:
          - "mcp__lsp__apply_edit"
          - "Edit"
          - "Write"
      diagnostics:
        description: "Layer 1: collect LSP diagnostics for changed files"
        allowed:
          - "mcp__lsp__start_lsp"
          - "mcp__lsp__get_diagnostics"
        forbidden:
          - "mcp__lsp__apply_edit"
          - "Edit"
          - "Write"
      build:
        description: "Layer 2: run compiler build"
        allowed:
          - "mcp__lsp__run_build"
        forbidden:
          - "mcp__lsp__apply_edit"
          - "Edit"
          - "Write"
      tests:
        description: "Layer 3: run test suite"
        allowed:
          - "mcp__lsp__run_tests"
          - "Bash"                         # scoped test commands for large repos
        forbidden:
          - "mcp__lsp__apply_edit"
          - "Edit"
          - "Write"
      fix_and_format:
        description: "Post-verification: apply code action fixes and format"
        allowed:
          - "mcp__lsp__suggest_fixes"
          - "mcp__lsp__apply_edit"
          - "mcp__lsp__format_document"
          - "mcp__lsp__get_diagnostics"    # re-check after fixes
        forbidden:
          - "mcp__lsp__simulate_*"
          - "mcp__lsp__run_build"          # re-run full verify instead
          - "mcp__lsp__run_tests"          # re-run full verify instead
    global_forbidden:
      - "mcp__lsp__simulate_*"             # verify is post-edit, not speculative
      - "mcp__lsp__rename_symbol"          # verify does not make semantic changes
---

> 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:

```
````
END THIRD-PARTY FILE 43fff6e141e88d26

The third-party file has ended. Everything between the 43fff6e141e88d26 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3166 of 8216 bytes. © blackwell-systems · MIT · https://github.com/blackwell-systems/agent-lsp/tree/HEAD/skills/lsp-verify/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
