How to Integrate Teamscale into Claude Code
The Teamscale plugin for Claude Code brings Teamscale's quality information directly into your AI coding agent. With the plugin, Claude Code can detect and fix Teamscale findings, close test gaps on a pull request, run pre-commit analysis on local changes, and run only the tests impacted by its changes. This keeps the feedback loop short: the agent fixes quality problems while it is already working on the code, instead of you triaging them later.
The plugin is distributed through our plugin marketplace on GitHub: github.com/teamscale/claude-code.
Beta Version
The Claude Code Plugin is still under active development and subject to frequent changes. We recommend to update the plugin regularly.
Prerequisites
The plugin talks to Teamscale through the teamscale-dev command-line client, so the setup largely matches that of teamscale-dev:
- A running Teamscale instance that analyzes your project.
- The
teamscale-devCLI must be installed and available on thePATH. - The project must contain a
.teamscale.tomlconfiguration file, which tellsteamscale-devwhich Teamscale server and project to use. - Credentials must be provided via the
TEAMSCALE_DEV_USERandTEAMSCALE_DEV_ACCESSKEYenvironment variables. - Python 3.9 or later must be installed, as the plugin's helper scripts are written in Python.
Installation
Run the following commands inside Claude Code:
/plugin marketplace add teamscale/claude-code
/plugin install teamscale@teamscale-plugins
/reload-plugins
/teamscale:check-setupAlternatively, run /plugin and install the plugin from the Discover tab.
The final /teamscale:check-setup command verifies all prerequisites listed above and helps you correct any problems it detects, so run it once after installing and whenever the plugin misbehaves.
Skills
The plugin provides the following skills:
| Skill | Description |
|---|---|
/teamscale:check-setup | Verifies the plugin's prerequisites and helps with correcting detected problems. |
/teamscale:pr-fix-findings | Fetches the findings introduced on the current branch or pull request from Teamscale and fixes them. |
/teamscale:pr-close-test-gaps | Fetches test-gap information for the current branch or pull request and generates tests to close the gaps. |
/teamscale:fix-findings <files> | Fetches the findings for the given files from Teamscale and fixes them. This uses the server's analysis results, so the files must be committed and pushed. |
/teamscale:local-fix-findings | Runs pre-commit analysis on the uncommitted local changes and fixes the resulting findings. |
/teamscale:local-select-tests | Selects the tests most impacted by the uncommitted local changes, using Teamscale's Test Impact Analysis, so the agent runs targeted tests instead of the whole suite. |
The prefixes indicate what a skill operates on: skills with the pr- prefix work on the open pull request matching the current Git branch and fall back to comparing the branch against the repository's default branch when no pull request exists, while skills with the local- prefix work on the uncommitted changes in your working directory.
You do not have to invoke the skills explicitly. Except for /teamscale:check-setup, Claude Code invokes them on its own when your request matches, for example, when you ask it to "fix the Teamscale findings on my branch" or to "run the tests affected by my changes".
Integrating With Other Coding Agents
If you use a coding agent other than Claude Code, you can integrate Teamscale via the teamscale-dev mcp command, which exposes the same functionality as Model Context Protocol (MCP) tools.
Additionally, many other coding agents, including GitHub Copilot CLI, support the Claude Code plugin format and can directly install this plugin.
