> For the complete documentation index, see [llms.txt](https://docs.bugbug.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bugbug.io/ai-testing/skills.md). Agents can also search and read this documentation through its [MCP server](https://docs.bugbug.io/~gitbook/mcp).

# BugBug Skills

BugBug Skills are BugBug-specific instructions for AI agents. They guide the agent on when to inspect, change, ask, run, or stop so it can use BugBug safely.

{% hint style="info" %}
BugBug Skills are available on **all BugBug plans**. [BugBug MCP](https://docs.bugbug.io/ai-testing/mcp.md) access requires a **Pro or higher** plan.
{% endhint %}

## Available skills

| Skill                        | Description                                                                                                                                 |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `bugbug-context-discovering` | Discovers project, repository, and tested-application context before other BugBug skills.                                                   |
| `bugbug-tests-planning`      | Plans end-to-end and UI coverage before exact steps are created.                                                                            |
| `bugbug-tests-authoring`     | Plans, creates, edits, and validates BugBug tests.                                                                                          |
| `bugbug-steps-authoring`     | Chooses step types, builds typed step payloads, and names steps.                                                                            |
| `bugbug-selectors-authoring` | Authors, reviews, repairs, and optimizes DOM selector presets.                                                                              |
| `bugbug-test-run-debugging`  | Diagnoses test runs from failed steps and available run evidence.                                                                           |
| `bugbug-yaml-authoring`      | Creates, validates, repairs, summarizes, and reviews BugBug YAML before import.                                                             |
| `bugbug-tests-refactoring`   | Reviews and refactors tests, groups, components, suites, names, and duplication; starts read-only unless changes are explicitly authorized. |
| `bugbug-project-reporting`   | Creates read-only project-health reports for PM and QA audiences from run history and project data.                                         |
| `bugbug-use-bugbug`          | Documents the `bugbug` API used by code mode (`bugbug_use_bugbug`): functions, arguments, return values, and limits.                        |

## Recommended setup: BugBug Plugin

Install [BugBug Plugin](https://docs.bugbug.io/ai-testing/plugin.md) through the CLI to configure MCP and install skills together:

```bash
npx @bugbug-io/cli plugin --agent=<agent>
```

Requires Node.js 24 or newer.

Supported targets are `cursor`, `claude`, `vscode`, `codex`, and `copilot`. The selected client completes MCP OAuth after installation.

## Alternative setup: BugBug Skills only

Use skills-only setup when the agent already has a BugBug connection or only needs workflow guidance:

```bash
npx skills add https://github.com/bugbug-io/agent-plugin
```

The interactive installer lets you choose a supported agent and installation scope. Prefer the plugin installation route whenever possible because it installs both skills and MCP together.

### ChatGPT

ChatGPT installs skills by upload. Skills in ChatGPT are available to eligible Business, Enterprise, Healthcare, and Edu workspaces.

1. Download the [BugBug Skills repository](https://github.com/bugbug-io/agent-plugin/archive/refs/heads/master.zip) and extract it.
2. In the extracted `skills` folder, compress each skill folder into its own ZIP file, for example `bugbug-context-discovering.zip`.
3. In ChatGPT, select **Plugins** in the sidebar and open the **Skills** tab.
4. Select **Create** → **Upload from your computer** and choose a skill ZIP file. Repeat for each skill, starting with `bugbug-context-discovering`, which the other skills rely on.
5. Wait for ChatGPT to scan each skill. If a skill is marked **Needs Review**, review it before using it.

To connect BugBug MCP in ChatGPT, see the **ChatGPT** tab in [BugBug MCP](https://docs.bugbug.io/ai-testing/mcp.md#recommended-setup-bugbug-plugin).

## Link a repository to a project with bugbug.yaml

Before any other skill, `bugbug-context-discovering` decides which BugBug project the agent works on. When the agent can read your files, it looks for `bugbug.yaml` in the current directory and then in each parent directory, and reads only its top-level `projectId`:

```yaml
projectId: '<project-id>'
```

Create the file with `bugbug init` from the CLI, or write it yourself and commit it to the repository. Don't put tokens in it.

Without `bugbug.yaml`, the agent uses a project ID you give it, or lists your projects and asks you to choose one. It doesn't change project data until the project is confirmed. Agents without file access, such as ChatGPT or other MCP-only clients, always work this way and don't need the file.

### Related docs

* [BugBug Plugin](https://docs.bugbug.io/ai-testing/plugin.md)
* [BugBug MCP](https://docs.bugbug.io/ai-testing/mcp.md)
* [How to use AI with BugBug?](https://docs.bugbug.io/ai-testing/how-to-use-ai-with-bugbug.md)

### FAQ

<details>

<summary>What are BugBug Skills, and what do they help AI agents do?</summary>

BugBug Skills are BugBug-specific instructions that guide AI agents through test planning, authoring, debugging, maintenance and reporting workflows. They tell the agent when to inspect project context, ask for missing information, propose changes, request authorization, run tests or stop.

</details>

<details>

<summary>What is the difference between BugBug Skills and BugBug MCP?</summary>

BugBug MCP gives an AI agent live tools for accessing and changing BugBug projects. BugBug Skills provide workflow guidance that teaches the agent how to use BugBug correctly and safely. MCP is the connection and action layer; Skills are the instruction layer. The BugBug Plugin installs both.

</details>

<details>

<summary>Do BugBug Skills give an AI agent access to my BugBug projects?</summary>

No. Skills provide instructions but do not create a live connection to your projects. The agent needs BugBug MCP or another supported BugBug connection to inspect or modify project data. Skills can still guide planning, YAML review and other workflows without live access.

</details>

<details>

<summary>Which BugBug Skill should an AI agent use for a specific task?</summary>

BugBug provides dedicated Skills for discovering project context, planning coverage, authoring tests and steps, selecting stable selectors, debugging failed runs, working with YAML, refactoring existing tests and creating project-health reports. The agent should select the Skill that matches the requested task before taking action.

</details>

<details>

<summary>How does the agent know which BugBug project to use?</summary>

From `projectId` in a `bugbug.yaml` file in your repository, if the agent can read files. Otherwise from a project ID you give it, or by listing your projects and asking you to choose. See [Link a repository to a project with bugbug.yaml](#link-a-repository-to-a-project-with-bugbug.yaml).

</details>

<details>

<summary>How do I install BugBug Skills?</summary>

The recommended option is to install the BugBug Plugin, which adds MCP and Skills together:

`npx @bugbug-io/cli plugin --agent=<agent>`

If you only need the Skills, install them separately with:

`npx skills add https://github.com/bugbug-io/agent-plugin`

</details>

<details>

<summary>Are BugBug Skills available on the Free plan?</summary>

Yes. BugBug Skills are available on all BugBug plans. However, using them to access live project data and perform actions through BugBug MCP requires a Pro or higher plan.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bugbug.io/ai-testing/skills.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
