levels-service

Guides component, contract, and API schema testing for independently deployable services.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/Hakkadaikon/hymme --skill levels-service-hakkadaikon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: levels-service
Source: https://github.com/Hakkadaikon/hymme/tree/main/skills/levels-service
Command: npx skills add https://github.com/Hakkadaikon/hymme --skill levels-service-hakkadaikon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing and executing the right test level for a service treated as an independently deployable unit is hard: teams either over-test internals or ship with unverified inter-service contracts. This Skill defines how to verify a service's external behavior with stubbed dependencies, lock down inter-service API compatibility with consumer-driven contracts, and check structural conformance to OpenAPI/JSON Schema definitions. ## Core Features & Use Cases - Component Testing: Enumerate a service's public operations, stub only external dependencies, and verify representative success and failure cases with real internal logic. - Consumer-Driven Contract Testing (Pact): Fix the consumer's actual expectations as pact files, verify them in the provider's CI, and manage compatibility with a consumer/provider version matrix. - API Schema Validation: Validate real requests and responses against OpenAPI/JSON Schema using validators like Ajv, keeping implementation from drifting away from declared schemas. - Use Case: A team splitting a monolith into microservices uses this Skill to write Pact contracts for each cross-service call, run provider verification in CI, and confirm via can-i-deploy that no incompatible version pair ships. ## Quick Start Ask the AI to apply the levels-service testing guidance to design component and contract tests for your service's public API endpoints.

Frequently Asked Questions about levels-service

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a component test for a service?

Enumerate the service's public endpoints or commands, stub only process-external dependencies like payment APIs, and keep internal logic real. Write one success and one meaningful failure case per operation, and stop when all public operations are covered.

How do I set up consumer-driven contract testing with Pact?

List every endpoint the consumer actually calls, fix required fields with concrete examples rather than loose type matchers, and generate pact files. Then add a provider CI job that verifies real responses against those pacts, since unverified pacts are just mock configurations.

What is the difference between contract testing and API schema validation?

Contract testing with Pact fixes the values a specific consumer actually depends on, driven by the consumer. Schema validation checks structural conformance to declared OpenAPI or JSON Schema types and required fields, driven by the schema. They are complementary and can be used together.

When should I not use contract testing?

Skip it for calls within a single process or for stable APIs that rarely change, where the overhead is excessive. It targets microservice or team-split setups where you must guarantee compatibility without running the other side.

Why do component tests pass but production breaks?

Stubs returning shapes that drift from the real API cause green tests that fail in production. Back every stub's return shape with a corresponding pact contract so the provider side verifies the assumed structure.