ln-643-api-contract-auditor

Audit API contracts for layer leakage, missing DTOs, and error inconsistencies.

Updated Dec 11, 2025
One-click install
npx skills add https://github.com/dorrio/sorteo-app-generator --skill ln-643-api-contract-auditor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ln-643-api-contract-auditor
Source: https://github.com/dorrio/sorteo-app-generator/tree/main/.agent/skills/ln-643-api-contract-auditor
Command: npx skills add https://github.com/dorrio/sorteo-app-generator --skill ln-643-api-contract-auditor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses common issues in API design that lead to maintainability problems and developer friction, such as layer leakage and inconsistent error handling.

Core Features & Use Cases

  • Layer Leakage Detection: Identifies when internal implementation details or entities leak into API method signatures.
  • DTO Validation: Checks for missing Data Transfer Objects (DTOs) where they are expected.
  • Error Contract Consistency: Ensures that API error responses are uniform and predictable.
  • Redundant Overload Detection: Flags unnecessary method overloads that can complicate the API surface.
  • Use Case: A team is developing a new microservice and wants to ensure its API is clean, maintainable, and follows best practices before it's widely adopted. This Skill can perform an automated audit to catch potential issues early.

Quick Start

Run the api contract auditor skill to check the current codebase for layer leakage and inconsistent error contracts.

Frequently Asked Questions about ln-643-api-contract-auditor

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

FAQPage Schema
How do I audit API contracts for layer leakage and entity exposure?

Auditing API contracts involves scanning method signatures to detect internal entity leakage and missing Data Transfer Objects (DTOs). It identifies design flaws where implementation details bleed into the API layer, yielding penalty-based diagnostic scores for actionable feedback.

What causes inconsistent API error contracts and how do I check for them?

Inconsistent API error contracts occur when error responses lack uniformity and predictability. You can check for them by running an automated audit that flags inconsistent error handling patterns and provides diagnostic sub-scores for targeted fixes.

How do I detect redundant method overloads in my API surface?

You detect redundant method overloads by auditing the API surface to flag unnecessary method overloads that complicate the design. The audit highlights these redundancies and calculates penalty-based scores to help streamline the API.

Can I use this API contract auditor for a new microservice codebase?

Yes, you can use this auditor for a new microservice codebase to ensure the API is clean, maintainable, and follows best practices. It performs automated checks for layer leakage and inconsistent error contracts before widespread adoption.

What is the best way to validate missing DTOs in an API layer?

The best way to validate missing Data Transfer Objects (DTOs) is to run an API contract audit that checks for expected DTOs. It catches missing DTOs in the API layer and provides diagnostic sub-scores to guide your corrections.

Why does entity leakage happen in API method signatures?

Entity leakage happens when internal database or domain entities are directly exposed in API method signatures instead of using Data Transfer Objects (DTOs). An audit detects this layer leakage and provides penalty-based findings to refactor the design.