Skip to content

How to Integrate Teamscale into Claude Code and GitHub Copilot CLI ​

The Teamscale Agent Plugin brings Teamscale's quality information directly into your AI coding agent. It uses the Claude Code plugin format, which GitHub Copilot CLI reads as well, so you can install the same plugin in either agent. With the plugin, your agent 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 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:

If your project does not exist in Teamscale yet, your agent can create it and the .teamscale.toml file for you, see Setting Up Teamscale with Your Agent.

These prerequisites are the same for every agent, because all of them run the plugin's skills against the local teamscale-dev installation.

Installation ​

Claude Code ​

Run the following commands inside Claude Code:

/plugin marketplace add teamscale/claude-code
/plugin install teamscale@teamscale-plugins
/reload-plugins
/teamscale:check-setup

Alternatively, 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.

GitHub Copilot CLI ​

Copilot CLI reads the same plugin manifest and skill layout as Claude Code, so it installs this plugin unchanged, and no separate Copilot-specific plugin is needed. Run the following commands inside Copilot CLI:

/plugin marketplace add teamscale/claude-code
/plugin install teamscale@teamscale-plugins
/teamscale:check-setup

Skills ​

The plugin provides the following skills:

SkillDescription
/teamscale:check-setupVerifies the plugin's prerequisites and helps with correcting detected problems.
/teamscale:pr-fix-findingsFetches the findings introduced on the current branch or pull request from Teamscale and fixes them.
/teamscale:pr-close-test-gapsFetches test-gap information for the current branch or pull request and generates tests to close the gaps.
/teamscale:issue-close-test-gaps <ticket>Fetches test-gap information for the given ticket from Teamscale and generates tests to close the gaps. Does not use Git, so it also works in a repository that does not contain the code under test.
/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-findingsRuns pre-commit analysis on the uncommitted local changes and fixes the resulting findings.
/teamscale:local-select-testsSelects 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, skills with the issue- prefix work on the code that Teamscale attributes to the ticket you name, independently of the current Git branch, 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, your coding agent invokes them on its own when your request matches, for example, when you ask it to "fix the Teamscale findings on my branch", to "close the test gaps for TS-1234", or to "run the tests affected by my changes".

Setting Up Teamscale with Your Agent ​

Your coding agent can also set up Teamscale for your repository.

To create a Teamscale project for your repository and the .teamscale.toml file:

Create a Teamscale project
Create a Teamscale project for this repository in my Teamscale instance.
Use the Teamscale documentation at https://docs.teamscale.com/llms-full.txt
Follow the best practices from https://docs.teamscale.com/howto/creating-a-project/
Ask me for the URL of my Teamscale instance and my username and access key.
The instance serves its REST API spec at <url>/openapi.json (public, versioned) and <url>/openapi.json?include-internal=true (also internal endpoints, which may change between releases).
Let me enter any credentials you need in a secure way so they don't leak to the agent transcript.
When done, create a .teamscale.toml file according to the docs.

⚠️ Never paste your access key or other credentials into an agent session! It would leak into your session transcripts.

Paste this prompt into your coding agent, for example Claude Code or GitHub Copilot.

To record test coverage, upload it to Teamscale and use it for Test Gap analysis:

Set up coverage uploads and Test Gap analysis
Set up coverage recording and Test Gap analysis.
Use the Teamscale documentation at https://docs.teamscale.com/llms-full.txt
Follow the best practices from https://docs.teamscale.com/introduction/best-practices/external-coverage-uploads/
Ask me for the URL of my Teamscale instance, my project ID and my username and access key.
If the repository contains a .teamscale.toml file, take the URL and project ID from it.
The instance serves its REST API spec at <url>/openapi.json (public, versioned) and <url>/openapi.json?include-internal=true (also internal endpoints, which may change between releases).
Ask me before modifying settings or performing destructive operations.
Let me enter any credentials you need in a secure way so they don't leak to the agent transcript.

⚠️ Never paste your access key or other credentials into an agent session! It would leak into your session transcripts.

Paste this prompt into your coding agent, for example Claude Code or GitHub Copilot.

Integrating With Other Coding Agents ​

If your coding agent does not support the Claude Code plugin format, you can integrate Teamscale via the teamscale-dev mcp command, which exposes the same functionality as Model Context Protocol (MCP) tools.