drift-testing

drift-testing is a skill for Claude Code, Codex from pactflow/pactflow-agent-skills. It costs 158 tokens per session (3,526 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 CodeCodex

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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

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

Made for: Claude Code, Codex.

Or install swagger-contract-testing, the plugin that ships this one along with the rest of its 2 skills, 5 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 158 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,526 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00158 $0.03526
Opus 5 $0.00079 $0.01763
Sonnet 5 $0.00032 $0.00705
Haiku 4.5 $0.00016 $0.00353

Measured 5d ago against content hash 0346ba7fae61, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/check_coverage.py, scripts/extract_endpoints.py, scripts/run_loop.ps1, …), 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 · 378 lines

How it starts

The opening of the file, as written. The whole thing — 378 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/check_coverage.py — Coverage checker: diffs an OpenAPI spec against Drift test files and reports which operations and response codes are missing tests. 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.

Full docs: https://support.smartbear.com/swagger/contract-testing/docs/en/drift.html To discover all available pages, fetch the sitemap: https://support.smartbear.com/swagger/contract-testing/docs/sitemap.xml

Read the full file on GitHub · 378 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. 5d 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 (6 stars, last pushed 5d ago), licensed MIT. It adds 158 tokens to every session and 3,526 once invoked, about $0.0008 per session on Opus 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.

Related

Other skills, from other repositories

codex-setup

Initialize sd0x-dev-flow infrastructure for Codex CLI and other non-Claude agents. Generates AGENTS.md, installs the commit-msg hook, copies runner scripts. The pre-push gate is opt-in via --with-push-gate. Use when setting up a new project or after updating skills.

sd0xdev/sd0x-harness · 65 tokens

codex-implement

Implement features via Codex exec. Use when: writing new code from specs, implementing features, Codex-driven development. Not for: code review (use codex-code-review), architecture advice (use codex-architect). Output: implemented code + review loop.

sd0xdev/sd0x-harness · 58 tokens

smart-rebase

Smart partial rebase for squash-merge repositories. Auto-detect which commits to keep/drop when base branch was squash-merged into target. Use when: user says 'rebase', 'partial rebase', 'base already merged', 'smart rebase', or /smart-rebase. Not for: simple git rebase (the developer runs it — Claude never executes…

sd0xdev/sd0x-harness · 131 tokens

orchestrate

Agent-driven workflow orchestration (v1 report-only). Use when: declaring an intent (audit/research/feature shape) and wanting a planner agent to derive the skill workflow, preview it, and run read-only fanout with fail-closed no-change verification. Not for: executing mutating steps (v1 emits them as…

sd0xdev/sd0x-harness · 107 tokens

recap-doc

Post-development recap document generator. Use when: AI/Codex has implemented a feature and the user needs a guided walkthrough of what changed and why, with blind-spot detection and anticipated questions. Not for: Q&A follow-up (use /recap-ask), technical share-out for teammates (use /tech-brief), or generic code…

sd0xdev/sd0x-harness · 114 tokens

runbook

Generate and update feature release runbooks from existing docs and codebase. Use when: creating operational runbook, release handbook, deployment checklist, pre-release preparation. Not for: incident response (v2), code review (use codex-code-review), architecture design (use architecture).

sd0xdev/sd0x-harness · 59 tokens