lsp-test-correlation

lsp-test-correlation is a skill for Claude Code from blackwell-systems/agent-lsp. It costs 42 tokens per session (1,353 once invoked), scanned A, original, MIT.

A tool that finds the tests connected to a source file and runs only those tests.

In plain words
What is it for?
Use it after editing one or two files, before committing, when debugging a failure, or when checking what tests cover a file.
Why use it?
It gives focused feedback after a small change without making you wait for the entire test suite.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it after editing one or two files, before committing, when debugging a failure, or when checking what tests cover a file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blackwell-systems/agent-lsp/lsp-test-correlation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add blackwell-systems/agent-lsp --skill lsp-test-correlation
Clone the repo
git clone --depth 1 https://github.com/blackwell-systems/agent-lsp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lsp-test-correlation

README.md
[![agentmods](https://agentmods.dev/badge/skills/blackwell-systems/agent-lsp/lsp-test-correlation/github.svg)](https://agentmods.dev/skills/blackwell-systems/agent-lsp/lsp-test-correlation)
Your own site
<a href="https://agentmods.dev/skills/blackwell-systems/agent-lsp/lsp-test-correlation"><img src="https://agentmods.dev/badge/skills/blackwell-systems/agent-lsp/lsp-test-correlation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lsp-test-correlation

Your own site · 80×15
<a href="https://agentmods.dev/skills/blackwell-systems/agent-lsp/lsp-test-correlation"><img src="https://agentmods.dev/badge/skills/blackwell-systems/agent-lsp/lsp-test-correlation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,353 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.01353
Opus 5 $0.00021 $0.00677
Sonnet 5 $0.00008 $0.00271
Haiku 4.5 $0.00004 $0.00135

Measured 9d ago against content hash d2a1b7c67ccb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

lsp-test-correlation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/lsp-test-correlation/SKILL.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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)

Read the full file on GitHub · 180 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 180 lines · 42 tokens per session scan A d2a1b7c67ccb

Subscribe to this mod's changes

lsp-test-correlation is a skill published in the GitHub repository blackwell-systems/agent-lsp (123 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 1,353 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

analyze-usage

Use when asked to analyze codescout tool usage, check for error patterns, audit tool health, generate a usage report, spot anti-patterns, or clear usage statistics to start fresh.

mareurs/codescout · 42 tokens

mastermind-test-audit

Read-only review of whether the tests in a finished change actually prove its behaviour — changed code no test reaches, a test exercising a different path than the one that changed, an assertion edited to match the new output, and a suite that ran nothing. Use after implementation, and whenever a change claims to be…

xcrft/mastermind · 69 tokens

mastermind-browser-verification

Turn "I opened it and it looks fine" into recorded evidence — accessibility tree over screenshot, console and network errors as mechanical failures, viewport and colour-scheme checks as a checklist, and anything unchecked marked unchecked. Use after implementing a UI change in a client that can drive a browser.

xcrft/mastermind · 64 tokens

codemeridian-test-planning

Plan focused tests with CodeMeridian by finding relevant test shields, coverage gaps, impacted behavior, and the smallest useful test set before implementation.

Driftya/code-meridian · 35 tokens

mastermind-test-impact

Build a focused, evidence-backed test plan from mastermind impact or mmcgtestimpact. Use when deciding which tests to run for a change, explaining direct/transitive/heuristic candidates, or sequencing fast feedback before the repository's required full test gate.

xcrft/mastermind · 60 tokens

Go Patterns

Use this skill when building Go services/CLIs and you want practical patterns for package layout, error handling, concurrency, and testing that keep code readable and reliable.

AmariahAK/atlarix-skills · 2 tokens