drift-testing

drift-testing is a skill for Claude Code from pactflow/pactflow-agent-skills. It costs 203 tokens per session (5,340 once invoked), scanned A, original, MIT.

A testing skill that checks an API implementation against its OpenAPI specification using the Drift command-line tool. OpenAPI is a machine-readable description of an API's endpoints, inputs, and responses.

In plain words
What is it for?
Use it for API conformance checks, provider contract testing, spec-drift detection, test scaffolding, authentication cases, local mock-server testing, and CI publishing workflows.
Why use it?
It finds differences between the documented API and the running implementation, including missing test coverage and contract violations.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is path: ./asyncapi/<service>.asyncapi.yaml.

Part of the swagger-contract-testing plugin — 6 skills, 6 agents, 2 hooks, 1 MCP server shipped together

Good fit Use it for API conformance checks, provider contract testing, spec-drift detection, test scaffolding, authentication cases, local mock-server testing, and CI publishing workflows.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/pactflow/pactflow-agent-skills
agentmods
npx agentmods add skills/pactflow/pactflow-agent-skills/drift-testing

Made for: Claude Code.

Or install swagger-contract-testing, the plugin that ships this one along with the rest of its 6 skills, 6 agents, 2 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for drift-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/pactflow/pactflow-agent-skills/drift-testing/github.svg)](https://agentmods.dev/skills/pactflow/pactflow-agent-skills/drift-testing)
Your own site
<a href="https://agentmods.dev/skills/pactflow/pactflow-agent-skills/drift-testing"><img src="https://agentmods.dev/badge/skills/pactflow/pactflow-agent-skills/drift-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for drift-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/pactflow/pactflow-agent-skills/drift-testing"><img src="https://agentmods.dev/badge/skills/pactflow/pactflow-agent-skills/drift-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 203 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,340 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 12 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 212
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium MCP Rug Pull · line 58
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium Data Exfiltration · line 127
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 130
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 133
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 136
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 137
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 285
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 291
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 294
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 347
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Prompt Injection · line 307
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00203 $0.05340
Opus 5.5 $0.00081 $0.02136
Sonnet 5.5 $0.00041 $0.01068
Haiku 4.5 $0.00020 $0.00534

Measured 24d ago against content hash 54569d272c7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

drift-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 24d ago.

The scan reads SKILL.md. This mod also ships 9 executable files (scripts/asyncapi_targets.py, scripts/check_coverage.py, scripts/extract_channels.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/swagger-contract-testing/skills/drift-testing/SKILL.md · 527 lines

How it starts

The opening of the file, as written. The whole thing — 527 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Drift Skill

Never modify the openapi spec that you are testing.

Reference Files

Scripts

  • scripts/extract_endpoints.py — Reads the spec and outputs all operations + response codes. Summary mode flags parameters with no spec example. Scaffold mode (--scaffold) emits a ready-to-fill operations: YAML block with correct auth patterns, nil UUIDs for 404s, ignore.schema for 4xx, and FILL_IN markers. Use --only-missing <drift.yaml> to generate only the gaps not yet covered by an existing test file. Requires pyyaml.
  • scripts/extract_channels.py — AsyncAPI equivalent of extract_endpoints.py. Reads an AsyncAPI 3.x spec and outputs all operations with their action type (send/receive), execution mode (async-observe / async-inject / async-request-reply), and channel address. Scaffold mode (--scaffold) emits ready-to-fill Drift operations: YAML stubs with the correct trigger/probe structure per mode. Use --only-missing <drift.yaml> to scaffold only operations not yet covered. Requires pyyaml. AsyncAPI 3.x only.
  • scripts/check_coverage.py — Coverage checker: diffs an OpenAPI or AsyncAPI spec against Drift test files. OpenAPI coverage tracks operations and response codes; AsyncAPI coverage tracks each operation/message target. Requires pyyaml.
  • scripts/run_loop.sh / scripts/run_loop.ps1 — Feedback loop runner: retries drift verify --failed until all tests pass, then runs check_coverage.py. Both gates must pass for exit 0. Dependencies are installed automatically via uv. Use the .ps1 version on Windows.
  • scripts/start_mock.sh / scripts/start_mock.ps1 — Starts a Prism mock server from an OpenAPI spec. Installs Prism if needed. Supports --port and --dynamic flags. Use the .ps1 version on Windows.

Read the full file on GitHub · 527 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 24d ago Changed · +149 lines · +45 tokens per session 54569d272c7d
  2. 1mo ago First seen · 378 lines · 158 tokens per session scan A 0346ba7fae61

Subscribe to this mod's changes

drift-testing is a skill published in the GitHub repository pactflow/pactflow-agent-skills (7 stars, last pushed today), licensed MIT. It adds 203 tokens to every session and 5,340 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.