All skills
simota avatar

/radar

@e307415
by shingo imotasimota/agent-skills85 stars
15

Adding edge-case tests, repairing flaky tests, and improving coverage. Use when test gaps need filling or regressions need guarding. Supports JS/TS, Python, Go, Rust, and Java.

Use this Skill: https://skilld.dev/gh/simota/agent-skills/radar

This session only. Nothing lands on disk.

referencecontract-multiservice-testing.md

≈768 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Contract & Multi-Service Testing

Purpose: Use this when Radar must verify service boundaries, schema compatibility, or real dependency interactions without escalating into full user-journey E2E testing.

Contents:

  • Agent boundary
  • REST and Pact
  • gRPC and buf
  • GraphQL contracts
  • Event-driven schemas
  • Testcontainers and stubs
  • Multi-service decision rules

Agent Boundary

Scope Owner
Unit-level service contracts Radar
Service integration with real dependencies Radar
Full stack or browser-wide end-to-end validation Voyager

REST API Contract Testing (Pact)

Use Pact when a consumer and provider must evolve independently.

Core steps:

  1. Define consumer expectations.
  2. Verify the provider against the pact file.
  3. Publish or compare contracts in CI if multiple teams are involved.

gRPC Contract Testing

Must-Keep Commands

buf lint
buf breaking --against '.git#branch=main'
buf generate

Compatibility Matrix

Check Tool When
Wire compatibility buf breaking Every PR
Linting buf lint Every PR
Code generation buf generate On proto change
Mock generation nice-grpc / grpcmock Test setup

GraphQL Contract Testing

Use schema-first validation when queries, mutations, or federation boundaries are shared.

Must-Keep Commands

npm install -D @graphql-inspector/cli
npx graphql-inspector diff schema-main.graphql schema-pr.graphql
npx graphql-inspector validate './src/**/*.graphql' schema.graphql

Event-Driven Contract Testing

Use AsyncAPI plus schema validation when the boundary is a message rather than a request-response API.

Recommended stack:

  • AsyncAPI document for the channel contract
  • Ajv for schema validation
  • Kafka integration tests only when broker behavior matters

Testcontainers Deep Patterns

Reuse Strategy

Strategy Use case Tradeoff
Per-test Maximum isolation Slow
Per-suite Reasonable default State leak risk
Per-run Maximum speed Cleanup discipline required
Reusable Local development only Manual cleanup risk

Use LocalStack when AWS behavior matters but a real AWS account would add cost or instability.

Multi-Service Integration Patterns

Pattern Tool Use when
Service stub WireMock / MSW One boundary should stay fake
Real service dependency Testcontainers DB, broker, cache, or AWS-emulator semantics matter
Saga test Orchestrated integration test Compensation and sequence logic matter

Decision Rule

Boundary Preferred approach
REST Pact or OpenAPI diff
gRPC buf breaking plus targeted mocks
GraphQL Schema diff plus operation validation
Event bus AsyncAPI plus payload validation
Real dependency behavior Testcontainers
Full multi-service flow Hand off to Voyager if it becomes an end-to-end user journey

Source: SKILL.md on GitHub

1 warning13d5 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    The 'radar' skill is a comprehensive testing assistant designed to improve code reliability through various testing methodologies such as unit, integration, and mutation testing. It follows industry best practices and uses standard tooling. A low-severity finding is noted regarding the inherent risk of indirect prompt injection when the agent processes project source code, which is mitigated by strong requirements for test isolation and independent verification.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

  • Runlayer6mo

    4/14 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e307415. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 weeks ago

README badge

README badge for simota/agent-skills/radar