Api contract tester
Skill AtulPurohit/Antigravity-Awesome-Skills/plugins/dx-qa-automation/skills/api-contract-tester
Installable GitHub library of 300+ professional agentic skills for Claude Code, Antigravity IDE, Gemini CLI, Cursor, and Copilot. Features a custom NPX installer, 9 stack-specific bundles, validation schemas, security auditing, and an interactive catalog explorer app.
npx -y skills add AtulPurohit/Antigravity-Awesome-Skills --skill api-contract-testerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 26 days oldThe repository was created 26 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Implement consumer-driven contract testing with Pact to ensure API compatibility.
SKILL.md
1.8 KB, as published. Nobody here has run it
API Contract Tester
Purpose
Prevent API breaking changes from reaching production by testing contracts between services.
Pact Contract Testing
Consumer Test
const { Pact, like, term } = require('@pact-foundation/pact');
const provider = new Pact({ consumer: 'WebApp', provider: 'UsersAPI', port: 1234 });
test('GET /users/:id returns user', async () => {
await provider.addInteraction({
state: 'user 123 exists',
uponReceiving: 'a request for user 123',
withRequest: { method: 'GET', path: '/users/123', headers: { Accept: 'application/json' } },
willRespondWith: {
status: 200,
body: {
id: '123',
email: like('[email protected]'),
name: like('John Doe'),
role: term({ generate: 'user', matcher: '^(user|admin)$' }),
},
},
});
const user = await UserService.getUser('123');
expect(user.id).toBe('123');
});
Provider Verification
test('verifies consumers', () =>
new Verifier({
provider: 'UsersAPI',
providerBaseUrl: 'http://localhost:3000',
pactUrls: ['./pacts/WebApp-UsersAPI.json'],
stateHandlers: {
'user 123 exists': () => db.users.upsert({ id: '123', email: '[email protected]' }),
},
}).verifyProvider()
);
Outputs
- Consumer pact tests
- Provider verification setup
- Pact broker configuration
- CI/CD contract testing integration
- Contract versioning strategy