api-testing

api-testing is a skill for Claude Code, Codex from event4u-app/agent-config. It costs 38 tokens per session (1,927 once invoked), scanned A, original, MIT.

A guide for testing API endpoints, which are the parts of an application that receive requests and return data. It covers checking successful responses, invalid input, permissions, edge cases, and mocked outside services.

In plain words
What is it for?
Use it to write or review integration and contract tests for API routes, including tests for validation errors, authorization failures, boundary conditions, and external-service responses.
Why use it?
It helps ensure an endpoint returns the right status, data, and structure instead of only checking that the request does not crash. It also helps expose unauthorized access and unreliable tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to write or review integration and contract tests for API routes, including tests for validation errors, authorization failures, boundary conditions, and external-service responses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/event4u-app/agent-config/api-testing
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.

Any agent
npx skills add event4u-app/agent-config --skill api-testing
Clone the repo
git clone --depth 1 https://github.com/event4u-app/agent-config

Made for: Claude Code, Codex.

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-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/event4u-app/agent-config/api-testing/github.svg)](https://agentmods.dev/skills/event4u-app/agent-config/api-testing)
Your own site
<a href="https://agentmods.dev/skills/event4u-app/agent-config/api-testing"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/api-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/event4u-app/agent-config/api-testing"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/api-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,927 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00038 $0.01927
Opus 5.5 $0.00015 $0.00771
Sonnet 5.5 $0.00008 $0.00385
Haiku 4.5 $0.00004 $0.00193

Measured 16d ago against content hash 21456e909ee1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-testing 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 16d ago.

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.

src/skills/api-testing/SKILL.md · 254 lines

How it starts

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

api-testing

When to use

Use this skill when writing or reviewing API endpoint tests — integration tests, contract validation, response structure checks, or external service mocking.

Procedure: Write API tests

  1. Understand the endpoint — Read the controller, form request, and existing tests. Understand expected behavior, edge cases, and auth requirements before writing anything.
  2. Set up test data — Use seeders (preferred) or factories. Mock external services with Http::fake().
  3. Enumerate test cases — Run the test-case-discovery funnel first; cover success, validation errors, authorization failures, and edge cases — floor per behavior: 1 happy + 1 boundary + 1 error (+1 abuse case; on data-returning endpoints the three broken-access-control negative tests are mandatory).
  4. Assert response — Check status code, JSON structure, data values. Use assertJsonStructure().
  5. Verify — Run the test. Must pass. Check no flaky assertions (no time-dependent, no random ordering).

Example

describe('GET /api/v1/projects', function () {
    it('returns paginated projects for authenticated user', function () {
        $user = loginAsTestUser();

        $response = $this->getJson('/api/v1/projects');

        $response->assertOk()
            ->assertJsonStructure([
                'data' => [['id', 'title', 'status']],
                'meta' => ['current_page', 'per_page', 'total'],
            ]);
    });

    it('returns 401 for unauthenticated request', function () {
        $this->getJson('/api/v1/projects')
            ->assertUnauthorized();
    });

    it('returns 403 when user lacks permission', function () {
        loginAsRestrictedUser();

        $this->getJson('/api/v1/projects')
            ->assertForbidden();
    });
});

Test categories

Happy path

Test the expected success scenario with valid input:

it('creates a project', function () {
    loginAsTestUser();

    $this->postJson('/api/v1/projects', [
        'title' => 'New Project',
        'customer_id' => $customerId,
    ])
        ->assertCreated()
        ->assertJsonPath('data.title', 'New Project');

    $this->assertDatabaseHas('projects', ['title' => 'New Project']);
});

Read the full file on GitHub · 254 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 16d ago Changed · +17 lines 21456e909ee1
  2. 1mo ago First seen · 237 lines · 38 tokens per session scan A 37fcfbfbceca

Subscribe to this mod's changes

api-testing is a skill published in the GitHub repository event4u-app/agent-config (12 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 1,927 once invoked, about $0.0002 per session on Opus 5.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-08-31.