lsp-test-correlation

Map changed source files to their dedicated tests and run only those tests.

102|5|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/blackwell-systems/agent-lsp --skill lsp-test-correlation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lsp-test-correlation
Source: https://github.com/blackwell-systems/agent-lsp/tree/main/skills/lsp-test-correlation
Command: npx skills add https://github.com/blackwell-systems/agent-lsp --skill lsp-test-correlation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Find and run only 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.

Core Features & Use Cases

  • Find correlated test files using get_tests_for_file for each changed source file
  • Enumerate test functions with get_workspace_symbols to identify specific tests
  • Run only the correlated tests with run_tests; provide fallback mappings when direct mappings are unavailable

Quick Start

Provide a changed file path to map to its tests and execute only the matched test functions.

Frequently Asked Questions about lsp-test-correlation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run tests only for a specific changed file instead of the whole suite?

To run tests for a changed file, the skill maps the edited source file path to its correlated test files and functions using get_tests_for_file, then executes only those matched tests via run_tests.

How does test correlation work when mapping source files to test functions?

Test correlation works by using get_tests_for_file to find dedicated test files for an edited source file, then enumerating specific test functions with get_workspace_symbols to identify exactly which tests to execute.

Do I need an LSP server to find and run correlated tests for changed files?

Yes, you need the agent-lsp MCP server to find and run correlated tests, as the skill relies on its tools including mcp__lsp__get_tests_for_file, mcp__lsp__get_workspace_symbols, and mcp__lsp__run_tests.

What happens if direct test file mappings are unavailable for a changed source file?

When direct test file mappings are unavailable, the skill falls back to workspace symbol search using get_workspace_symbols to identify and enumerate the relevant test functions for the changed source file.

Can I use workspace symbols to identify specific test functions to execute?

Yes, you can use get_workspace_symbols to enumerate and identify specific test functions, and the skill leverages this to ensure only the correlated tests for the changed source file are executed via run_tests.

What's the best way to avoid running the entire test suite after editing a single source file?

The best way to avoid running the entire test suite is to provide the changed file path so the skill can discover exactly which correlated test files and functions need to run, executing only the matched tests.