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.
npx skills add latestaiagents/agent-skills --skill api-test-patternsgit clone --depth 1 https://github.com/latestaiagents/agent-skillsWrote 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.
[](https://agentmods.dev/skills/latestaiagents/agent-skills/api-test-patterns)<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/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.
<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="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.02513 |
| Opus 5.5 | $0.00022 | $0.01005 |
| Sonnet 5.5 | $0.00011 | $0.00503 |
| Haiku 4.5 | $0.00006 | $0.00251 |
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 3mo 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.
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);
});
});
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.
- 3mo ago First seen · 396 lines · 56 tokens per session scan A 4d4dcd94efd2
api-test-patterns is a skill published in the GitHub repository latestaiagents/agent-skills (6 stars, last pushed 1mo ago), licensed MIT. It adds 56 tokens to every session and 2,513 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-09-03.
api-test-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| api-test-patternslatestaiagents/agent-skills | Skill | 6 | 1mo ago | MIT | A | 56 | Claude Code |
| fw-ai-actions-appfreshworks-developers/fw-dev-tools | Skill | 6 | 2mo ago | MIT | A | 123 | Claude Code |
| agent-raft-managerruvnet/ruflo | Skill | 83k | today | MIT | A | 18 | Claude Code |
| nexent-daily-testModelEngine-Group/nexent | Skill | 6.3k | today | MIT | A | 78 | Claude Code, Codex |
| moai-ref-api-patternsmodu-ai/moai-adk | Skill | 1.3k | today | Apache-2.0 | A | 85 | Claude Code |
| sinch-conversation-apisinch/skills | Skill | 11 | today | Apache-2.0 | A | 213 | Claude Code, Codex |
| sinch-porting-apisinch/skills | Skill | 11 | today | Apache-2.0 | A | 76 | Claude Code, Codex |