Agent skill

Validating API Responses

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Validate API responses against schemas to ensure contract compliance and data integrity.

MITAuto-check passedBackend & APIs

Install Validating API Responses

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill validating-api-responses -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace validating-api-responses --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/validating-api-responses .claude/skills/validating-api-responses && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
validating-api-responses
GitHub stars
2.8k
Token cost
~1.4k tokens
SKILL.md length
584 words
Files
4 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Validate API responses against schemas to ensure contract compliance and data integrity.

  • Works in 8 steps: Read the OpenAPI specification using… → Compile JSON Schema validators for each… → Implement response validation middleware… → …
  • Ensuring API response correctness
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Validating API Responses is an agent skill from jeremylongshore/tons-of-skills-marketplace. Validate API responses against schemas to ensure contract compliance and data integrity. Use when ensuring API response correctness. Trigger with phrases like "validate responses", "check API responses", or "verify response format".

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/errors.md`, `references/examples.md` and `references/implementation.md`). Compatibility notes: Designed for Claude Code

It sits in Backend & APIs, covering Structured output and tool calling. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Ensuring API response correctness
  • With phrases like validate responses
  • Check API responses
  • Verify response format

Example prompts

  • “validate responses”
  • “check API responses”
  • “verify response format”
  • “/validating-api-responses”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(api:validate-*)

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Read the OpenAPI specification using Read and extract all response schemas per endpoint, including success responses (200, 201), error…
  2. Compile JSON Schema validators for each endpoint-status combination, enabling strict mode (additionalProperties: false) to detect…
  3. Implement response validation middleware that intercepts outgoing responses and validates the body against the corresponding schema…
  4. Configure validation strictness per environment: strict (fail on violation) in development/staging, warn (log only) in production, with…
  5. Add header validation to verify required response headers (Content-Type, Cache-Control, rate limit headers) match the OpenAPI specification.
  6. Build a contract test suite that sends representative requests to each endpoint and validates every response field, including nested…
  7. Implement schema drift detection that compares the current response shape against the documented schema after each deployment, alerting…
  8. Generate a validation coverage report showing which endpoints and response codes have schema validation, identifying gaps in the…

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(api:validate-*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • json-schema.org
    • ajv.js.org
    • pact.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Validating API Responses loads about 1.4k tokens when it runs, and up to ~3.5k if it reads all its reference files. Until then it costs about 64 tokens; SKILL.md has 584 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 584 words, ~1,372 tokens.

Download SKILL.mdSave it as .claude/skills/validating-api-responses/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
validating-api-responses
description
Validate API responses against schemas to ensure contract compliance and data integrity. Use when ensuring API response correctness. Trigger with phrases like "validate responses", "check API responses", or "verify response format".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(api:validate-*)
compatibility
Designed for Claude Code
version
1.24.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
api, compliance, validating-api

Validating API Responses

Overview

Validate API responses against OpenAPI schemas, JSON Schema definitions, and contract specifications to detect data integrity violations, schema drift, and backward compatibility regressions. Run validation in middleware (development/staging) or as post-deployment contract tests to ensure every response conforms to the documented API contract.

Prerequisites

  • OpenAPI 3.0+ specification with complete response schema definitions for all endpoints
  • JSON Schema validator: Ajv (Node.js), jsonschema (Python), or everit-org/json-schema (Java)
  • Response validation middleware or test harness integrated into CI pipeline
  • API test client for exercising endpoints and capturing response bodies
  • Schema diff tool for detecting contract changes between versions

Instructions

  1. Read the OpenAPI specification using Read and extract all response schemas per endpoint, including success responses (200, 201), error responses (400, 404, 500), and header definitions.
  2. Compile JSON Schema validators for each endpoint-status combination, enabling strict mode (additionalProperties: false) to detect undocumented fields leaking into responses.
  3. Implement response validation middleware that intercepts outgoing responses and validates the body against the corresponding schema, logging violations without blocking responses in production.
  4. Configure validation strictness per environment: strict (fail on violation) in development/staging, warn (log only) in production, with violation metrics emitted for monitoring.
  5. Add header validation to verify required response headers (Content-Type, Cache-Control, rate limit headers) match the OpenAPI specification.
  6. Build a contract test suite that sends representative requests to each endpoint and validates every response field, including nested objects, arrays, enums, nullable fields, and format constraints (date-time, email, URI).
  7. Implement schema drift detection that compares the current response shape against the documented schema after each deployment, alerting when undocumented fields appear or documented fields disappear.
  8. Generate a validation coverage report showing which endpoints and response codes have schema validation, identifying gaps in the specification.

See ${CLAUDE_SKILL_DIR}/references/implementation.md for the full implementation guide.

Output

  • ${CLAUDE_SKILL_DIR}/src/middleware/response-validator.js - Response schema validation middleware
  • ${CLAUDE_SKILL_DIR}/src/validators/ - Compiled JSON Schema validators per endpoint
  • ${CLAUDE_SKILL_DIR}/tests/contract/ - Contract test suite validating all endpoint responses
  • ${CLAUDE_SKILL_DIR}/reports/validation-coverage.md - Schema coverage report per endpoint and status code
  • ${CLAUDE_SKILL_DIR}/reports/schema-drift.json - Detected undocumented response field changes
  • ${CLAUDE_SKILL_DIR}/src/config/validation.js - Per-environment validation strictness configuration
Show full SKILL.md (246 more words)Show less

Error Handling

ErrorCauseSolution
Additional property detectedResponse contains field not defined in schemaAdd field to schema if intentional; remove from serializer if data leak; configure additionalProperties
Type mismatchField returns string instead of documented integer (or vice versa)Fix serializer to match schema type; add type coercion test; check ORM field mapping
Required field missingResponse omits a field marked required in schemaVerify database query includes the field; check conditional serialization logic
Null value on non-nullableField returns null but schema does not include nullable: trueUpdate schema to allow null, or fix data source to guarantee non-null values
Format validation failureDate field does not match RFC 3339 format or email field format invalidApply format serialization at the ORM/model level before response construction

Refer to ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive error patterns.

Examples

CI contract gate: On every pull request, run contract tests that validate all endpoint responses against the OpenAPI spec, failing the build if any response violates the documented schema.

Production response sampling: In production, validate 5% of responses against schemas (sampled randomly), emitting response_validation_failure metrics to detect schema drift caused by data changes.

Backward compatibility check: Compare v1 and v2 response schemas to verify that v2 is a superset of v1 (no removed fields, no type changes), ensuring existing consumers are not broken.

See ${CLAUDE_SKILL_DIR}/references/examples.md for additional examples.

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/.curated/validating-api-responses of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/errors.md
  • references/examples.md
  • references/implementation.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Validating API Responses next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Validating API Responses compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Validating API Responses this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.4kAutomated safety check: PassMIT
Gemini Live API Devgoogle-gemini/gemini-skills4.3k—~4.6kAutomated safety check: PassApache-2.0
Building AI Agent On CloudflareCommandCodeAI/agent-skills133—~2.3kAutomated safety check: PassMIT
Tool AssistantAtmosphere/atmosphere3.8k—~412Automated safety check: PassApache-2.0
Azure AI Voicelive Pymicrosoft/skills3.1k—~2.9kAutomated safety check: PassMIT
Gemini Live API DevJetBrains/skills366—~2.6kAutomated safety check: PassNone

Similar skills

  • Gemini Live API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when building real-time, bidirectional streaming applications with the Gemini Live API, or migrating legacy Live models (2.0/2.5/3.1) to Gemini 3.8 Live.

    4.3k GitHub stars~4.6k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Building AI Agent On Cloudflare

    CommandCodeAI/agent-skills

    Builds AI agents on Cloudflare using the Agents SDK with state management, real-time WebSockets, scheduled tasks, tool integration, and chat capabilities.

    133 GitHub stars~2.3k tokensUpdated 7 mo ago
    Backend & APIsAuto-check passed
  • Tool Assistant

    Atmosphere/atmosphere

    Tool-calling assistant with backend functions for time, city time, weather, and temperature conversion, plus cost metering and approval workflows.

    3.8k GitHub stars~412 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Azure AI Voicelive Py

    microsoft/skills

    Official

    Build real-time voice AI applications using Azure AI Voice Live SDK (azure-ai-voicelive).

    3.1k GitHub stars~2.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Gemini Live API Dev

    JetBrains/skills

    Official

    A skill your agent uses when building real-time, bidirectional streaming applications with the Gemini Live API.

    366 GitHub stars~2.6k tokensUpdated 3 mo ago
    Backend & APIsAuto-check passed
  • AI SDK Development

    trypostit/trypost

    TRIGGER when working with ai-sdk which is Laravel official first-party AI SDK.

    691 GitHub starsUsed in 1 repo~3.5k tokens
    AI & LLM EngineeringAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Validating API Responses

What does Validating API Responses do?

Validate API responses against schemas to ensure contract compliance and data integrity. Validating API Responses is an agent skill from jeremylongshore/tons-of-skills-marketplace. Validate API responses against schemas to ensure contract compliance and data integrity.

When should I use Validating API Responses?

Validating API Responses fits situations like: ensuring API response correctness; with phrases like validate responses; check API responses; verify response format.

How do I install Validating API Responses in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill validating-api-responses -a claude-code`. Or copy the skill folder (skills/.curated/validating-api-responses in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/validating-api-responses in your project. Claude Code loads it when a task matches its description.

How do I install Validating API Responses in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill validating-api-responses -a codex`. Or copy the skill folder (skills/.curated/validating-api-responses in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/validating-api-responses in your project. Codex loads it when a task matches its description.

Can I use Validating API Responses in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill validating-api-responses -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/validating-api-responses, .gemini/skills/validating-api-responses, .github/skills/validating-api-responses and .opencode/skills/validating-api-responses in your project.

What does Validating API Responses need to run?

SKILL.md names no scripts, command-line tools or credentials: Validating API Responses is instructions for the agent only. Our summary lists: Node.js. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(api:validate-*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Validating API Responses access the network?

SKILL.md names 3 domains. As links in the text: json-schema.org, ajv.js.org and pact.io. This is read from the text; nothing was executed.

Is Validating API Responses safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Validating API Responses use?

Validating API Responses is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Validating API Responses use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to Validating API Responses?

Skills that share tags, products or a category with Validating API Responses: Gemini Live API Dev (google-gemini/gemini-skills, 4.3k stars), Building AI Agent On Cloudflare (CommandCodeAI/agent-skills, 133 stars), Tool Assistant (Atmosphere/atmosphere, 3.8k stars) and Azure AI Voicelive Py (microsoft/skills, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Validating API Responses?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.