Agent skills teach your AI coding assistant — Claude Code, GitHub Copilot, Cursor, Windsurf, and others — how to work with Pact, PactFlow, and Drift. Instead of explaining contract testing concepts every time you start a conversation, the skills give your AI persistent, deep knowledge of consumer test patterns, provider verification, can-i-deploy diagnostics, Drift test authoring, and workspace management.
The plugin goes further: it bundles the SmartBear MCP server alongside the skills, so your assistant can connect directly to your PactFlow workspace or Pact Broker. It can fetch live provider states before generating tests, query the contract matrix to diagnose a failing can-i-deploy, publish pacts and provider contracts, record deployments, and manage environments — all without leaving your editor.
There are two types of components in this repo. Skills are context files that activate when the task matches — the assistant reads them and applies the knowledge. Agents are autonomous sub-tasks the PactFlow skill delegates to: generating tests, reviewing them for best-practice violations, running a full BDCT flow end-to-end, or auditing workspace health.
| Plugin name | Skills / Agents | What it does |
|---|---|---|
swagger-contract-testing |
Drift | Expert assistant for Drift — PactFlow's OpenAPI contract testing CLI. Helps write test cases, configure lifecycle hooks, debug failures, and publish results to PactFlow. |
| OpenAPI Parser | Parses complex OpenAPI specs (anyOf/oneOf/allOf, discriminators, polymorphism, $ref chains, enums, regex) and generates Drift test cases covering every viable schema combination. | |
| PactFlow | Expert assistant for PactFlow and Pact contract testing. Uses the SmartBear MCP contract-testing_* tools to generate and review Pact tests with AI, publish contracts, verify providers, run can-i-deploy checks, record deployments, and manage the full PactFlow workspace (environments, pacticipants, BDCT, webhooks, secrets, metrics). |
|
| pact-generator | Agent: generates new Pact consumer tests and provider state handlers from existing code, OpenAPI specs, or example request/response pairs. | |
| pact-reviewer | Agent: reviews Pact consumer tests and provider verification code for best-practice violations, false positives, and provider state naming issues. | |
| pact-implementor | Agent: builds a new Pact client library from scratch in any language by wrapping the Pact FFI. | |
| pact-maintainer | Agent: audits PactFlow workspace health, fixes failing verifications, and cleans up stale pacticipants, branches, and environments. | |
| bdct-tester | Agent: drives a full Bi-Directional Contract Testing flow end-to-end — consumer tests, provider contract verification, publishing, and can-i-deploy. |
The three skills work together: OpenAPI Parser analyses a spec and generates Drift test scaffolding; Drift runs, iterates, and publishes those tests; PactFlow manages the full contract testing lifecycle — from generating Pact tests with AI to safely deploying services. The agents handle specialised sub-tasks autonomously within the PactFlow skill.
Further reading: PactFlow Skill · SmartBear MCP · Kiro Power
- Quick install with
npx skills - Quick install with
gh skill - Claude Code
- OpenCode
- GitHub Copilot (VS Code)
- GitHub Copilot CLI
- Cursor
- Windsurf
- Codex
- Kiro
- Antigravity
The skills CLI installs agent skills from GitHub directly into your project. It auto-detects which agentic coding tools you use and places the skill files in the correct location for each one.
npx skills add pactflow/pactflow-agent-skillsThis installs the swagger-contract-testing skills for all detected agents in your project (Claude Code, Copilot, Cursor, Windsurf, Kiro, Codex, OpenCode, Antigravity, and more).
The gh skill GitHub CLI extension installs agent skills directly from any GitHub repository. It works with any tool that reads skills from a standard location (Claude Code, Copilot, Cursor, Windsurf, Kiro, Codex, and more).
gh skill install pactflow/pactflow-agent-skillsThis pulls the swagger-contract-testing skills from this repo and places them in the appropriate skills directory for your project.
The install commands throughout this guide use Unix shell syntax. In PowerShell, replace:
| Unix | PowerShell |
|---|---|
mkdir -p path/to/dir |
New-Item -ItemType Directory -Force -Path path\to\dir |
cp -r plugins/swagger-contract-testing/skills/drift-testing path/to/dir |
Copy-Item -Recurse plugins\swagger-contract-testing\skills\drift-testing path\to\dir |
~ (home directory) works in PowerShell 3+. In older environments use $HOME instead.
Claude Code supports Skills via a plugin marketplace system. Requires Claude Code v1.0.33+.
The plugin is listed in Anthropic's official community plugins marketplace. Add the marketplace and install in two commands:
1. Add the Anthropic community marketplace:
claude plugin marketplace add anthropics/claude-plugins-community2. Install the plugin:
claude plugin install swagger-contract-testing@claude-communityAlternatively, open the /plugin panel in Claude Code, navigate to Discover, search for swagger-contract-testing, and click Install.
3. Configure your PactFlow credentials:
Add a pluginConfigs block to ~/.claude/settings.json with your PactFlow base URL and API token:
{
"pluginConfigs": {
"swagger-contract-testing@claude-community": {
"options": {
"pact_broker_base_url": "https://yourorg.pactflow.io",
"pact_broker_token": "your-api-token"
}
}
}
}Get your API token from https://yourorg.pactflow.io/settings/api-tokens. For an open-source Pact Broker, use pact_broker_username and pact_broker_password instead of pact_broker_token.
Then reload the plugin to start the MCP server:
/reload-plugins
1. Add the marketplace inside a Claude Code session:
/plugin marketplace add pactflow/pactflow-agent-skills
Or add it to .claude/settings.json so teammates are prompted to install it automatically when they open the project:
{
"extraKnownMarketplaces": {
"pactflow-agent-skills": {
"source": {
"source": "github",
"repo": "pactflow/pactflow-agent-skills"
}
}
}
}2. Install the plugin:
/plugin install swagger-contract-testing@pactflow-agent-skills
Scope options:
| Scope | Stored in | Who it applies to |
|---|---|---|
user (default) |
~/.claude/settings.json |
You, across all projects |
project |
.claude/settings.json |
Everyone on the team (commit this file) |
local |
.claude/settings.local.json |
You, in this project only (gitignored) |
3. Configure your PactFlow credentials:
Add a pluginConfigs block to ~/.claude/settings.json with your PactFlow base URL and API token:
{
"pluginConfigs": {
"swagger-contract-testing@pactflow-agent-skills": {
"options": {
"pact_broker_base_url": "https://yourorg.pactflow.io",
"pact_broker_token": "your-api-token"
}
}
}
}Get your API token from https://yourorg.pactflow.io/settings/api-tokens. For an open-source Pact Broker, use pact_broker_username and pact_broker_password instead of pact_broker_token.
Then reload the plugin to start the MCP server:
/reload-plugins
/plugin marketplace add ./path/to/pactflow-agent-skills/.claude-plugin/marketplace.json
/plugin install swagger-contract-testing@pactflow-agent-skills
claude --plugin-dir ./plugins/swagger-contract-testing/plugin # open plugin manager (Discover / Installed / Marketplaces / Errors)
/reload-plugins # reload without restarting
/plugin disable swagger-contract-testing@pactflow-agent-skills
/plugin uninstall swagger-contract-testing@pactflow-agent-skills
OpenCode supports Agent Skills loaded from SKILL.md files in named subdirectories. The agent
automatically selects relevant skills based on task context.
cp -r plugins/swagger-contract-testing/skills/drift-testing ~/.config/opencode/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser ~/.config/opencode/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow ~/.config/opencode/skills/pactflowmkdir -p .opencode/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing .opencode/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser .opencode/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow .opencode/skills/pactflowOpenCode will pick up the skills automatically — no restart required.
VS Code Copilot supports Agent Skills
natively. Skills are loaded from SKILL.md files in named subdirectories and invoked as slash commands
in Copilot Chat (/drift-testing, /openapi-parser). Copilot also auto-loads relevant skills based on context.
Copy the skill folders into any of the standard discovery locations — Copilot checks all of them:
# .github/skills (most common for GitHub projects)
mkdir -p .github/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing .github/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser .github/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow .github/skills/pactflow
# or .agents/skills
mkdir -p .agents/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing .agents/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser .agents/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow .agents/skills/pactflow
# or .claude/skills (already used by Claude Code)
mkdir -p .claude/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing .claude/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser .claude/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow .claude/skills/pactflowCommit the chosen directory to share the skills with your team. No VS Code configuration required.
Copy to a personal skills directory so the skills are available in every repo you open:
mkdir -p ~/.copilot/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing ~/.copilot/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser ~/.copilot/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow ~/.copilot/skills/pactflowPoint Copilot at any directory via VS Code settings:
{
"chat.agentSkillsLocations": ["/path/to/your/skills"]
}Once installed, open Copilot Chat and invoke a skill by name:
/drift-testing write a test case for POST /orders returning 201
/openapi-parser generate Drift tests for the payments spec
You can also type /skills in chat to browse and configure installed skills. Copilot will
auto-load a skill when it detects a relevant task even without an explicit slash command.
If your version of Copilot doesn't support Agent Skills yet, use custom instructions instead.
Repo-wide — applies to every conversation in the repository:
cat plugins/swagger-contract-testing/skills/drift-testing/SKILL.md plugins/swagger-contract-testing/skills/drift-testing/references/*.md >> .github/copilot-instructions.md
cat plugins/swagger-contract-testing/skills/openapi-parser/SKILL.md plugins/swagger-contract-testing/skills/openapi-parser/references/*.md >> .github/copilot-instructions.md
cat plugins/swagger-contract-testing/skills/pactflow/SKILL.md plugins/swagger-contract-testing/skills/pactflow/references/*.md >> .github/copilot-instructions.mdPath-scoped — loads only when relevant files are open:
# Drift — scoped to Drift config files
echo '---\napplyTo: "**/drift.yaml,**/*.tests.yaml,**/*.dataset.yaml"\n---\n' > .github/instructions/drift.instructions.md
cat plugins/swagger-contract-testing/skills/drift-testing/SKILL.md plugins/swagger-contract-testing/skills/drift-testing/references/*.md >> .github/instructions/drift.instructions.md
# OpenAPI Parser — scoped to OpenAPI spec files
echo '---\napplyTo: "**/openapi.yaml,**/openapi.json,**/*.oas.yaml"\n---\n' > .github/instructions/openapi-parser.instructions.md
cat plugins/swagger-contract-testing/skills/openapi-parser/SKILL.md plugins/swagger-contract-testing/skills/openapi-parser/references/*.md >> .github/instructions/openapi-parser.instructions.md
# PactFlow — scoped to Pact test files and pact config
echo '---\napplyTo: "**/*.pact.test.*,**/pacts/**,**/.pactrc*"\n---\n' > .github/instructions/pactflow.instructions.md
cat plugins/swagger-contract-testing/skills/pactflow/SKILL.md plugins/swagger-contract-testing/skills/pactflow/references/*.md >> .github/instructions/pactflow.instructions.mdReusable prompts — attach on demand in chat:
- Enable prompt files in VS Code settings:
{ "chat.promptFiles": true } - Create prompt files:
cat plugins/swagger-contract-testing/skills/drift-testing/SKILL.md plugins/swagger-contract-testing/skills/drift-testing/references/*.md > .github/prompts/drift.prompt.md cat plugins/swagger-contract-testing/skills/openapi-parser/SKILL.md plugins/swagger-contract-testing/skills/openapi-parser/references/*.md > .github/prompts/openapi-parser.prompt.md cat plugins/swagger-contract-testing/skills/pactflow/SKILL.md plugins/swagger-contract-testing/skills/pactflow/references/*.md > .github/prompts/pactflow.prompt.md
- In Copilot Chat, click Attach context → Prompt... and select the skill.
GitHub Copilot CLI supports plugins via the /plugin command (requires gh copilot v1+).
1. Add the marketplace:
copilot plugin marketplace add pactflow/pactflow-agent-skills2. Install the plugin:
copilot plugin install swagger-contract-testing@pactflow-agent-skillsOr install directly from the repo without adding a marketplace first:
copilot plugin install pactflow/pactflow-agent-skills3. Configure your PactFlow credentials in ~/.copilot/settings.json (or the equivalent config file for your environment):
{
"pluginConfigs": {
"swagger-contract-testing@pactflow-agent-skills": {
"options": {
"pact_broker_base_url": "https://yourorg.pactflow.io",
"pact_broker_token": "your-api-token"
}
}
}
}Cursor supports Agent Skills loaded from SKILL.md files in named subdirectories. Skills can be project-scoped or global.
- Open Cursor Settings → Rules
- Click Add Rule in Project Rules
- Select Remote Rule (GitHub)
- Enter the URL to each skill folder:
https://github.com/pactflow/pactflow-agent-skills/tree/main/plugins/swagger-contract-testing/skills/drift-testinghttps://github.com/pactflow/pactflow-agent-skills/tree/main/plugins/swagger-contract-testing/skills/openapi-parser
mkdir -p .cursor/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing .cursor/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser .cursor/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow .cursor/skills/pactflowCommit .cursor/skills/ to share the skills with your team. Cursor also discovers skills from .agents/skills/.
mkdir -p ~/.cursor/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing ~/.cursor/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser ~/.cursor/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow ~/.cursor/skills/pactflowWindsurf supports Skills loaded from SKILL.md files in named subdirectories. Skills can be workspace-scoped or global.
- Open the Cascade panel
- Click the ⋯ menu → Skills
- Choose + Workspace (project) or + Global
- Copy the contents of each
SKILL.mdinto the new skill
mkdir -p .windsurf/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing .windsurf/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser .windsurf/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow .windsurf/skills/pactflowCommit .windsurf/skills/ to share the skills with your team.
mkdir -p ~/.codeium/windsurf/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing ~/.codeium/windsurf/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser ~/.codeium/windsurf/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow ~/.codeium/windsurf/skills/pactflowCodex supports Skills loaded from SKILL.md files in named subdirectories, and a Plugin system with a .codex-plugin/plugin.json manifest for bundled installs.
The plugin manifest bundles all three skills together and wires up the SmartBear MCP server automatically.
1. Add the marketplace (repo-scoped, shared with your team):
The repo already ships a marketplace file at .agents/plugins/marketplace.json. Codex discovers it automatically when you open the project — no extra configuration needed.
2. Install the plugin using the built-in $plugin-creator skill or manually via the Codex plugin manager:
$plugin install swagger-contract-testing@pactflow-agent-skills
Or install directly from the repo:
$plugin install pactflow/pactflow-agent-skills
3. Configure your PactFlow credentials in ~/.codex/settings.json:
{
"pluginConfigs": {
"swagger-contract-testing@pactflow-agent-skills": {
"options": {
"pact_broker_base_url": "https://yourorg.pactflow.io",
"pact_broker_token": "your-api-token"
}
}
}
}Get your API token from https://yourorg.pactflow.io/settings/api-tokens. For an open-source Pact Broker, use pact_broker_username and pact_broker_password instead of pact_broker_token.
$skill-installer pactflow/pactflow-agent-skills/plugins/swagger-contract-testing/skills/drift-testing
$skill-installer pactflow/pactflow-agent-skills/plugins/swagger-contract-testing/skills/openapi-parser
$skill-installer pactflow/pactflow-agent-skills/plugins/swagger-contract-testing/skills/pactflowmkdir -p .agents/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing .agents/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser .agents/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow .agents/skills/pactflowCommit .agents/skills/ to share the skills with your team.
mkdir -p ~/.agents/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing ~/.agents/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser ~/.agents/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow ~/.agents/skills/pactflowThe swagger-contract-testing Power bundles the skills and SmartBear MCP server into a single install with automatic onboarding, credential validation, and smart task routing. See the Kiro Power page for full details.
Open the Agent Steering & Skills panel in Kiro, click +, choose Import a Power, select GitHub, and paste:
https://github.com/pactflow/pactflow-agent-skills/tree/main/powers/swagger-contract-testing
Set PACT_BROKER_BASE_URL and PACT_BROKER_TOKEN in your shell profile or Kiro's environment configuration before activating.
- Open the Agent Steering & Skills panel in Kiro
- Click + → Import a skill
- Select GitHub and paste the URL to each skill folder:
https://github.com/pactflow/pactflow-agent-skills/tree/main/plugins/swagger-contract-testing/skills/drift-testinghttps://github.com/pactflow/pactflow-agent-skills/tree/main/plugins/swagger-contract-testing/skills/openapi-parserhttps://github.com/pactflow/pactflow-agent-skills/tree/main/plugins/swagger-contract-testing/skills/pactflow
Imported skills are copied to your skills directory and work immediately.
mkdir -p .kiro/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing .kiro/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser .kiro/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow .kiro/skills/pactflowCommit .kiro/skills/ to share the skills with your team.
mkdir -p ~/.kiro/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing ~/.kiro/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser ~/.kiro/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow ~/.kiro/skills/pactflowWhen both locations contain a skill with the same name, the workspace skill takes priority.
Antigravity supports Agent Skills loaded from SKILL.md files in named subdirectories. Skills can be workspace-scoped or global.
mkdir -p .agents/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing .agents/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser .agents/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow .agents/skills/pactflowCommit .agents/skills/ to share the skills with your team.
mkdir -p ~/.gemini/antigravity/skills
cp -r plugins/swagger-contract-testing/skills/drift-testing ~/.gemini/antigravity/skills/drift-testing
cp -r plugins/swagger-contract-testing/skills/openapi-parser ~/.gemini/antigravity/skills/openapi-parser
cp -r plugins/swagger-contract-testing/skills/pactflow ~/.gemini/antigravity/skills/pactflowAntigravity also supports
.agent/skills/(singular) for backward compatibility.