Agent skill

Lsp Test Correlation

by blackwell-systems in blackwell-systems/agent-lsp

Find and run the tests that cover a source file. An agent skill from blackwell-systems/agent-lsp.

MITAuto-check passedTesting & QA

Install Lsp Test Correlation

skills CLI
$ npx skills add blackwell-systems/agent-lsp --skill lsp-test-correlation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install blackwell-systems/agent-lsp lsp-test-correlation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/blackwell-systems/agent-lsp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/lsp-test-correlation .claude/skills/lsp-test-correlation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
lsp-test-correlation
GitHub stars
160
Token cost
~1.4k tokens
SKILL.md length
474 words
Files
1
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

Find and run the tests that cover a source file. An agent skill from blackwell-systems/agent-lsp.

  • Works in 5 steps: Find correlated test files → Enumerate test functions (fallback or… → Report the correlation map → …
  • Tasks that involve Test generation
  • SKILL.md covers When to use, Workflow, Multi-file workflow and Decision guide, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Lsp Test Correlation is an agent skill from blackwell-systems/agent-lsp. Find and run the tests that cover a source file. Use after editing a file to discover exactly which test files and test functions need to run — without running the entire test suite.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)

It sits in Testing & QA, covering Test generation. The repository describes itself as: MCP server that orchestrates language servers into agent-native workflows. 65 tools, 30 CI-verified languages. The licence is MIT.

When your agent uses it

  • Tasks that involve Test generation

Example prompts

  • “/lsp-test-correlation”

Requirements

  • Compatibility (from SKILL.md): Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)
  • Pre-approved tools (allowed-tools): mcp__lsp__get_tests_for_file, mcp__lsp__find_symbol, mcp__lsp__open_document, mcp__lsp__run_tests

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Find correlated test files
  2. Enumerate test functions (fallback or enrichment)
  3. Report the correlation map
  4. Run correlated tests
  5. Report results

What it can do on your machine

Read from SKILL.md and the folder at commit 38ca488. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • mcp__lsp__get_tests_for_file
    • mcp__lsp__find_symbol
    • mcp__lsp__open_document
    • mcp__lsp__run_tests

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)

    From compatibility in the SKILL.md frontmatter.

Context cost

Lsp Test Correlation loads about 1.4k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 474 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from blackwell-systems/agent-lsp at commit 38ca488, republished under its MIT licence (© blackwell-systems). 474 words, ~1,407 tokens.

Download SKILL.mdSave it as .claude/skills/lsp-test-correlation/SKILL.md (or your agent's skills folder).
name
lsp-test-correlation
description
Find and run the tests that cover a source file. Use after editing a file to discover exactly which test files and test functions need to run — without running the entire test suite.
allowed-tools
mcp__lsp__get_tests_for_file, mcp__lsp__find_symbol, mcp__lsp__open_document, mcp__lsp__run_tests
compatibility
Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp)
argument-hint
[file-path] [optional: run=true]
user-invocable
true
license
MIT
metadata.optional-capabilities
workspaceSymbolProvider

Requires the agent-lsp MCP server.

lsp-test-correlation

Discover which tests cover a source file, then run only those tests. Faster than running the full suite when you've changed one or two files and want targeted feedback.

When to use

  • After editing a source file: "Which tests do I need to run for this change?"
  • Before committing: run only the tests that cover what you touched
  • Debugging a failure: find which test file corresponds to a broken source file
  • Code review: understand what test coverage exists for a file before merging

Use /lsp-verify instead when you want to run the full suite and check all three layers (diagnostics + build + tests). Use this skill when you want fast, scoped test execution.


Workflow

Step 1 — Find correlated test files

Call get_tests_for_file for each edited source file:

mcp__lsp__get_tests_for_file({ "file_path": "/abs/path/to/source.go" })

Returns the test files that correspond to the source file. For multiple edited files, call once per file.

If no test files are returned: the source file may have no dedicated test file, or the mapping is not resolvable (e.g. integration tests in a separate directory). See Step 2 for fallback.

Step 2 — Enumerate test functions (fallback or enrichment)

If get_tests_for_file returns test files, use find_symbol to list the test functions defined in those files:

mcp__lsp__find_symbol({ "query": "Test" })

Filter results to the correlated test files from Step 1. This gives you the specific test function names to run rather than the whole test file.

Fallback (no test files found): query find_symbol for test functions that contain the changed symbol's name:

mcp__lsp__find_symbol({ "query": "Test<ChangedFunctionName>" })

This catches cases where get_tests_for_file misses indirect coverage.

Step 3 — Report the correlation map

Before running, report what was found:

## Test correlation for <file>

Source file: internal/tools/analysis.go
Test files:
  → internal/tools/analysis_test.go
     Tests: TestHandleGetCodeActions, TestHandleGetCompletions, TestHandleGetDocumentSymbols

No correlated test files found for: internal/lsp/normalize.go
  → Fallback: TestNormalizeCompletion, TestNormalizeDocumentSymbols (from workspace symbol search)

If the user provided run=true or asks to run, proceed to Step 4. Otherwise stop here and let the user decide.

Show full SKILL.md (184 more words)Show less
Step 4 — Run correlated tests

Run only the correlated test files or functions. Scope as tightly as possible:

Go — run specific package:

mcp__lsp__run_tests({ "workspace_dir": "<root>", "test_filter": "TestHandleGetCodeActions|TestHandleGetCompletions" })

If run_tests does not support test_filter, pass the package path instead of the workspace root to narrow scope. The test output will be smaller and faster than running ./....

Output handling: If test output is large, do not read it in full. Search for failures:

grep -E "^(FAIL|--- FAIL)" <output_file>
Step 5 — Report results
## Test Results

Ran 3 tests in internal/tools/analysis_test.go

PASSED (2):
  TestHandleGetCodeActions
  TestHandleGetCompletions

FAILED (1):
  TestHandleGetDocumentSymbols — expected 3 symbols, got 2 (analysis_test.go:87)

Recommendation: Fix TestHandleGetDocumentSymbols before committing.

Multi-file workflow

For changes spanning multiple source files:

  1. Call get_tests_for_file for each changed file in parallel.
  2. Deduplicate the resulting test files (the same test file may cover multiple source files).
  3. Report the full correlation map before running.
  4. Run the deduplicated test set once.
## Test correlation for 3 changed files

internal/tools/analysis.go      → internal/tools/analysis_test.go
internal/lsp/client.go          → internal/lsp/client_test.go, internal/lsp/client_completion_test.go
internal/resources/resources.go → (no dedicated test file)

Deduplicated test files to run: 3

Decision guide

SituationAction
get_tests_for_file returns test filesUse those; enumerate functions via find_symbol
No test files returnedFallback to find_symbol with changed symbol names
Test files found but no matching test functionsReport gap — this source file may lack unit test coverage
More than 10 test files returnedDon't run all; use /lsp-verify for full suite instead
Test failsRun /lsp-verify for full diagnostic picture

Example

# "I edited internal/tools/symbol_source.go — which tests should I run?"

get_tests_for_file(file_path="/repo/internal/tools/symbol_source.go")
  → internal/tools/symbol_source_test.go

find_symbol(query="TestGetSymbolSource")
  → TestGetSymbolSource_ContainsPosition (line 12)
  → TestGetSymbolSource_FindInnermost (line 34)
  → TestGetSymbolSource_PositionPattern (line 67)

# Report correlation, then run:
run_tests(workspace_dir="/repo", test_filter="TestGetSymbolSource")
  → 3 passed in 0.4s

© blackwell-systems, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/lsp-test-correlation of blackwell-systems/agent-lsp.

Open the folder on GitHubat commit 38ca488

Compare with similar skills

Lsp Test Correlation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Lsp Test Correlation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lsp Test Correlation this skillblackwell-systems/agent-lsp160—~1.4kAutomated safety check: PassMIT
Emcaklofas/kicad-happy1.4k1 repos~2.8kAutomated safety check: PassMIT
Swig Testswig/swig6.3k—~2.3kAutomated safety check: PassCustom licence
Generate Test Cases342164796/generate-test-cases1191 repos~2.9kAutomated safety check: PassNone
Wioworkersio/skills200—~5.8kAutomated safety check: PassMIT
Verify Cc Safety Netkenryu42/cc-safety-net1.6k—~2kAutomated safety check: PassMIT

Similar skills

  • Emc

    aklofas/kicad-happy

    EMC pre-compliance risk analysis for KiCad PCB designs — 18 check categories, 44 rule IDs covering ground planes, decoupling, I/O filtering, switching harmonics, clock routing, differential pair…

    1.4k GitHub starsUsed in 1 repo~2.8k tokens
    Testing & QAAuto-check passed
  • Swig Test

    swig/swig

    Run SWIG test suite for specific languages. An agent skill from swig/swig.

    6.3k GitHub stars~2.3k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Generate Test Cases

    342164796/generate-test-cases

    自主学习型测试文档生成器。从需求文档(Markdown)生成测试用例 XMind 文件,支持持久化记忆和持续学习。当用户提到"生成测试用例"、"根据需求生成测试"时触发。

    119 GitHub starsUsed in 1 repo~2.9k tokens
    Testing & QAAuto-check passed
  • Wio

    workersio/skills

    Testing workflow skill for finding high-value test candidates, writing focused tests, generating realistic workloads, reviewing test value, and diagnosing test-suite health.

    200 GitHub stars~5.8k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed
  • Verify Cc Safety Net

    kenryu42/cc-safety-net

    Launch and drive the real cc-safety-net CLI — the hook decision path, explain, status/doctor, logs, and the local policy GUI — against an isolated home, capturing evidence.

    1.6k GitHub stars~2k tokensUpdated today
    Testing & QAAuto-check passed
  • File Server

    microsoft/WindowsProtocolTestSuites

    Official

    ALWAYS LOAD THIS SKILL when working with FileServer, SMB, SMB2, SMB3, CIFS, file sharing, MS-SMB2, MS-FSCC, MS-FSA, MS-DFSC, MS-FSRVP, MS-RSVD, MS-SQOS, or any file server protocol test…

    567 GitHub stars~4.1k tokensUpdated 23 days ago
    Testing & QAAuto-check passed

More from blackwell-systems/agent-lsp

All 24 skills in this repo
  • Lsp Dead Code

    blackwell-systems/agent-lsp

    Enumerate exported symbols in a file and surface those with zero references across the workspace.

    160 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Lsp Edit Export

    blackwell-systems/agent-lsp

    Safe workflow for editing exported symbols or public APIs. An agent skill from blackwell-systems/agent-lsp.

    160 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Lsp Fix All

    blackwell-systems/agent-lsp

    Apply available quick-fix code actions for all current diagnostics in a file, one at a time with re-collection between each fix.

    160 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Lsp Generate

    blackwell-systems/agent-lsp

    Trigger language server code generation — implement interface stubs, generate test skeletons, add missing methods, generate mock types.

    160 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Lsp Impact

    blackwell-systems/agent-lsp

    Blast-radius analysis for a symbol or file — shows all callers, type supertypes/subtypes, and reference count before you change it.

    160 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Lsp Rename

    blackwell-systems/agent-lsp

    Two-phase safe rename across the entire workspace. An agent skill from blackwell-systems/agent-lsp.

    160 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Categories

Questions about Lsp Test Correlation

What does Lsp Test Correlation do?

Find and run the tests that cover a source file. An agent skill from blackwell-systems/agent-lsp. Lsp Test Correlation is an agent skill from blackwell-systems/agent-lsp. Find and run the tests that cover a source file.

When should I use Lsp Test Correlation?

Lsp Test Correlation fits situations like: tasks that involve Test generation.

How do I install Lsp Test Correlation in Claude Code?

Run `npx skills add blackwell-systems/agent-lsp --skill lsp-test-correlation -a claude-code`. Or copy the skill folder (skills/lsp-test-correlation in blackwell-systems/agent-lsp) into .claude/skills/lsp-test-correlation in your project. Claude Code loads it when a task matches its description.

How do I install Lsp Test Correlation in Codex?

Run `npx skills add blackwell-systems/agent-lsp --skill lsp-test-correlation -a codex`. Or copy the skill folder (skills/lsp-test-correlation in blackwell-systems/agent-lsp) into .agents/skills/lsp-test-correlation in your project. Codex loads it when a task matches its description.

Can I use Lsp Test Correlation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add blackwell-systems/agent-lsp --skill lsp-test-correlation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lsp-test-correlation, .gemini/skills/lsp-test-correlation, .github/skills/lsp-test-correlation and .opencode/skills/lsp-test-correlation in your project.

What does Lsp Test Correlation need to run?

SKILL.md names no scripts, command-line tools or credentials: Lsp Test Correlation is instructions for the agent only. Its frontmatter pre-approves these tools: mcp__lsp__get_tests_for_file, mcp__lsp__find_symbol, mcp__lsp__open_document, mcp__lsp__run_tests. Compatibility (from SKILL.md): Requires the agent-lsp MCP server (github.com/blackwell-systems/agent-lsp).

Does Lsp Test Correlation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Lsp Test Correlation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Lsp Test Correlation use?

Lsp Test Correlation is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lsp Test Correlation use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Lsp Test Correlation?

Skills that share tags, products or a category with Lsp Test Correlation: Emc (aklofas/kicad-happy, 1.4k stars), Swig Test (swig/swig, 6.3k stars), Generate Test Cases (342164796/generate-test-cases, 119 stars) and Wio (workersio/skills, 200 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lsp Test Correlation?

blackwell-systems (a GitHub user) maintains it in blackwell-systems/agent-lsp, which has 160 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 9, 2026.

Source: blackwell-systems/agent-lsp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.