Skip to main content

Drift AI Agent Skills

The pact-agentic-tooling-extensions repository provides two AI agent skills for use with Drift:

SkillPlugin nameWhat it does
Driftswagger-contract-testing-driftExpert assistant for Drift — PactFlow's OpenAPI contract testing CLI. Helps write test cases, configure lifecycle hooks, debug failures, and publish results to PactFlow.
OpenAPI Parserswagger-contract-testing-openapi-parserParses complex OpenAPI specs (anyOf/oneOf/allOf, discriminators, polymorphism, $ref chains, enums, regex) and generates Drift test cases covering every viable schema combination.

The two skills are designed to work together: OpenAPI Parser analyses a spec and generates test case scaffolding; Drift runs, iterates, and publishes those tests.

When to use these skills​

Use these skills when you want to:

  • Generate initial Drift tests from an OpenAPI spec
  • Expand coverage incrementally with negative and auth scenarios
  • Audit existing tests for coverage gaps
  • Keep test suites maintainable as specs evolve

Installation​

Installation steps depend on your AI coding agent. Select your agent below.

Claude Code​

Claude Code supports skills via a plugin marketplace. Requires Claude Code v1.0.33+.

Recommended: install from the marketplace

  1. Add the marketplace inside a Claude Code session:

    /plugin marketplace add pactflow/pact-agentic-tooling-extensions

    Alternatively, add the following to .claude/settings.json so teammates are prompted to install automatically when they open the project:

    {
    "extraKnownMarketplaces": {
    "pact-agentic-tooling-extensions": {
    "source": {
    "source": "github",
    "repo": "pactflow/pact-agentic-tooling-extensions"
    }
    }
    }
    }
  2. Install both plugins:

    /plugin install swagger-contract-testing-drift@pact-agentic-tooling-extensions
    /plugin install swagger-contract-testing-openapi-parser@pact-agentic-tooling-extensions

Scope options

ScopeStored inWho it applies to
user (default)~/.claude/settings.jsonYou, across all projects
project.claude/settings.jsonEveryone on the team (commit this file)
local.claude/settings.local.jsonYou, in this project only (gitignored)

Install from a local clone

/plugin marketplace add ./path/to/pact-agentic-tooling-extensions/.claude-plugin/marketplace.json
/plugin install swagger-contract-testing-drift@pact-agentic-tooling-extensions
/plugin install swagger-contract-testing-openapi-parser@pact-agentic-tooling-extensions

Managing installed plugins

/plugin                          # open plugin manager
/reload-plugins # reload without restarting
/plugin disable swagger-contract-testing-drift@pact-agentic-tooling-extensions
/plugin uninstall swagger-contract-testing-drift@pact-agentic-tooling-extensions

GitHub Copilot (VS Code)​

Skills are loaded from SKILL.md files in named subdirectories and invoked as slash commands in Copilot Chat (/drift, /openapi-parser).

Project-level install (recommended for teams)

Copy the skill folders into one of the standard discovery locations:

# .github/skills (most common for GitHub projects)
mkdir -p .github/skills
cp -r skills/drift .github/skills/drift
cp -r skills/openapi-parser .github/skills/openapi-parser

Commit the chosen directory to share the skills with your team.

Personal install (all your projects)

mkdir -p ~/.copilot/skills
cp -r skills/drift ~/.copilot/skills/drift
cp -r skills/openapi-parser ~/.copilot/skills/openapi-parser

Custom location

Point Copilot at any directory via VS Code settings:

{
"chat.agentSkillsLocations": ["/path/to/your/skills"]
}

Once installed, invoke a skill in Copilot Chat:

/drift write a test case for POST /orders returning 201
/openapi-parser generate Drift tests for the payments spec

OpenCode​

Skills are loaded from SKILL.md files in named subdirectories. OpenCode selects relevant skills automatically based on task context.

Global install (all projects)

cp -r skills/drift ~/.config/opencode/skills/drift
cp -r skills/openapi-parser ~/.config/opencode/skills/openapi-parser

Project-level install

mkdir -p .opencode/skills
cp -r skills/drift .opencode/skills/drift
cp -r skills/openapi-parser .opencode/skills/openapi-parser

Cursor​

Remote install from GitHub

  1. Open Cursor Settings > Rules.
  2. Click Add Rule in Project Rules.
  3. Select Remote Rule (GitHub).
  4. Enter the URL for each skill folder:
    • https://github.com/pactflow/pact-agentic-tooling-extensions/tree/main/skills/drift
    • https://github.com/pactflow/pact-agentic-tooling-extensions/tree/main/skills/openapi-parser

Project-level install (manual)

mkdir -p .cursor/skills
cp -r skills/drift .cursor/skills/drift
cp -r skills/openapi-parser .cursor/skills/openapi-parser

Global install (all projects)

mkdir -p ~/.cursor/skills
cp -r skills/drift ~/.cursor/skills/drift
cp -r skills/openapi-parser ~/.cursor/skills/openapi-parser

Windsurf​

From the UI

  1. Open the Cascade panel.
  2. Click the ... menu > Skills.
  3. Choose + Workspace (project) or + Global.
  4. Copy the contents of each SKILL.md into the new skill.

Project-level install (manual)

mkdir -p .windsurf/skills
cp -r skills/drift .windsurf/skills/drift
cp -r skills/openapi-parser .windsurf/skills/openapi-parser

Global install (all projects)

mkdir -p ~/.codeium/windsurf/skills
cp -r skills/drift ~/.codeium/windsurf/skills/drift
cp -r skills/openapi-parser ~/.codeium/windsurf/skills/openapi-parser

Codex​

Using the skill installer

$skill-installer pactflow/pact-agentic-tooling-extensions/skills/drift
$skill-installer pactflow/pact-agentic-tooling-extensions/skills/openapi-parser

Project-level install (manual)

mkdir -p .agents/skills
cp -r skills/drift .agents/skills/drift
cp -r skills/openapi-parser .agents/skills/openapi-parser

Global install (all projects)

mkdir -p ~/.agents/skills
cp -r skills/drift ~/.agents/skills/drift
cp -r skills/openapi-parser ~/.agents/skills/openapi-parser

Kiro​

Import from GitHub (recommended)

  1. Open the Agent Steering & Skills panel in Kiro.
  2. Click + > Import a skill.
  3. Select GitHub and paste the URL for each skill folder:
    • https://github.com/pactflow/pact-agentic-tooling-extensions/tree/main/skills/drift
    • https://github.com/pactflow/pact-agentic-tooling-extensions/tree/main/skills/openapi-parser

Project-level install (manual)

mkdir -p .kiro/skills
cp -r skills/drift .kiro/skills/drift
cp -r skills/openapi-parser .kiro/skills/openapi-parser

Global install (all projects)

mkdir -p ~/.kiro/skills
cp -r skills/drift ~/.kiro/skills/drift
cp -r skills/openapi-parser ~/.kiro/skills/openapi-parser

When both locations contain a skill with the same name, the workspace skill takes priority.


Skill contents​

The skills repository has the following structure:

skills/
├── drift/
│ ├── SKILL.md # Drift CLI usage, test case patterns, auth, CI/CD
│ ├── references/
│ │ ├── test-cases.md # Full test case YAML schema
│ │ ├── lua-api.md # Complete Lua API and lifecycle hooks
│ │ ├── cli-reference.md # All CLI commands and flags
│ │ ├── auth.md # Authentication patterns and credential handling
│ │ ├── mock-server.md # Mock server setup and configuration
│ │ └── pactflow-and-cicd.md # BDCT publishing, GitHub Actions, GitLab CI
│ └── scripts/
│ ├── check_coverage.py # Coverage analysis script
│ ├── extract_endpoints.py # Extract endpoints from OpenAPI specs
│ ├── run_loop.sh # Feedback loop runner (macOS/Linux)
│ ├── run_loop.ps1 # Feedback loop runner (Windows)
│ ├── start_mock.sh # Start mock server (macOS/Linux)
│ └── start_mock.ps1 # Start mock server (Windows)
│
└── openapi-parser/
├── SKILL.md # Workflow: locate, resolve, enumerate, generate
└── references/
├── schema-patterns.md # anyOf/oneOf/allOf/discriminator/$ref/enum/pattern/nullable
└── drift-mapping.md # Mapping every pattern to Drift YAML with full examples

Windows users​

The install commands on this page use Unix shell syntax. In PowerShell, replace:

UnixPowerShell
mkdir -p path/to/dirNew-Item -ItemType Directory -Force -Path path\to\dir
cp -r skills/drift path/to/dirCopy-Item -Recurse skills\drift path\to\dir

~ (home directory) works in PowerShell 3+. In older environments use $HOME instead.