PactFlow Agent Skills
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
Installation guide for Agentic IDEs/Coding agentsโ
- Quick install with
npx skills - Claude Code
- OpenCode
- GitHub Copilot (VS Code)
- GitHub Copilot CLI
- Cursor
- Windsurf
- Codex
- Kiro
- Antigravity
Quick install with npx skillsโ
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-skills
This installs the swagger-contract-testing skills for all detected agents in your project (Claude Code, Copilot, Cursor, Windsurf, Kiro, Codex, OpenCode, Antigravity, and more).
Windows usersโ
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.
Installing in Claude Codeโ
Claude Code supports Skills via a plugin marketplace system. Requires Claude Code v1.0.33+.
From this repo (recommended for teams)โ
Note: Because these skills are not listed in Anthropic's official plugin registry, the
.claude/settings.jsonconfiguration below is mandatory โ without it Claude Code won't know where to find the marketplace and the/plugin installcommands will fail.
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
From a local cloneโ
/plugin marketplace add ./path/to/pactflow-agent-skills/.claude-plugin/marketplace.json
/plugin install swagger-contract-testing@pactflow-agent-skills
For local development (no marketplace needed)โ
claude --plugin-dir ./plugins/swagger-contract-testing
Managing pluginsโ
/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
Installing in OpenCodeโ
OpenCode supports Agent Skills loaded from SKILL.md files in named subdirectories. The agent
automatically selects relevant skills based on task context.
Global install (available in all projects)โ
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/pactflow
Project-level install (this project only)โ
mkdir -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/pactflow
OpenCode will pick up the skills automatically โ no restart required.
Installing in GitHub Copilot (VS Code)โ
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.
Project-level install (recommended for teams)โ
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/pactflow
Commit the chosen directory to share the skills with your team. No VS Code configuration required.
Personal install (all your projects)โ
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/pactflow
Custom locationโ
Point Copilot at any directory via VS Code settings:
{
"chat.agentSkillsLocations": ["/path/to/your/skills"]
}
Using the skills in Copilot Chatโ
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.
Fallback: custom instructions (older Copilot versions)โ
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.md
Path-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.md
Reusable 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.
Installing in GitHub Copilot CLIโ
GitHub Copilot CLI supports plugins via the /plugin command (requires gh copilot v1+).
1. Add the marketplace:
copilot plugin marketplace add pactflow/pactflow-agent-skills
2. Install the plugin:
copilot plugin install swagger-contract-testing@pactflow-agent-skills
Or install directly from the repo without adding a marketplace first:
copilot plugin install pactflow/pactflow-agent-skills
3. 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"
}
}
}
}
Installing in Cursorโ
Cursor supports Agent Skills loaded from SKILL.md files in named subdirectories. Skills can be project-scoped or global.
Remote install from GitHubโ
- 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
Project-level install (manual)โ
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/pactflow
Commit .cursor/skills/ to share the skills with your team. Cursor also discovers skills from .agents/skills/.
Global install (all your projects)โ
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/pactflow
Installing in Windsurfโ
Windsurf supports Skills loaded from SKILL.md files in named subdirectories. Skills can be workspace-scoped or global.
From the UIโ
- Open the Cascade panel
- Click the โฏ menu โ Skills
- Choose + Workspace (project) or + Global
- Copy the contents of each
SKILL.mdinto the new skill
Project-level install (manual)โ
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/pactflow
Commit .windsurf/skills/ to share the skills with your team.
Global install (all your projects)โ
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/pactflow
Installing in Codexโ
Codex supports Skills loaded from SKILL.md files in named subdirectories, and a Plugin system with a .codex-plugin/plugin.json manifest for bundled installs.
Plugin install (recommended)โ
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.
Using the skill installerโ
$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/pactflow
Project-level install (manual)โ
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
Commit .agents/skills/ to share the skills with your team.
Global install (all your projects)โ
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
Installing in Kiroโ
Kiro Power (recommended)โ
The 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.
Import skills from GitHubโ
- 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.
Project-level install (manual)โ
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/pactflow
Commit .kiro/skills/ to share the skills with your team.
Global install (all your projects)โ
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/pactflow
When both locations contain a skill with the same name, the workspace skill takes priority.
Installing in Antigravityโ
Antigravity supports Agent Skills loaded from SKILL.md files in named subdirectories. Skills can be workspace-scoped or global.
Project-level install (recommended for teams)โ
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
Commit .agents/skills/ to share the skills with your team.
Global install (all your projects)โ
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/pactflow
Antigravity also supports
.agent/skills/(singular) for backward compatibility.