AGENT SKILL

validating-api-contracts

Validate API contracts using consumer-driven contract testing (Pact, Spring Cloud Contract). Use when performing specialized testing. Trigger with phrases like "validate API contract", "run contract tests", or "check consumer contracts".

License 许可
MIT
最近更新
2026-11-11
Stars
★ 2.0k
Forks
231

01 前言 Front Matter

name
validating-api-contracts
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
version
1.0.0
description
Validate API contracts using consumer-driven contract testing (Pact, Spring Cloud Contract). Use when performing specialized testing. Trigger with phrases like "validate API contract", "run contract tests", or "check consumer contracts".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(test:contract-*)

02 资源文件 8

03 SKILL.md 正文

Contract Test Validator

This skill provides automated assistance for contract test validator tasks.

Prerequisites

Before using this skill, ensure you have:

  • Test environment configured and accessible
  • Required testing tools and frameworks installed
  • Test data and fixtures prepared
  • Appropriate permissions for test execution
  • Network connectivity if testing external services

Instructions

Step 1: Prepare Test Environment

Set up the testing context:

  1. Use Read tool to examine configuration from {baseDir}/config/
  2. Validate test prerequisites are met
  3. Initialize test framework and load dependencies
  4. Configure test parameters and thresholds

Step 2: Execute Tests

Run the test suite:

  1. Use Bash(test:contract-*) to invoke test framework
  2. Monitor test execution progress
  3. Capture test outputs and metrics
  4. Handle test failures and error conditions

Step 3: Analyze Results

Process test outcomes:

  • Identify passed and failed tests
  • Calculate success rate and performance metrics
  • Detect patterns in failures
  • Generate insights for improvement

Step 4: Generate Report

Document findings in {baseDir}/test-reports/:

  • Test execution summary
  • Detailed failure analysis
  • Performance benchmarks
  • Recommendations for fixes

Output

The skill generates comprehensive test results:

Test Summary

  • Total tests executed
  • Pass/fail counts and percentage
  • Execution time metrics
  • Resource utilization stats

Detailed Results

Each test includes:

  • Test name and identifier
  • Execution status (pass/fail/skip)
  • Actual vs. expected outcomes
  • Error messages and stack traces

Metrics and Analysis

  • Code coverage percentages
  • Performance benchmarks
  • Trend analysis across runs
  • Quality gate compliance status

Error Handling

Common issues and solutions:

Environment Setup Failures

  • Error: Test environment not properly configured
  • Solution: Verify configuration files; check environment variables; ensure dependencies are installed

Test Execution Timeouts

  • Error: Tests exceeded maximum execution time
  • Solution: Increase timeout thresholds; optimize slow tests; parallelize test execution

Resource Exhaustion

  • Error: Insufficient memory or disk space during testing
  • Solution: Clean up temporary files; reduce concurrent test workers; increase resource allocation

Dependency Issues

  • Error: Required services or databases unavailable
  • Solution: Verify service health; check network connectivity; use mocks if services are down

Resources

Testing Tools

  • Industry-standard testing frameworks for your language/platform
  • CI/CD integration guides and plugins
  • Test automation best practices documentation

Best Practices

  • Maintain test isolation and independence
  • Use meaningful test names and descriptions
  • Keep tests fast and focused
  • Implement proper setup and teardown
  • Version control test artifacts
  • Run tests in CI/CD pipelines

Overview

This skill provides automated assistance for contract test validator tasks. This skill provides automated assistance for the described functionality.

Examples

Example usage patterns will be demonstrated in context.

04 同仓库更多 Skills

Dicklesworthstone
Dicklesworthstone/pi_agent_rust

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

前端开发
★ 2.0k
Dicklesworthstone
Dicklesworthstone/pi_agent_rust

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

测试与质量前端开发
★ 2.0k
Dicklesworthstone
Dicklesworthstone/pi_agent_rust

neuropixels-analysis

Neuropixels neural recording analysis. Load SpikeGLX/OpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen/IBL curation, AI-assisted visual analysis, for Neuropixels 1.0/2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.

★ 2.0k
Dicklesworthstone
Dicklesworthstone/pi_agent_rust

skill-creator

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

Skill与智能体开发
★ 2.0k
Dicklesworthstone
Dicklesworthstone/pi_agent_rust

notebooklm

Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.

Skill与智能体开发
★ 2.0k
Dicklesworthstone
Dicklesworthstone/pi_agent_rust

slack-gif-creator

Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."

邮件与沟通图像与多媒体
★ 2.0k