api-contract-review

Audit REST API contracts for HTTP semantics, versioning, and backward compatibility.

70|22|Updated Jun 10, 2020
One-click install
npx skills add https://github.com/piomin/spring-boot-istio --skill api-contract-review-piomin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-contract-review
Source: https://github.com/piomin/spring-boot-istio/tree/main/.claude/skills/api-contract-review
Command: npx skills add https://github.com/piomin/spring-boot-istio --skill api-contract-review-piomin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps ensure your REST APIs are well-designed, consistent, and maintainable by automatically auditing them against best practices.

Core Features & Use Cases

  • HTTP Semantics Check: Verifies correct usage of HTTP verbs (GET, POST, PUT, PATCH, DELETE).
  • Versioning Audit: Checks for consistent API versioning strategies (e.g., in URL paths).
  • Request/Response Validation: Reviews DTO usage, response consistency, and pagination.
  • Error Handling Review: Ensures proper use of HTTP status codes and consistent error formats.
  • Backward Compatibility Analysis: Identifies potential breaking changes.
  • Use Case: Before merging a pull request that modifies API controllers, use this Skill to automatically flag any deviations from established RESTful design principles.

Quick Start

Use the api-contract-review skill to audit the API endpoints defined in the provided Java code.

Frequently Asked Questions about api-contract-review

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

FAQPage Schema
How do I audit REST API design for common anti-patterns in Java code?

This skill audits REST API contracts in Java code by checking HTTP semantics, versioning strategies, and error handling to identify anti-patterns like incorrect verb usage and missing versioning. It flags deviations from established design principles.

How do I check REST API versioning and backward compatibility before merging?

To check REST API versioning and backward compatibility before merging, this skill audits API controllers to verify consistent versioning strategies in URL paths and identifies potential breaking changes. It ensures adherence to HTTP semantics and best practices.

What REST API design best practices should I follow for error handling and status codes?

REST API design best practices for error handling require proper HTTP status codes and consistent error formats. This skill reviews your code to ensure correct status code usage, validates DTO responses, and flags improper error handling anti-patterns.

Can I use this API contract review on existing Java controllers or only new code?

You can use this API contract review on existing Java controllers and new code alike. It analyzes your Java code for API design best practices, checking request and response validation, pagination, and backward compatibility regardless of code age.

What's the best way to validate REST API request and response design for consistency?

The best way to validate REST API request and response design is auditing DTO usage and response consistency. This skill reviews your API contracts to ensure consistent responses, proper pagination, and adherence to RESTful design principles.