api-test-patterns

api-test-patterns is a skill for Claude Code, Codex from latestaiagents/agent-skills. It costs 56 tokens per session (2,513 once invoked), scanned A, original, MIT.

A collection of patterns for testing REST and GraphQL APIs, which are services that exchange data with applications. It covers responses, data shapes, errors, integrations, contracts, and endpoint performance.

In plain words
What is it for?
Use it to write tests for API endpoints, validate response formats and status codes, check error handling, and test service integrations.
Why use it?
It helps catch broken API behavior and mismatches between connected services before they cause failures elsewhere.

Skill for Claude CodeCodex

Part of the qa-testing plugin — 6 skills, 3 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/latestaiagents/agent-skills/api-test-patterns
Any agent
npx skills add latestaiagents/agent-skills --skill api-test-patterns
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Made for: Claude Code, Codex.

Or install qa-testing, the plugin that ships this one along with the rest of its 6 skills, 3 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-test-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/latestaiagents/agent-skills/api-test-patterns.svg)](https://agentmods.dev/skills/latestaiagents/agent-skills/api-test-patterns)
Your own site
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/api-test-patterns"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/api-test-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,513 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00056 $0.02513
Opus 5 $0.00028 $0.01256
Sonnet 5 $0.00011 $0.00503
Haiku 4.5 $0.00006 $0.00251

Measured yesterday against content hash 4d4dcd94efd2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-test-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/qa-testing/skills/api-testing/api-test-patterns/SKILL.md · 396 lines

How it starts

The opening of the file, as written. The whole thing — 396 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Test Patterns

Write comprehensive API tests that ensure reliability and contract compliance.

When to Use

  • Testing REST or GraphQL APIs
  • Validating API contracts
  • Integration testing between services
  • Testing error handling and edge cases
  • Performance testing API endpoints

REST API Testing

Using Playwright API Testing

// tests/api/users.spec.ts
import { test, expect } from '@playwright/test';

test.describe('Users API', () => {
  const baseURL = process.env.API_URL || 'http://localhost:3000';

  test('GET /users returns list of users', async ({ request }) => {
    const response = await request.get(`${baseURL}/api/users`);

    expect(response.ok()).toBeTruthy();
    expect(response.status()).toBe(200);

    const users = await response.json();
    expect(Array.isArray(users)).toBeTruthy();
    expect(users.length).toBeGreaterThan(0);

    // Validate schema
    expect(users[0]).toMatchObject({
      id: expect.any(Number),
      email: expect.any(String),
      name: expect.any(String),
    });
  });

  test('POST /users creates new user', async ({ request }) => {
    const newUser = {
      email: '[email protected]',
      name: 'Test User',
      password: 'securepassword123',
    };

    const response = await request.post(`${baseURL}/api/users`, {
      data: newUser,
    });

    expect(response.status()).toBe(201);

    const created = await response.json();
    expect(created.email).toBe(newUser.email);
    expect(created.name).toBe(newUser.name);
    expect(created).not.toHaveProperty('password');
  });

  test('GET /users/:id returns single user', async ({ request }) => {
    const response = await request.get(`${baseURL}/api/users/1`);

    expect(response.ok()).toBeTruthy();

    const user = await response.json();
    expect(user.id).toBe(1);
  });

  test('PUT /users/:id updates user', async ({ request }) => {
    const updates = { name: 'Updated Name' };

    const response = await request.put(`${baseURL}/api/users/1`, {
      data: updates,
    });

    expect(response.ok()).toBeTruthy();

    const user = await response.json();
    expect(user.name).toBe('Updated Name');
  });

  test('DELETE /users/:id removes user', async ({ request }) => {
    const response = await request.delete(`${baseURL}/api/users/1`);

    expect(response.status()).toBe(204);

    // Verify deleted
    const getResponse = await request.get(`${baseURL}/api/users/1`);
    expect(getResponse.status()).toBe(404);
  });
});

Read the full file on GitHub · 396 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 396 lines · 56 tokens per session scan A 4d4dcd94efd2

Subscribe to this mod's changes

api-test-patterns is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 56 tokens to every session and 2,513 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

fw-review

Full Freshworks marketplace app review — iparams, frontend, serverless, FDK, security, and structured text report output — in one skill.

freshworks-developers/fw-dev-tools · 34 tokens

fw-app-dev

Expert-level skill for building, debugging, reviewing, and migrating Freshworks Platform 3.0 marketplace apps. REQUIRES Node.js 24.x + FDK 10.x. New UI apps default to React Meta (DEW, metaConfig.framework react); vanilla Crayons is opt-in. Commands: /fdk-react-create, /fdk-react-migrate, /fdk-fix, /fdk-migrate…

freshworks-developers/fw-dev-tools · 111 tokens

ai-amazon-brand-analytics

Skill "ai-amazon-brand-analytics" from skillsaiagent/aiskills, covering ai-amazon-brand-analytics amazon 品牌分析助手, 概述, 什么时候使用, 调用方式 and 命令示例.

skillsaiagent/aiskills · 72 tokens

ai-amazon-international-listings

Amazon 本地化助手适合运营、产品、销售、software在用户提出“海外 Listing 说对了吗”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成商品/店铺诊断、卖点与风险提示、运营动作建议。.

skillsaiagent/aiskills · 75 tokens

ai-amazon-inventory-management

Skill "ai-amazon-inventory-management" from skillsaiagent/aiskills, covering ai-amazon-inventory-management amazon 库存诊断助手, 概述, 什么时候使用, 调用方式 and 命令示例.

skillsaiagent/aiskills · 76 tokens

ai-amazon-repricing-strategy

Skill "ai-amazon-repricing-strategy" from skillsaiagent/aiskills, covering ai-amazon-repricing-strategy amazon 调价诊断助手, 概述, 什么时候使用, 调用方式 and 命令示例.

skillsaiagent/aiskills · 75 tokens